Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

We have a drupalcommerce website through which we sale

  • iptv box
  • qwerty key board

on adding first product it adds 15 dollars( base rate ) + 5 dollars per item in cart, so if we have 1 item in cart the shipping is 20 dollar but if we have 2 products the shipping will be 25 dollars and so on.

problem is, we want to setup separate shipping rate for qwerty key board if there is only a qwerty key board alone in cart the shipping must be 5 dollars.

I hope this can be done through shipping rules

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You can add a shipping service dedicated for for qwerty key board and similar items and a shipping calculation that checks for a certain product in the cart. Use: Event: Calculating a shipping rate Condition: order contain a particular product. Action:Add a rate for a shipping service to an order and select the shipping service that is dedicated for qwerty key board and similar items.

It may be easier for you to clone one of the existing shipping rate calculation and edit as needed.

share|improve this answer
    
if order contains product A it adds 10 dollars to all items in the cart and if order contains product B, it adds another dollar 5 per product in shipping –  Fahad Dec 17 '12 at 3:47
    
Try this method: drupalcommerce.org/videos/demo/… it utilizes a flat rate shipping for the base rate and calculation rules to add any amount to every item. You may need to have one calculation rule for every product type (+$5 and +$10). You will also have to provide a calculation for what happen if both products are in the cart. –  ahimsauzi Dec 18 '12 at 6:18
    
I have already seen that video, in-fact that is what I used to configure shipping rule which adds a dollar 5 to the base rate for each item added in the cart. But there is no clue to setup separate shipping rate for different product types. –  Fahad Dec 18 '12 at 15:41
    
Is there a way we can loop action to line items of specific product types or sku. –  Fahad Dec 18 '12 at 15:43
    
I would create a separate rule for each sku and run a loop through the line items(commerce-line-item:order:commerce-line-items) is condition is true. –  ahimsauzi Dec 18 '12 at 18:29

This video shows how to set up seperate shipping costs per line item http://www.youtube.com/watch?v=g3zQ3OMxUdQ&feature=youtu.be

share|improve this answer
    
Welcome to Drupal Answers! On this site it is generally considered bad habit to post link-only answers. Have a look at the help center to find out more about writing good answers. Please add some additional details that make your answer independant of the linked video. –  berliner Mar 9 at 15:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.