How is possible in magento 2.0? I successfully active in magento 1.9 for bellow thing. I am trying to create a product with two custom text fields: Length and Width. When the user types, both a length and width, the price needs to calculate via custom formula.
I'm trying to find the correct event to connect an observer. Anybody know what that might be?
Here's what I know and have tried:
- The custom field text box in the product view has an
onChangeevent that I haven't figured out how to tap into yet via an observer event
- If I build an observer on the event
sales_quote_add_item, then I can change the price via formula when it's added to the cart. With this method I still need a way to change it in the product view before it's added to cart.
I've also tried the event
catalog_product_get_final_pricebut this seem to only fire when the product page is loaded, so after a product length or width is added, it doesn't re-fire.
Any ideas would be greatly appreciated!