Zen Cart Logo
Forums / General Questions / Free Shipping By Zone

Free Shipping By Zone

Views: 1,045

Results 1 to 11 of 11
22 Mar 2011, 7:56 PM
#1
vvhorus avatar

vvhorus

New Zenner

Join Date:
May 2009
Posts:
10
Plugin Contributions:
0

Free Shipping By Zone

Hi all:

I've searched here and in the Zen Cart site for a contribution or a custom modification similar to what we need without success.

Here's a little background of our business: We sell accounting supplies and tax forms. We used to be a catalog/phone order business only. We migrated the business to Zen Cart from a custom-built COBOL application running on SCO UNIX that was coded God knows when. So far, we have added all products successfully, and have fulfilled online orders without a problem.

There's one feature that we haven't been able to replicate from the old catalog/phone order days, which is offering free shipping by state. We have a chart of free shipping minimums, and it's divided by state. For example: to get free shipping to Alabama, the customer needs to spend at least $180.00, Arizona $295, and so on. Each individual state has a free shipping minimum. We are moving away from the printed catalog, and we want to offer this feature to our online customers.

I've tried a few contributions so far (Table Rate, Multiple Zones Modification, etc.) with little success. By default, Zen will allow free shipping to just one zone, but since we have 50 zones, it's kind of useless for what we need.

We're using a very lightly customized version Zen Cart 1.3.9d (added a Manufacturer Model Number field to the Admin products page for internal purposes). We also use the Tables Discount order total module. Everything else we use are the standard modules that come with Zen (UPS and PayPal modules) except for a few reporting modules.

Could someone at least point me in the right direction? Maybe there's a contribution out there that can accomplish this with a little tweaking? Maybe cloning the default free shipping module? I don't know. I am no PHP coder. I can read code, I know a little bit about MySQL and can easily make modifications to the code if need be, but unfortunately I don't write code from scratch.

Thank you all! Cheers! :-)

Victor

22 Mar 2011, 8:08 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Free Shipping By Zone

What shipping module(s) are you using when the order is NOT Free Shipping? :unsure:

25 Mar 2011, 5:56 PM
#3
vvhorus avatar

vvhorus

New Zenner

Join Date:
May 2009
Posts:
10
Plugin Contributions:
0

Re: Free Shipping By Zone

We are only using the default UPS shipping module that came with Zen. We are not offering free shipping on online orders right now...

25 Mar 2011, 6:15 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Free Shipping By Zone

You could customize the table:
zones

and add a new field such as:
zone_free_shipping_over

and do a look up in the UPS shipping module and disable it when the total for:
$_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices()

is >= to that amount ...

Then customize the Shipping ot_shipping module and customize that to use the:
$order->delivery['country']['id']
$order->delivery['zone_id']

to manage the orders that qualify for free shipping rather than the amount and choice of National or Internation ...

25 Mar 2011, 6:43 PM
#5
vvhorus avatar

vvhorus

New Zenner

Join Date:
May 2009
Posts:
10
Plugin Contributions:
0

Re: Free Shipping By Zone

I'll try your suggestions. I'll let you know the outcome. Wish me luck! And thanks!! :smile:

25 Mar 2011, 6:45 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Free Shipping By Zone

Let us know how it works out for you ... :smile:

25 Mar 2011, 7:53 PM
#7
vvhorus avatar

vvhorus

New Zenner

Join Date:
May 2009
Posts:
10
Plugin Contributions:
0

Re: Free Shipping By Zone

Hi Linda,

I successfully added the field zone_free_shipping_over to my zones table (made it DECIMAL 15,4 to match other numeral fields throughout the database) and added all the corresponding amounts to each zone. So far, so good...

I opened the ups.php file and I couldn't find a $_SESSION['cart'] variable anywhere, nor a sql query line for me to add the zone_free_shipping_over field. Same with the ot_shipping.php file.

I guess it wasn't just copying/pasting a few lines of code. Sorry about this. I'm not a php coder, so if you could elaborate a little bit more, it would be very helpful to me.

I don't know if this is relevant or not. When I first set up Zen, I deleted all countries except US (we only sell to USA) and made each state a different zone.

I really appreciate your help in this! :-)

Victor

25 Mar 2011, 7:56 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Free Shipping By Zone

I would have to sit down and write all of the code for this ... I am not sure when I will get the time ...

NOTE: when using the $_SESSION['cart'] make sure it is available to you with a:
global $cart ...

28 Mar 2011, 6:39 PM
#9
vvhorus avatar

vvhorus

New Zenner

Join Date:
May 2009
Posts:
10
Plugin Contributions:
0

Re: Free Shipping By Zone

Thank you for your help! :smile:

29 Mar 2011, 7:50 PM
#10
vvhorus avatar

vvhorus

New Zenner

Join Date:
May 2009
Posts:
10
Plugin Contributions:
0

Re: Free Shipping By Zone

If this helps you (or anyone else that could help), I kind of deducted the logic of what this function needs to do:

I need the function to look at the state that the order ships to, then retrieve the free shipping limit amount corresponding to that state/zone located in the "zone_free_shipping_over" column in the zones table. Then compare the order sub-total against this amount. If the order sub-total is equal or larger, shipping is $0.00, else shipping is whatever the module says it is.

I wouldn't know how to code this in PHP. Any takers? :-)

13 Apr 2011, 7:27 PM
#11
vvhorus avatar

vvhorus

New Zenner

Join Date:
May 2009
Posts:
10
Plugin Contributions:
0

Re: Free Shipping By Zone

Hello! Hi! Anyone? :smile:

We are willing to pay for this customization if anyone is interested. Just PM me with your name, a phone number and a quote on how much it will cost and the completion timeframe.

Thanks!!