Post by Qphoria » Thu Dec 09, 2010 1:29 am

There has been a limitation for the free shipping in opencart since the beginning, and its oddly only starting to begin causing issue.

There are actually 2 problems:
1. If you want to offer free shipping on Product A but not on Product B, if you have Free Shipping enabled, it would offer free shipping for both because it is a generic cart-wide module that only triggers on subtotal. This is no good. So the current Free shipping really can't be used for mixed shipping stores.

2. If you still wanted to give Product A free shipping but not Product B, a common work around was to set "Require Shipping" to NO. Then use a weight based shipping method as that will remove the non-shipping product from the shipping weight check. But setting require shipping = No also prevented the shipping page from asking for address. So if you just wanted to buy Product A by itself and have it shipped to someone else, you could not do it.

My first inclination to fix it was to enhance the free shipping module to support the option of choosing which products are eligible for free shipping. I've done this and it resolves Problem 1. Now if you have only certain products checked for free shipping, but have other items in the cart that are not in the free shipping list, it will disable the free shipping option so that products that aren't eligible are not given away for free. Additionally, if only eligible items are in the cart, it will show the free shipping option.

But to fix Problem 2, there needs to be another adjustment made. I think the adjustment needs to be made in the "require shipping" product option. I think we need a 3rd choice.
Requires Shipping: Yes, No, & Address Only.

This will tell the shipping page to still load to acquire the shipping address, but not include the product in the shipping calculations. However, this then implies that if you use "Address Only" for ANY products, then you will need to be sure that the Free Shipping w/Product support is enabled and that item is selected. Products and Shipping are asynchronous by design so there is no good way to automagically make that work together. But that may be the only solution.

Anyone got any other ideas?

I've attached the updated Free as well as Flat rate modules as I think that one also applies for items that you don't want to be allowed under Flat rate. They both now have the option to choose specific products that are eligible. These may or may not replace the existing flat and free shipping options in the core. Depending on if they are useful or not. They also may appear under different names if there is too much confusion. For now they are exact replacements for the existing free and flat shipping options so do a backup before using. Remember these will only fix Problem 1 above.

ONLY USE THESE IF USING 1.4.8 through 1.4.9.4
1.4.9.5 already has this module in the core and may have newer changes

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by cashman9 » Thu Dec 09, 2010 2:25 am

Currently, the subtotal reaches a certain point, then all items are allowed to be free shipping.
Please make sure that this option is not removed as well since sometimes a user might want to give free shipping on all items as soon as a subtotal is reached, just like Amazon does it.

But the fix for specific products sounds very good and I'm looking forward to it.. Thanks!

Active Member

Posts

Joined
Wed Nov 17, 2010 4:28 am

Post by Qphoria » Thu Dec 09, 2010 2:32 am

cashman9 wrote:Currently, the subtotal reaches a certain point, then all items are allowed to be free shipping.
Please make sure that this option is not removed as well since sometimes a user might want to give free shipping on all items as soon as a subtotal is reached, just like Amazon does it.

But the fix for specific products sounds very good and I'm looking forward to it.. Thanks!
This has not been changed. The min order total still must be met for free shipping. It is setup like the coupon system. If you have products selected AND meet the min total, then those items are free. If you have no products selected then it is considered to be "cart-wide" and the only check is the min total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by cashman9 » Thu Dec 09, 2010 2:39 am

Qphoria wrote:
cashman9 wrote:Currently, the subtotal reaches a certain point, then all items are allowed to be free shipping.
Please make sure that this option is not removed as well since sometimes a user might want to give free shipping on all items as soon as a subtotal is reached, just like Amazon does it.

But the fix for specific products sounds very good and I'm looking forward to it.. Thanks!
This has not been changed. The min order total still must be met for free shipping
Therefore, there is an option to apply the free shipping on all items or specific items with a minimal subtotal order requirements?

Can an environment be created that doesn't judge it on the subtotal but only on the product itself for free shipping?

Lets say, Product A cost $5 and Product B Cost $1.

You want to give Product B free shipping. If the subtotal is $1, that means Product A is included? But you don't want it to be included.

Active Member

Posts

Joined
Wed Nov 17, 2010 4:28 am

Post by Qphoria » Thu Dec 09, 2010 2:47 am

That would actually need even more enhancement to associate a minimum per item or at least a flag on each item to allow min total override.. that is not covered for now

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by cashman9 » Thu Dec 09, 2010 4:39 am

Tested and works perfect with OpenCart 1.4.9.1 Thanks!

Active Member

Posts

Joined
Wed Nov 17, 2010 4:28 am

Post by JAY6390 » Thu Dec 09, 2010 4:48 am

Surely the easiest way to fix this would be to have a "free shipping" option in the product page, and then let modules run off that to decide which products have to accumulate the shipping charges
This is how I've seen it on other carts anyway

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Thu Dec 09, 2010 5:20 am

Well that would be the equivalent of "Address Only". I was trying to reuse the existing "shipping" variable for products.

But if we have a "freeshipping" or "Address only" flag, that still means the shipping page would need to have some sort of automatic freeshipping. I just checked zencart and that is what they have as well. They force the session to "free_free" if the item is set to virtual or no shipping. As opposed to just skipping it, they simply fake it. We can continue to skip for unrequired shipping items but we need some way of faking it for address only/free shipping

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by cashman9 » Thu Dec 09, 2010 6:24 am

Qphoria wrote:
cashman9 wrote: I found some bugs

Notice: Undefined index: free_product in /home/*****/public_html/admin/controller/shipping/free.php on line 13Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/admin/index.php:72) in /home/****/public_html/system/engine/controller.php on line 27

Warning: Invalid argument supplied for foreach() in /home/alphaw10/public_html/admin/view/template/shipping/free.tpl on line 53

