Forums / Built-in Shipping and Payment Modules / Can I have two different FREE shipping thresholds?

Can I have two different FREE shipping thresholds?

Views: 2,315

Results 1 to 14 of 14
23 Apr 2012, 8:18 PM
#1
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Can I have two different FREE shipping thresholds?

Right now, we offer a FREE SHIPPING option in our store for any order over $30.00, as long as it's going to the USA or Canada.

Is there a way to have us change the value so that Free Shipping to Canada is only offered for orders $100.00 or more, but still remain the same $30.00 limit for USA?

Basically, we have it set up now so that the free shipping option is displayed for a certain ZONE, and that ZONE has only USA and Canada in there. I need a way to still offer free shipping in both places, but to have a higher limit for our Canadian customers.

Can this be done within the built-in shipping modules?

  • Jeff
25 Apr 2012, 12:36 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Can I have two different FREE shipping thresholds?

It doesn't look like the freeoptions shipping module supports multiple zones/limits, so the direct answer to your question is "No, it can't be done with the built-in shipping modules".

However, you could "clone" the freeoptions module so that you could configure one to give the $30.00 limit free shipping to US customers and the other to give the $100.00 limit to your Canadian customers. Check out this link (http://www.zen-cart.com/content.php?207-programming-question-how-do-i-clone-a-shipping-module) to see how to clone a shipping module.

25 Apr 2012, 6:13 PM
#3
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Can I have two different FREE shipping thresholds?

Hey, thanks for the help! I will look into that cloning solution. :)

  • Jeff
25 Apr 2012, 6:33 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Can I have two different FREE shipping thresholds?

No problem ... just remember to backup your database first!

14 May 2012, 5:17 PM
#5
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Can I have two different FREE shipping thresholds?

I cloned it, and it seemed to work, but I did find a bug which I'm having trouble identifying. Hopefully you can help me!

Basically, I cloned the FREESHIPPING module, and called it FREESHIPPING_CANADA. That way, I can have a separate free shipping option for Canada that has it's own Zone, separate from the USA free shipping.

All seems to be well........in other words, I do get this Free Shipping option to show up for my Canadian customers.......but once they use a discount coupon and the page refreshes, the Free Shipping option is no longer selected. If they click to select it, the page refreshes, and unselects it.

This ONLY HAPPENS if they redeem a coupon. If they don't redeem a coupon, the free shipping option can be selected and the purchase can be made. But once you redeem the discount coupon, the free shipping is displayed but it doesn't remain selected.

Any ideas what would cause that? I'm stumped! (And no, there are no zone restrictions on the coupon being used....I checked!)

  • Jeff
14 May 2012, 6:01 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Can I have two different FREE shipping thresholds?

I ran a test on an unmodified v1.5.0 installation:

  1. Created a gift certificate for $25 off, no minimum order, didn't check the free shipping box, one time use for a one customer, no zone restrictions.
  2. Using the 'freeoptions' shipping, set that up so that purchases >= $30 will qualify for free shipping
  3. Logged in as that customer.
    • Added a $29.99 item to my cart, go to checkout, no free shipping
    • Added a $25.00 item to my cart, go to checkout, FREE shipping available (which I selected)
    • Continued on to payment, entered by code for $25.00 off. Screen refreshes, still free shipping.

All that worked like I'd expect. Is the same problem present when your US customers use a coupon?

14 May 2012, 6:36 PM
#7
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Can I have two different FREE shipping thresholds?

Ok, I think I may be getting somewhere. It may boil down to some unknown code modification that I may have done in the past. So far though, I think I see SOMETHING that I want to fix, and perhaps that will resolve the issue.

As I said, I made a COPY of the existing freeshipping module. I renamed it to freeshipping_ca, and I replaced all instances of "freeshipping" inside the file to be "freeshipping_ca" in order to make it unique.

Now, when I select this free shipping from the checkout page, instead of it saying "Free Shipping" on the order total, it says this:

Click Here to view pic: [Attachment no longer available]

I would like to find out were it's getting the "freeoptions_ca_freeoptions_ca" string! If I can fix this so that it puts "Free Shipping Options (Free Shipping):" instead, then that will rule out one of my variables that I'm trying to eliminate.

I think that issue above could hold the key as to why it's not working, because SOMETHING is obviously missing or overlooked on my part of this basic text isn't coming in. Perhaps the module isn't recognized and therefore, it's not being selected.

  • Jeff
14 May 2012, 6:40 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Can I have two different FREE shipping thresholds?

The underscores are probably the issue ...

freeoptions should go to freeoptionsca
FREEOPTIONS should go to FREEOPTIOSCA

filenames should be:
freeoptionsca.php

Uninstall the freeoptions_ca and then make the changes and reinstall ... see if that fixes the issue ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

14 May 2012, 6:44 PM
#9
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Can I have two different FREE shipping thresholds?

By the way, to see what I mean, I created a test account in my store. You can try this:

  1. Go to my site and login: https://www.mjmmagic.com/store/login.html

(Username: [email protected] Password: canada)

  1. I already have an item in the cart, so just proceed to the checkout area.

  2. When you get to the checkout page, NOTICE AT FIRST that everything looks correct. That is, free shipping is selected, and the Order Total list at the top of the page correctly shows "Free Shipping Options (Free Shipping):"

However, if you REFRESH the page (which is what happens when you apply a discount), the above text disappears and it gets initialized with that weird "freeoptions_ca_freeoptions_ca" string.....almost as if the module isn't recognized.

So it appears that it has nothing to do with a discount coupon......it has to do with a refresh of the page. I am totally stuck trying to figure out why that is.

  • Jeff
14 May 2012, 6:46 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Can I have two different FREE shipping thresholds?

Please try the naming convention that I posted and see if it fixes the conflicts ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

14 May 2012, 7:03 PM
#11
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Can I have two different FREE shipping thresholds?

Ajeh:

The underscores are probably the issue ...

freeoptions should go to freeoptionsca
FREEOPTIONS should go to FREEOPTIOSCA

filenames should be:
freeoptionsca.php

Uninstall the freeoptions_ca and then make the changes and reinstall ... see if that fixes the issue ...

Linda - God I hope you're right! I just uninstalled the one with the understore......renamed the files to simply "freeoptionsca" without the underscore......and reinstalled.

However, while my new config changes are sticking, the DEFINE text isn't working, and the module is remaining in a disabled state. Here's a screenshot to show you what I mean:

CLICK TO VIEW IMAGE: [Attachment no longer available]

UPDATE: Hold on......it looks like some strings weren't replaced correctly. Currently trying it now and will post an update momentarily.

  • Jeff
14 May 2012, 7:16 PM
#12
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Can I have two different FREE shipping thresholds?

Linda - It looks like that DID IT! I am going to keep a close eye on this, but so far, I think the problem was that pesky little underscore! Thankfully you caught that. I am used to using underscores when renaming files, and this was something I never would have noticed!

  • Jeff
14 May 2012, 10:36 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Can I have two different FREE shipping thresholds?

Thanks for the update that this appears to be working now ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!