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

exclude certain products from free shipping

Locked

Views: 8,094

Results 21 to 25 of 25
This thread is locked. New replies are disabled.
28 Sep 2010, 2:43 PM
#21
ajeh avatar

ajeh

Oba-san

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

exclude certain products from free shipping

Fortunately, you are using for the Free Shipping >= 350 the shipping module Free Shipping Options freeoptions ...

This means you can customize the one file:
/includes/modules/shipping/freeoptions.php

to manage the Products that are making up the 350.00 that it is looking for to give the Free Shipping ...

Now for a few questions ...

On all of these Product where the shipping is not suppose to be part of the $350.00 ...

They are in Categories ... if they are in Category with categories_id 27 ... would the master_categories_id of all of these Products also be 27?

The question being, for each Category's categories_id does the related Products use that as the master_categories_id ...

NOTE: do not look at the Parent Categories ... be sure to look at the immediate Categories that hold the Products themselves ...

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!

28 Sep 2010, 3:24 PM
#22
mgoodwindesign avatar

mgoodwindesign

New Zenner

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

Re: exclude certain products from free shipping

Ajeh:

They are in Categories ... if they are in Category with categories_id 27 ... would the master_categories_id of all of these Products also be 27?

The question being, for each Category's categories_id does the related Products use that as the master_categories_id ...

NOTE: do not look at the Parent Categories ... be sure to look at the immediate Categories that hold the Products themselves ...

Thanks for the quick response.

I am a little confused by the "master_categories_id" you are asking about but I think I can further clarify anyhow. I believe what you are meaning with master_categories_id relates to products that might be linked to other categories like linked to specials. Yes the categories that the products are is their master category.

I know you said not to look at the Parent categories but this explanation includes parent for organizational purposes. I have the categories_id listed next to each category. I have not included all of my categories and sub-categories but I only have at most a 2 level tree of categories products residing in the sub-categories if there are sub-categories.

161 Supplies
162 Top Loaders
163 Magnetic Holders
165 Pages
166 Albums / Binders
167 Card Sleeves
168 Snap Boxes
169 Hinged Boxes
170 Screw Downs
171 Memrobilia Cases

29 Baseball Boxes
42 Pre-Sell
156 2010
145 2009
**
7 Baseball Cases**
13 Pre-Sell
157 2010
146 2009

31 Football Boxes

8 Football Cases

131 Memorabilia

All of the Sub-categories listed under Supplies are the current list BUT it is possible for there to be other sub-categories created without my knowledge the only constant I can guarantee is the Supplies parent category, I can't guarantee the sub-categories wont be added to or removed from the list. All products located in ALL sub-categories for the SUPPLIES category must be excluded from Free Shipping. All other categories and sub-categories qualify for Free Shipping.

I hope this answers your questions

28 Sep 2010, 3:32 PM
#23
ajeh avatar

ajeh

Oba-san

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

Re: exclude certain products from free shipping

Yes, this can be customized based on the Top Level categories_id providing the Categories within that branch of the Categories tree are the master_categories_id ... and that all of the Products to those master_categories_id should be excluded ...

Working from the Parent Category, does have advantages for, as you indicated, future growth to that Category where you don't want to have to go in and adjust the code each time you add a new Category that should be excluded within that branch ...

NOTE: as you are using the Free Shipping Options freeoptions shipping module, this makes things a lot easier as this shipping module is offered as an alternative to your other shipping modules and, unlike the Free Shipping freeshipper shipping module which is offered in place of the other shipping modules, which would require a great deal of additional customization to alter ...

It would take me awhile to work out all of the code for this, but it can be done ... :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!

28 Sep 2010, 4:06 PM
#24
mgoodwindesign avatar

mgoodwindesign

New Zenner

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

Re: exclude certain products from free shipping

Yes, they are the master_categories_id and ALL of the products to those master_categories_id are to be excluded.

Yes, working with the Parent Category is prefered.

I apprecitiate your assistance with this code... I'm sure the application of this code would be beneficial for others as well.

mg

28 Sep 2010, 4:15 PM
#25
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 can try doing a search on:
$_SESSION['cart']->in_cart_check

for examples of how to test the for things ... from the results of testing if any Products use the master_categories_id you can get the charges for those Products and build the amount to reduce the amount for the Free Shipping Options ...

As I say, this would take quite some work to code this, but once done, you would be able to add/remove Categories and Products and the Free Shipping Options freeoptions would automatically adjust the calculations to handle when to show or not show on the checkout ...

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!