How to add some text before price of product in product details page . for
example:- price - $200.00.
Guys any suggestion from your end.Thanks
You need to make changes in price-box.js
which is placed at
/vendor/magento/module-catalog/view/base/web/js/price-box.js
Make sure you take this js in your custom theme folder and make changes on line number 22 near
priceTemplate: '<span class="price"><%- data.formatted %></span>'
Add your custom text after <span class="price">
Some thing like this,
priceTemplate: '<span class="price">Price - <%- data.formatted %></span>'
Done.
I used magento 2.4.3
I modified this file in line 20 and it works correctly
try this
/vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml/default.phtml