Tags/topics: 
3
Answers
Vote up!
0
Vote down!

Shipping based on terms

Hi!
I want to enable free shipiing for products from a specific category. Does anybdy have experience with this?

Thanks!

Asked by: JoniHaeck
on June 19, 2013

3 Answers

Vote up!
0
Vote down!

It's relatively easy as long as you want the entire order to be free shipping. What you do is create a loop around the line items in the order and bring in a component to actually enable the shipping rate on the order if one of the line items has a taxonomy term.

Here's an example flat rate shipping rule export that does this:

http://pastebin.com/ZBpY9p7E

And here's the component that implements the shipping rate:

http://pastebin.com/nj580KUs

Josh Miller
Answer by: Josh Miller
Posted: Jun 21, 2013

Comments

Vote up!
0
Vote down!

Hi,

I can't get this code to work and I've been googling for hours on this one.

Ideally I want the only shipping option to be flat rate "Pre-pack set shipping" if the order contains any product with term 'Pre-pack set"

I have a "Product Category" field on the product node view called "field_product_category" which is a term reference field.

I have Commerce Rules Extra but I can't get anything to do what I need, any pointers greatly appreciated.

Answer by: pipal
Posted: Jun 29, 2014
Vote up!
0
Vote down!

If any one else finds this, there's a module called Commerce Taxonomy Conditions - very useful!

Answer by: pipal
Posted: Jul 9, 2014