Forums / Built-in Shipping and Payment Modules / exclude certain products from free shipping

exclude certain products from free shipping

Locked

Views: 8,094

Results 1 to 20 of 25
This thread is locked. New replies are disabled.
3 Dec 2006, 9:37 PM
#1
emtecmedia avatar

emtecmedia

Zen Follower

Join Date:
May 2005
Posts:
108
Plugin Contributions:
0

exclude certain products from free shipping

Hi,

I am using the Modules > Shipping > Allow Free shipping for orders over $100 but I would like to exclude a few certain products from this offer, is that possible?

Brad.

4 Dec 2006, 3:58 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: exclude certain products from free shipping

You would have to customize the ot_shipping.php to test for the presence of those products and know not to include their value in the amount being tested ... or exclude the whole order because they are present ...

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!

4 Dec 2006, 4:10 AM
#3
emtecmedia avatar

emtecmedia

Zen Follower

Join Date:
May 2005
Posts:
108
Plugin Contributions:
0

Re: exclude certain products from free shipping

That makes sense, are there any mods out there that do this already? Or is there anything similair i can work from/alter?

Thanks,
Brad.

4 Dec 2006, 4:26 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: exclude certain products from free shipping

Well ... you just need to grab all the products_id that are in the current cart and then test if they are in your "list" of products ... and if so do "something" either not allow free shipping or not use their values for free shipping or what have you ...

Another method, if you want to say:

if any products are not allowed to let Free shipping happen is to add a new field/flag to the products table ... then you can just test if any product in the cart has that flag or not set ... if set, and 1 means no free shipping, then you can stop the free shipping from happening ...

I am not a 100% sure the full extent of where you want to go with this ...

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!

5 Oct 2007, 5:51 PM
#5
jc8125 avatar

jc8125

Zen Follower

Join Date:
Oct 2007
Posts:
143
Plugin Contributions:
0

Re: exclude certain products from free shipping

Ajeh, for starters, thanks for all your help. this is my first post, but i've had many questions answered by reading these forums. :clap: anyway, could you help me pick up where this thread left off? i'm in a similar situation, looking to exclude certain heavy items from our current free shipping +$300 setting? i'm vaguely familiar with editing php, as well as the tables you refer to - but i'd need a bit of specifics. i'm thinking your second option of adding a product field and using it to flag the affected items would be best. after adding xyz field to the products table, could you (or someone) point me in the right direction for "telling" the free shipping to look for it and exclude? thanks!

5 Oct 2007, 8:03 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: exclude certain products from free shipping

If you are using the Free Shipping Options freeoptions shipping module, you could customize the code to allow setting of 2 conditions, one being total >= 300 and the other being weight <= XXXX

This can be done by altering the final tests on the module from OR to AND connectors ...

// final check for display of Free Options
      if ($this->ck_freeoptions_total or $this->ck_freeoptions_weight or $this->ck_freeoptions_items) {
        $this->enabled = true;
      } else {
        $this->enabled = false;
      }

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!

5 Dec 2007, 4:44 AM
#7
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Re: exclude certain products from free shipping

jc8125:

Ajeh, for starters, thanks for all your help. this is my first post, but i've had many questions answered by reading these forums. :clap: anyway, could you help me pick up where this thread left off? i'm in a similar situation, looking to exclude certain heavy items from our current free shipping +$300 setting? i'm vaguely familiar with editing php, as well as the tables you refer to - but i'd need a bit of specifics. i'm thinking your second option of adding a product field and using it to flag the affected items would be best. after adding xyz field to the products table, could you (or someone) point me in the right direction for "telling" the free shipping to look for it and exclude? thanks!

Did you work out how to write to code to have the free shipping options to check if the product is flag i.e. eligible for free shipping?

Because we would like to have our free shipping options to only offer free shipping if there is 25 of a certain product in the shopping cart. At the moment we have the amount set and the number of items set and changed the final check to AND instead of OR. This works ok but we would really like it just to be check for the certain product. I am sure I can easily workout how to add the extra field to the product table.

We want to offer the free shipping to all orders as long as it have the 25 or more of the certain product. So it can have other items too!

Thanks
Supersnow

