Magento – Magento 2 : Custom Option Price + Finale Price = Show Total =>How

custom-optionsmagento2

Product Price: 100 USD
Custom Option: Premium: +50
Custom Option: Exclusieve: +100

I want it to show: 150USD. (instead of +50) if i choose Premium and 200(instead of +100) if i choose exclusieve.

public_html/vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml

This is the file: But i can't get the finale price to work so i could sum it up.

Best Answer

open file vendor/magento/module-catalog/view/base/web/js/price-options.js

add line

value = value + parseInt(jQuery('.product-info-main .product-info-price .price-wrapper ').attr('data-price-amount'));

at line number 185

this changes in core file you can also override this file and change

run the command

php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
php bin/magento cache:clean
Related Topic