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.
Printable View
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.
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 ...
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.
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 ...
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!
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 ...
PHP Code:
// 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;
}
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!
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
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!!
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..Quote:
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 ...
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
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.
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.
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?
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?
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:
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)
I guess the answer is no?
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 ...
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
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
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 ...
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
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:
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
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 ...