I create one Module and make a custom form which is display in the catalog product view page.
when the customer change option from dropdown then the product price will change and also that updated price goto cart.
Magento 2 – Programmatically Update Product Price and Add to Cart
catalogmagento2.3PHPprogrammatically
Best Answer
Try this,
Use checkout_cart_product_add_after
Create a module and add events.xml in following path
Add the below code in it
then add observer in the below path
add below code in it
To move your custom form inputs to add to cart form in below way.
Add the catalog_product_view.xml then add the below code in it
then copy the form.phtml from vendor in order to override and move your input fields to there as per your requirements.
To
Hope this helps :)