I am using Drupal Commerce. My requirement is that I want to apply conditional shipping to the order.

The conditions to apply shipping are:-

There are two types of products available for the purchase - Heavy items and Lighter items (This is taxonomy term field associated with each product).

1. If order contains only products which are lighter items (can be more than 1 product but all are lighter items) then the shipping cost will be $14.
2. If order contains one (or more than one) heavy item and one (or more than one) lighter item then the shipping cost will be $45.
3. If order contains only products which are heavy items (can be more than 1 product but all are heavy items) then the shipping cost will be $45.
4. If order contains at least one heavy item then the shipping cost will be $45.

Please help me to create new rule (or modify existing) to add shipping cost to the order.

Thanks,

Comments

mmjvb’s picture

1. If order contains only products which are lighter items (can be more than 1 product but all are lighter items) then the shipping cost will be $14.
2. If order contains one (or more than one) heavy item and one (or more than one) lighter item then the shipping cost will be $45.
3. If order contains only products which are heavy items (can be more than 1 product but all are heavy items) then the shipping cost will be $45.
4. If order contains at least one heavy item then the shipping cost will be $45.

1 and 4 make 2 & 3 redundant. 2 & 3 are covered by 4.

Agree? Still need help on the rule or did I misunderstand?

hiramanpatil’s picture

Hi @mmjvb,
Thanks for the reply.

Sorry, if it is too complicated. I want to apply two types shipping based on product type.

For example:-
Heavy Items - $45
Lighter Items - $14

If there is any heavy item in a cart/order then the shipping will be $45 otherwise it will be $14 (if all products in a cart are lighter).

Cart contains:-
1 heavy item and 3 lighter items - $45 shipping.
3 lighter items - $14 shipping.
1 heavy item - $45 shipping.

Note - Shipping amount will be either $45 or $14 for n number of products in a cart.

Hope its clear now.

Thanks