Forums / Built-in Shipping and Payment Modules / Free shipping needed on the sub total not (as it currently is)the total

Free shipping needed on the sub total not (as it currently is)the total

Locked

Started by imageriot on 12 Feb 2008, 2:41 PM · Views: 2,136

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
12 Feb 2008, 2:41 PM
#1
imageriot avatar

imageriot

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Free shipping needed on the sub total not (as it currently is)the total

Hi guys I have been scratching my head for a while over this now, sorry if it has been brought up before I have trauled the forums this morning without any joy.

Currently my store is offering free shipping using the order total module (zencart v1.3.7) I have it configured so orders over £35 ship free.

Currently free shipping is offered based on the gross price(incuding tax) and I would like it to be on the net price(before tax). For example if someone buys an item costing £34 they shouldn't receive free shipping but currently they do because shipping is calculated after tax.

thanks very much to anyone who can help me, I imagine it's something simple that has been staring me in the face for days.

Rory

20 Feb 2008, 4:44 PM
#2
imageriot avatar

imageriot

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Re: Free shipping needed on the sub total not (as it currently is)the total

I'm really sorry for bumping this thread but I still cannot fix this problem and I am totally stuck.

Rory

21 Feb 2008, 12:27 PM
#3
imageriot avatar

imageriot

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Re: Free shipping needed on the sub total not (as it currently is)the total

Right I have been looking through ot_shipping.php, now I'm still learning php and I haven't got onto functions and classes yet so I find it quite difficult to understand, the following is from lines 83,84 and 85 and it looks like this could be modified so that shipping doesn't take into account the tax so free shipping can be based on subtotal(not total):

$order->info['tax'] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
         $order->info['tax_groups']["$shipping_tax_description"] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
         $order->info['total'] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
21 Feb 2008, 12:46 PM
#4
pinetreecandles avatar

pinetreecandles

Zen Follower

Join Date:
Feb 2008
Location:
West Virginia
Posts:
135
Plugin Contributions:
0

Re: Free shipping needed on the sub total not (as it currently is)the total

imageriot:

Right I have been looking through ot_shipping.php, now I'm still learning php and I haven't got onto functions and classes yet so I find it quite difficult to understand, the following is from lines 83,84 and 85 and it looks like this could be modified so that shipping doesn't take into account the tax so free shipping can be based on subtotal(not total):

$order->info['tax'] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
$order->info['tax_groups']["$shipping_tax_description"] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
$order->info['total'] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);



one thing you might try is look at on the osCommerce site in their contributions section and see if they have something that does what you like.  Download it and see if you can make it work for zen cart or at least it may give you a starting point.

I don't know any type of programming or I would try to come up with something as that would be a nice feature.

Zen Cart: 1.3.8a
PHP: 5.2.4
MySQL: 5.0.45

Pine Tree Candles

21 Feb 2008, 4:43 PM
#5
imageriot avatar

imageriot

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Re: Free shipping needed on the sub total not (as it currently is)the total

Right I have found a solution, albeit a little bit nasty, I have added the VAT to the **"Free Shipping For Orders Over" **and it does what I need, I really overcomplicated this one, thanks for the advice though pinetreecandles.