Shipping Discount for Item in Cart using Calculation Rules
In this screencast I'll show how to offer a shipping discount based on whether a particular item is in the cart.
* Create a baseline shipping service. I use "Flat rate shipping" for $10.00.
* Add a "Calculation Rule" with three conditions and one action
* Condition: Entity has field "commerce_shipping_service", to bring the shipping service field into scope.
* Condition: Data comparison commerce_line_item:commerce_shipping_service = "Flat Rate".
* Condition: Order contains a product, product SKU = "NINETYNINE", the SKU of my demonstration product.
* Action: Subtract an amount from the unit price (and subtract 500, or $5.00)
In real life you may want to add an extra condition to check that the line item unit price is greater than 500 before subtracting from it, as we don't want to be giving them money.