I have a variety of products that have different fixed shipping prices. Each product has a custom field associated with it that contains a decimal price for shipping. Using Flat Rate Shipping, on the event "Calculating a shipping rate", how may I go about bringing in the custom field (scoping) to calculate that shipping price?
It's probably easier to have multiple flat rates, and a conditional rule that the product for that price is in the cart.
- There's a commerce shipping rules module that has a "cart contains item" condition.
- If you could get at the logic behind the prices you could deal with this more easily, like weight based or size based shipping. For hundreds of products it's unreasonable that there's no logic behind it outside of what they want to charge for shipping. What I could think of is a custom module using hook_commerce shipping method alter where the shipping method matched the shipping price in the field. I've written a small module that alters the shipping weight, but that again assumes logic the weight based shipping.