In a Commerce project, the customer should be able to choose between 2 options with a radio field, for some products only, with a different price for each option. When a customer selects a radio option, the unit price should be changed accordingly and with ajax, and the line item updated I guess.
We also need that the admin enter PRICE A, PRICE B in 2
commerce_price fields when he creates new products, not by rule calculation neither +90 or -100 as in Commerce Pricing Attributes (because prices vary a lot and having to calculate each price difference would be a source of errors).
At the moment the lone idea I got to configure this is :
- set a line item field with these radio options, shown in the add to cart form.
- Then or a pricing rule which detects if the 2nd price exists, and is selected ; sets the 2nd price as the unit price ?
Or programmatically, with some hook ? Any suggestion would be really helpful.