Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Shipping tax not included in step 3

Shipping tax not included in step 3

Locked

Views: 1,246

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
1 Jun 2008, 12:27 PM
#1
pasi avatar

pasi

Zen Follower

Join Date:
Mar 2004
Location:
Finland
Posts:
435
Plugin Contributions:
1

Shipping tax not included in step 3

Hi,

I've ran into a problem...

a shop I'm parsing together for a customers has a slight problem with shipping method taxes.

The tax is shown in steps 1 and 2 of checkout, but when I go to step 3 the shipping order total no longer contains tax and the grand total of the order is also smaller than in step 1 and 2.

I've traced the problem down to ot_shipping (well it's not actually a problem in the ot_shipping module).

I see that the ot_shipping tries to use:
$GLOBALS[$module]->tax_class

which when debugged with print_r() is not set!
There is no array that matches the value of $module and thus all the tax calculation on step 3 is left undone.

the $GLOBALS[$module]->tax_class is not available in step 1 or 2 either but yet the shipping cost includes tax in these steps. Does it take the shipping cost value from elsewhere??

This happens with each shipping module I've tried, so don't think it's a problem in the actual shipping modules.

the biggest problem I always got when setting up zen cart shops is with these damn shipping/payment/ot modules. and I really think that the whole checkout system needs to be cleared up!

Working with Zen Cart since 2003 :: www.prr.fi
Author of the original Finnish language pack for Zen Cart since 2004

1 Jun 2008, 2:16 PM
#2
pasi avatar

pasi

Zen Follower

Join Date:
Mar 2004
Location:
Finland
Posts:
435
Plugin Contributions:
1

Re: Shipping tax not included in step 3

After 5 hours of wasting time I fixed it by moving:

require(DIR_WS_CLASSES . 'shipping.php');

$shipping_modules = new shipping($_SESSION['shipping']);

from where it was to a few rows above so that it's now called before

require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;

As I investigated this, it seems that executing the $order_total_modules = new order_total; removes the shipping module from the $GLOBALS !!!

Working with Zen Cart since 2003 :: www.prr.fi
Author of the original Finnish language pack for Zen Cart since 2004

1 Jun 2008, 5:31 PM
#3
pasi avatar

pasi

Zen Follower

Join Date:
Mar 2004
Location:
Finland
Posts:
435
Plugin Contributions:
1

Re: Shipping tax not included in step 3

FFS!!

It seems that my customer had done some coding of her own and it was she who had messed up the code trying to get a mod to work :censored:

atleast I get a full pay for her mistake :yes:

Anyway, I did an additional 2 hours just to get the coupon/gift vouchers to calculate taxes correctly with shipping including taxes :P

Zen Cart calcutaled the coupon tax with the shipping tax even though shipping was not used in the coupon calculation... go figure :blink:

Working with Zen Cart since 2003 :: www.prr.fi
Author of the original Finnish language pack for Zen Cart since 2004