Update Product Price in Product Display?
I have Created a custom line item type and a custom display as per Randy's Awesome screencasts.
In my Custom Line Item Type I have added a Radio Button-Type List Field.
I have created a product pricing rule that says "if a certain option is selected add $15 to the price"
Everything works as planned HOWEVER......
How do I get the price in my product display to dynamically update when this option is selected? As it is right now, the newly calculated price is displayed in the shopping cart but you don't see it until the product is added to the cart.
Is there a way to use rules to do this or will this require a module to be written?
Thanks for any help.
Comments
Use the coupon example as a model
If I'm not mistaken you're doing basically what the [Quick and Dirty Coupon](http://www.commerceguys.com/resources/articles/240) tutorial demonstrated. Take a look at that and see if it helps. You can use rules to explicitly set the discount/addition amount, or you can pull the amount in from another field.
Thanks for the reply Randy. I
Thanks for the reply Randy. I have watched your Coupon tutorial and Yes you are right. It pretty much does what I want.
However There is one thing it doesn't do.
Dynamically update the current price in the product display node.
Lets say I have a product worth 10 dollars. I have 4 radio button options attached to this Product display through the line item.
If option 2 is clicked, I want it to add 5 dollars to the price. So far, this works as long as the product is added to the cart.
I would like the price shown on the product display node to dynamically add the 5 dollars to the price "onclick".
So. Immediately the customer knows how much their product is now that they selected option 2. If they select option 1 again the price shown will update once again removing that 5 dollars.
I hope that clears up what I'm trying to say.
Works fine with product variants...
Well, that would work fine with [different product variants](http://www.drupalcommerce.org/faq/product-attributes), which is easy to do (it's the standard, original Commerce approach - I have a screencast about it somewhere). I don't know how to do it without doing the different product variants as in that technique.