Per Product Shipping Buggy
I followed Randy Fay's video screencast (https://vimeo.com/32813567) to show how to add per-item shipping, however I am having and issue I can't seem to resolve. Here is an example (I have $3 per item setup):
- Add something to cart
- Go checkout (add the appropriate address info) and click Continue
- Goes to the Shipping page and shows the correct dollar amount for shipping and click Continue
- Finally on the Review order page and the shipping still looks OK, however if I click the Go Back link
- I got to the Shipping page and now it adds another $3.00 so one item is now $6. The think it's not being doubled, it's just another $3 being added so if I added 2 items it'll be $6 for shipping until I click the Go Back link then it'll be $9.00.
Here is an export of my Per-Item Shipping Calculation Rule (if that helps):
{ "rules_per_item_shipping_calcualtion" : {
"LABEL" : "Per Item Shipping Calcualtion",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "commerce_line_item", "commerce_shipping" ],
"ON" : [ "commerce_shipping_calculate_rate" ],
"DO" : [
{ "LOOP" : {
"USING" : { "list" : [ "commerce-line-item:order:commerce-line-items" ] },
"ITEM" : { "line_item" : "Line Item" },
"DO" : [
{ "data_calc" : {
"USING" : { "input_1" : [ "line-item:quantity" ], "op" : "*", "input_2" : "300" },
"PROVIDE" : { "result" : { "calculated_line_item_shipping" : "Calculated Line Item Shipping" } }
}
},
{ "commerce_line_item_unit_price_add" : {
"commerce_line_item" : [ "commerce_line_item" ],
"amount" : [ "calculated-line-item-shipping" ],
"component_name" : "flat_rate_per_item_shipping",
"round_mode" : "0"
}
}
]
}
}
]
}
}
Also here are the versions of Commerce modules I am using:
Drupal Commerce 7.x-1.3+51-dev (I just went to dev to see if it would help anything....)
Commerce Shipping 7.x-2.0-beta1
Commerce Flat Rate 7.x-1.x-dev
Drupal 7.15
I tried contacting Randy Fay directly via Twitter, however he said he's "very rusty on commerce stuff" and recommended for me to hit up #drupal-commerce. I haven't had much luck on IRC, so I trying here now, so I really appreciate any help.
Thanks,
Brent