1

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

4

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.

  • How to add this text only for old price? It gets added for special price also.. – aravind Dec 14 '18 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.