Happens when no products are selected and you save.
Fixed and updated the first post with new versions.
Very small issue about the module is the missing scroller. If the title product is large, you can't scroll it at the bottom to see full product name. Q, can you update it?

Thanks

Active Member

Posts

Joined
Wed Nov 17, 2010 4:28 am

Post by TAC » Mon Jan 03, 2011 12:21 pm

Hi,

I may be a little confused but I am trying to have free shipping if someone spends over a certain amount cart-wide and also free shipping on some selected products.

I have installed the free shipping mod from above but it seems now that I have added the specific products I want to have free shipping they only get free shipping if the total for those products matches the total I've set for the cart-wide free shipping.

Have I done something wrong or is this still a problem to be resolved?

Thanks :)

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by tampadesign » Sat Jan 22, 2011 6:50 am

Thanks for this modification Q. Solves a problem that I hope is going to be fixed in the next major OC release.

One thing I wanted to note to people who use Q's mod, I added some text to the 'Payment' page template where a comment can be left. Basically it just notes to the user that if they are ordering only (name of the product that has free shipping applied to it) they need to specify a separate shipping address in the comment box if they wish to have the product sent to a separate address from their billing address. Only way around problem #2 that I can see without coming up more modifications to the OC application itself.

Freelance Web Designer & Developer
tampadesign.net


Newbie

Posts

Joined
Thu Jan 06, 2011 6:56 am

Post by grgr » Tue Mar 29, 2011 10:58 pm

I have given this a go and seems to work quite well.

Trouble for me (and I would have though a lot of people) is that the logic is the wrong way around. I want everything to qualify for free shipping except for a very few products.

How easy would it be to reverse the logic on these fixes?

-
Image Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by Qphoria » Wed Mar 30, 2011 12:04 am

yea that is something I'd like to add as well.. like a checkbox that simply reverses the logic

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by grgr » Wed Mar 30, 2011 2:17 am

grgr wrote: How easy would it be to reverse the logic on these fixes?
Turns out it was very.

Ok, I was editing the wrong file! For the life of me I couldn't understand why nothing I tried was working. It was late at night and it had been a very long day, well, that's my excuse and I'm sticking to it.

-
Image Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by Amrit » Mon Apr 04, 2011 9:30 pm

I'm using the Free Shipping with Weight Based Shipping.

I know people have written about oter concerns with the Free Shipping, but my needs are slightly different.

I have free shipping for orders over a certain amount.
I don't need free shipping for just a few products.

What I want is the Free Shipping be the only option when the order amount is above my amount I've set.
That means I do NOT want the Weight Based Shipping be visible when the shipping is free.

Is it suppose to be like that or is this a bug?

Seems silly that an option no one will choose is visible. Makes it look rather unprofessional, and I don't say that to be a critic, I'm only saying what my customers think.

Thanks for a great web shop. :-)

Sincerly

Newbie

Posts

Joined
Fri Apr 01, 2011 11:33 pm

Post by Johnathan » Tue Apr 05, 2011 1:57 am

Amrit wrote:What I want is the Free Shipping be the only option when the order amount is above my amount I've set.
That means I do NOT want the Weight Based Shipping be visible when the shipping is free.

Is it suppose to be like that or is this a bug?

Seems silly that an option no one will choose is visible. Makes it look rather unprofessional, and I don't say that to be a critic, I'm only saying what my customers think.
I'm actually of the opposite opinion -- I think it can be good to show what shipping costs even when providing free shipping. It gives the customer an idea of the actual "value" that they're getting free.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Qphoria » Tue Apr 05, 2011 2:02 am

Amrit wrote: What I want is the Free Shipping be the only option when the order amount is above my amount I've set.
That means I do NOT want the Weight Based Shipping be visible when the shipping is free.

Is it suppose to be like that or is this a bug?

Seems silly that an option no one will choose is visible. Makes it look rather unprofessional, and I don't say that to be a critic, I'm only saying what my customers think.
It's actually a feature.. Shipping modules are asynchronously designed so that one shipping doesn't influence another. But for the reasons you mentioned, there needs to be a manager of these things. So that is planned in the future.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Wed Apr 06, 2011 2:40 am

Updated the first post with new versions!

I have added a reverse logic option to the 2 mods now..
The new option is called "Inclusive Mode:"
If yes then it assumes ONLY the selected products are elgible
if no, then it assumes ALL products EXCEPT the selected products are eligible

Ex.
If you have Inclusive set to YES
- Then only when the selected products are in the cart will the shipping option show
- If you have a mix of selected and non-selected items, it will NOT show.
- The cart must contain only non-selected items

If you have Inclusive set to NO
- Then if any of the selected products are in the cart the shipping option WILL NOT show
- If you have a mix of selected and non-selected items, it will NOT show.
- The cart must contain only non-selected items

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by palynch » Thu Apr 21, 2011 10:09 am

THIS MIGHT BE YOUR ANSWER.
What i am looking for - in the FREE SHIPPING module there is a TOTAL PRICE needed before the free shipping module becomes available. I need a WEIGHT Sub-Total amount needed before the free shipping module becomes NOT available.

This way anything weighing over 50lbs for example wont qualify for FREE shipping. This way when a customer adds multiple products, the TOTAL PRICE increases (this would usually give the customer free shipping) but the weight exceeds over 50lbs;therefore, not letting the customer get FREE SHIPPING.

Is that possible??

Whadayah think?

p.s I'm running 1.4.7 and the Free shipping.zip file gave me a bunch of errors when installed.

www.prodjsupply.com

Newbie

Posts

Joined
Wed Mar 03, 2010 10:28 am

Post by Qphoria » Thu Apr 21, 2011 12:43 pm

it is possible... it is not "my answer" or whatever that meant ;)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 110 guests