No shipping cost is applied

1 view
Skip to first unread message

Luciano

unread,
Dec 22, 2008, 3:09:51 PM12/22/08
to phpShop
Hi! I'm new to phpshop and I've been contacted by a friend to fix an
issue in an already established phpshop environment.

The problem is as follows. There's a only one shipping method active
called Parcel Post with 15.00 percent and I've disabled the zone
shipping module, but when I buy a product to test this issue no
shipping cost is applied.

Any ideas why this can be happening?

Thanks in advance,
Luciano.

Jeff Newman

unread,
Dec 22, 2008, 3:29:28 PM12/22/08
to php...@googlegroups.com
find the checkout/lib/ps_checkout.inc file, around line 435. this is where
the shipping costs are calculated (with a call to calc_order_shipping around
line 703). see if this has been commented out/statically defined with a
zero value, or if the function returns a static value of zero as well.

if not, then check out the zone and country assignments - may be that the
country code doesn't exist, so it can't find any numbers to use for the
calculations.
--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.19/1860 - Release Date: 12/21/2008
3:08 PM

Luciano

unread,
Dec 24, 2008, 12:45:51 PM12/24/08
to phpShop
Hi, thanks for the replay.

I've checked the ps_checkout.inc and everything seems ok, but that
part seems to be releated to calculating shipping based on the zone
which in my case it's disabled because I don't want zone based
shipping. However, I check the zone and country stuff in the db and
the country and zone are there.

So, where I can check that the normal shipping (no the zone one) is
being applied? Any other ideas?

Thanks again and merry Christmas.
> Checked by AVG -http://www.avg.com

Luc Verhelst

unread,
Dec 24, 2008, 12:50:31 PM12/24/08
to php...@googlegroups.com
If you don't want zone based shipping, why not try and create one zone for all the shipping, and make zone shipping active again.

Best wishes.

2008/12/24 Luciano <lucia...@gmail.com>

Luciano

unread,
Dec 24, 2008, 1:31:43 PM12/24/08
to phpShop
Because zone shipping only allows me to put a fixed cost and my friend
wants the shipping to be a 15 percent of the product, that's why i
think that zone shipping is not suitable for this.

See you.

On Dec 24, 3:50 pm, "Luc Verhelst" <luc.verhe...@gmail.com> wrote:
> If you don't want zone based shipping, why not try and create one zone for
> all the shipping, and make zone shipping active again.
>
> Best wishes.
>
> 2008/12/24 Luciano <luciano...@gmail.com>

Jeff Newman

unread,
Dec 24, 2008, 3:36:48 PM12/24/08
to php...@googlegroups.com
then the easy solution to this is to comment out the function call for
calculating the shipping cost, and instead, just statically define it as

$order_number = $this->get_order_number();
$order_subtotal = $this->calc_order_subtotal($d);
$order_taxable = $this->calc_order_taxable($d);
$order_tax = $this->calc_order_tax($order_taxable, $d);
// $order_shipping = $this->calc_order_shipping($d);
$order_shipping = $order_subtotal * 0.15);
$order_shipping_tax = $this->calc_order_shipping_tax($d);

to do it correctly, create a DEFINE'd variable in the config.php file called
SHIPPING_PERC then use that everywhere instead of the 0.15. you might want
to use it in a couple places (like checkout functions and order
viewing/printing), so you would only have to update it once.

you'll need to change the order view/print as well, as they will try to
recalc the shipping costs when displaying an existing order, and if you
change the percent later, it'll change old orders as well - not a good
thing.

----- Original Message -----
From: "Luciano" <lucia...@gmail.com>
To: "phpShop" <php...@googlegroups.com>
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.0/1863 - Release Date: 12/24/2008
11:49 AM

Luciano

unread,
Dec 24, 2008, 3:58:29 PM12/24/08
to phpShop
Thanks, I'll try that :)

But, just to be curious, do you know why the shipping module doesn't
work? That should be the elegant and flexible solution...

Jeff Newman

unread,
Jan 9, 2009, 8:49:31 AM1/9/09
to php...@googlegroups.com
i went back to your original post, and you mention a shipping method that's
active, and that zone shipping is disabled.

first, how was zone shipping disabled? and second, zone shipping is the
only shipping mechanism i can find in the current code. i found the
ship_method_id in the ps_checkout.inc file, but there are no HTML references
to even pass it along.

i'm assuming that this was a feature that was available in a previous
version of the code, but that was removed later. i can only find references
to it in the old forums dating back to 2005 and earlier.

what version of phpShop are you using? it should be at the top of your
etc/config.php file.

thanks.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.5/1883 - Release Date: 1/8/2009
6:05 PM

Reply all
Reply to author
Forward
0 new messages