18 Dec 2007, 7:38 PM
#8
dashizna avatar

dashizna

Zen Follower

Join Date:
Mar 2006
Posts:
424
Plugin Contributions:
0

Re: exclude certain products from free shipping

Yes we need to Do that same thing with flagging an item so that it can't qualify for the free shipping. We already use the if over 250 is free but if the weight is over 50Lbs its not so now we want to add the flag item part so we can make some of our items not qualified for free shipping even if they are over 250.00 and not over 50.00

Thanks

We sell ATV, Dirtbike, Streetbike, Snowmobile, Watercraft & Custom stickers & Banners. Check us out https://www.AD-DiscountPerformance.com

14 Jan 2008, 11:45 PM
#9
skylab001 avatar

skylab001

New Zenner

Join Date:
Jan 2008
Posts:
67
Plugin Contributions:
0

Re: exclude certain products from free shipping

wow I am in the same boat. I am looking to exclude certain heavy products from free shipping. We would like to be able to offer the Free Shipping on most items when the order total is over $100 unless there is a heavy product included. I have changed the OR to AND in the final check and this works OK(except when the order is big and the weight of all the small products exceeds our heavy limit), But we would have much more success just being able to check a box that will cause the item to always be excluded from free shipping no matter what, and just being able to set orders over $100 ship for free.

So has anybody been successful here? I've been racking my brain over this one but since I'm not really a php programmer I am completely at a loss. Any help would be appreciated!!

17 Jan 2008, 8:14 PM
#10
jc8125 avatar

jc8125

Zen Follower

Join Date:
Oct 2007
Posts:
143
Plugin Contributions:
0

Re: exclude certain products from free shipping

Another method, if you want to say: if any products are not allowed to let Free shipping happen is to add a new field/flag to the products table ... then you can just test if any product in the cart has that flag or not set ... if set, and 1 means no free shipping, then you can stop the free shipping from happening ...

skylab001- unfortunately i've been unable to accomplish this.. to be honest, it was put on the back burner for awhile - but i'm now looking back into this..

ajeh - i'm looking to do what you referenced in your above reply to emtecmedia..

i am familiar with how to add the field in the products table.. this would (i think) allow the customer to still receive free shipping for their "light" products, and only charge shipping for those especially heavy items which were flagged.

would you (or someone) be able to assist me with the php code to perform the check for this flag? or at least hold my hand a little to get me started? i hate asking you outright to generate the code for me - but i truly wouldn't know where to begin.

ps - just made a donation.. not that i'm trying to persuade you or anything. :P

25 May 2009, 10:49 PM
#11
lancemonotone avatar

lancemonotone

New Zenner

Join Date:
Oct 2008
Posts:
11
Plugin Contributions:
0

Re: exclude certain products from free shipping

This thread is rather old but I thought I'd post my solution in the attached zip file...feel free to use it or not.

I've modified the product configuration to allow any individual product to be excluded from Free Shipping by adding an extra radio button in the product's Free Shipping section on the admin page.

I've only tested it on the minimum cart total value. The idea is that if the total value of the cart triggers the Free Shipping module, the module checks to see if there are any items in the cart that should not get Free Shipping.

If the Free Shipping module would otherwise be triggered if those items are removed, (that is, if the total cart value still meets the criteria) the module short-circuits itself and sets a flag that there are Free Shipping items should be exempted from shipping charges buy removing their weights from the order (leaving only the exempted items + tare).

I also made the modifications for total cart weight and total cart items, but didn't test for those conditions. I'd love it if someone would let me know if they do. Heck, I'd love feedback of any sort. I wanted to use Observers to make this work but I didn't have time to research it.

Also, I only modified UPS and USPS. You can follow my example if you use other shipping mods.

27 May 2009, 4:07 AM
#12
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: exclude certain products from free shipping

lance made the first step moving towards a solution...but the codes has to be transfered to each specific site...therefore, a tutorial should be better.

7 Dec 2009, 6:39 PM
#13
gunnzo avatar

gunnzo

New Zenner

Join Date:
Dec 2008
Posts:
22
Plugin Contributions:
0

Re: exclude certain products from free shipping

