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

2 Answers 2


You need to make changes in price-box.js which is placed at


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>'


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

I used magento 2.4.3
I modified this file in line 20 and it works correctly
try this


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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