So can someone plz tell me step for step how to set different Shipping Method for Different Categories?
My Site:
Normal Category
- Free Shipping
FastSend Category
- Cost €XX
So can someone plz tell me step for step how to set different Shipping Method for Different Categories?
My Site:
Normal Category
- Free Shipping
FastSend Category
- Cost €XX
I'm sooooo close thanks to this thread.
I have a free shipping category. I want my free shipping options to ONLY show up when all items in the cart are Free Shipping items.
If someone adds anything that is not free shipping, I want the option hidden.
Here's what I have so far:
- I have my free shipping items located in a master category called Free Shipping.
- I installed FedEx and USPS modules.
- I cloned the free shipping options module to freesoptionshide.
- I added this to my new freeoptionshide module:
The problem with this logic is that if someone adds anything from the Free Shipping category, the whole order, including non-free-shipping-items, now has the option of free shipping.PHP Code:// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FREEOPTIONSHIDE_STATUS == 'False') ? true : false);
}
// enable for one master_category (free shipping)
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','17') > 0)) {
$this->enabled = true;
}
How do I force the free shipping to only show when the entire cart is free shipping?
I think it would be easier to specify free shipping on a per item basis when you enter items into your catalog (radio button "always free shipping"). then that item isn't calculated in your shipping quote. and free shipping only kicks in when the entire order has no shipping cost. that's a vanilla feature of ZC. :-)
I'm not sure what difference it would make to force shipping calculations on free items when they're in a mixed order. the customer will just place two separate orders. one with free shipping. one without.
I do use the "Yes, Always Free Shipping" option on the free shipping items, but to make a free shipping icon show up on those items, I need to also place them in a Free Shipping master category.
This is the scenario without any of my changes to the freeoptions module.
- Place ONLY a free shipping item in the cart, and there is the option for free shipping, as well as FedEx shipping options.
- Place ONLY a normal shipping item in the cart, and free shipping option still shows up. Not good!
With my changes to the freeoptions module (freeoptionshide) this is what I get.
- Place ONLY a free shipping item in the cart, and there is the option for free shipping, as well as FedEx options.
- Place ONLY a normal shipping item in the cart, and only the FedEx options show up. Good!
- Place BOTH a free shipping and normal shipping item in the cart, and now there is the option for free shipping. Not good!
Well, I've managed to somehow get it working. I'm no coder, so if this has the potential to break anything major, please let me know!
That was all I needed.PHP Code:// enable only when entire cart is free shipping
if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('product_is_always_free_shipping','1') == $_SESSION['cart']->count_contents()) {
$this->enabled = true;
}
// disable when entire cart is not free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FREEOPTIONSHIDE_STATUS == 'False') ? true : false);
}
Now:
- Add ONLY a free shipping item to the cart, you get free shipping option as well as normal shipping options.
- Add ONLY a normal item to the cart, you get only the normal shipping options.
- Add BOTH a free shipping item and a normal item, you get only the normal shipping options.
I also have this restricted to the continental 48 states. Shipping to Hawaii, Alaska, etc gives only the option of normal shipping.
Hopefully this helps someone else who needs the same feature.
Hey. This seems a simple edit but it doesn't work for me. Could it have anything to do with the fact that i used the Ultimate SEO Urls contribution and so the category numbers don't show up in my Urls?
Hey
Thanks for getting back to me. I'm talking about the original edit:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false);
}
// disable for one master_categories_id
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','17') > 0)) {
$this->enabled = false;
}
Still can't figure what i'm doing wrong as it seems dead straight forward!
I thanks for the reply. Yes, i did change it to the right category id. There are subcategories under it before you reach the products - does this matter? I did also try putting the subcategory id however and this didn't work either! Still miffed!![]()