I know that this post is kind of old, but i tried implementing the solution above and it came up with a unkown table in field error on the admin page when i trie dto edit a product. Any suggestions?

16 Aug 2010, 8:09 AM
#14
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: exclude certain products from free shipping

The attached files seems old now, and I'm still looking for the solution.

Is there any new add-on to provide this function now?

16 Aug 2010, 1:39 PM
#15
ajeh avatar

ajeh

Oba-san

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

Re: exclude certain products from free shipping

Could you provide some specific details as to what you are trying to do for your products on free shipping and how the free shipping products are distinguished from other products on your site? :unsure:

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!

17 Aug 2010, 10:43 AM
#16
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: exclude certain products from free shipping

I've have free shipping for order total over $100, but I wish to set up some products/categories to be excluded from this free shipping option.

(Using v1.3.8 now)

23 Aug 2010, 8:36 AM
#17
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: exclude certain products from free shipping

I guess the answer is no?

23 Aug 2010, 12:57 PM
#18
ajeh avatar

ajeh

Oba-san

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

Re: exclude certain products from free shipping

You would need to customize any code that uses:
MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER

to reduce the amount for these products ...

If you do a search in the Tools ... Developers Tool Kit ... in the bottom input box for:
MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER

and search the Catalog ... then click SEARCH ... you will see where this is used ...

It will look overwhelming at first ... but what it is doing is checking the total of the cart against the setting for MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER ...

You would need to adjust these for those particular products that cannot be free shipping so that their total does not count towards the free shipping ...

This is why I prefer the approach of using the Free Shipping Options freeoptions instead and offering that in addition to the regular shipping methods for when the order amount is over a certain amount and adjust the amount in the Free Shipping Options freeoptions shipping module ...

This saves having to customize the code in so many places ...

Plus, if you were using shipping, such as UPS, where there are numerous shipping methods, the customer can choose the Free Shipping ... or pick a faster method ...

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!

24 Aug 2010, 7:29 PM
#19
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: exclude certain products from free shipping

Thanks for your help.

Free Shipping Options is nice, but I just wanna put something "excluded" from Free Shipping Options, since they're already in special low prices.

I can't just add "necessary" shipping fees to these products, because shipping to different areas are totally different.

I guess that's why I need "Advenced Free Shipping Options" :p

28 Sep 2010, 3:18 AM
#20
mgoodwindesign avatar

mgoodwindesign

New Zenner

Join Date:
Feb 2010
Location:
Atlanta, GA
Posts:
15
Plugin Contributions:
0

Re: exclude certain products from free shipping

I've been reading through the different posts on excluding products from having free shipping applied to it but other than conceptual solutions I have not found any applicable solutions. I am not versed enough to create the needed code from scratch most of my coding is in modifying existing code to tweak things as needed.

here's what I have going on.

I have a category "SUPPLIES" with sub-categories under it and then I have a handful of other top level categories.

I am currently using the following shipping modules
Free Shipping Options with a total cost set to greater than equal to 350.
Store Pick Up with shipping cost being $0.00
UPS Shipping

What I need to be able to do is make it so that shipping is always applied to any product under the SUPPLIES category or any of the SUPPLIES sub-categories regardless of how little the weight value assigned to the product is. I only want to apply free shipping for total cost over $350 to products outside of the SUPPLIES category.

So as I understand the concepts:

I need to modify the free shipping options module to to check products in cart and only tally the total price of products who's category is not equal to SUPPLIES or SUPPLIES sub-categories. IF the total of these products is equal or greater than $350 apply free shipping option for those items and apply appropriate shipping rates for all items from the SUPPLIES category.

If I have read things correctly I believe there is also manipulation that needs to be done to the OT_SHIPPING module file but I am not certain of what it is that needs to be done within that file.

Now the kicker is... I have no idea how to code this in order to make this happen. I've seen a lot of code posted on here to help with other solutions and I did see a previous request for code in this thread but I have not found anything that I could even begin to manipulate and test with regards to this need. Also, file file attached to this thread throws errors when trying to edit products in the catalog trying to make calls to database fields that don't exist so I doubt it is worth me looking at that code because of it being so out dated.

thanks in advance

mg