I'd like to rename the "Add to cart" button to "View now" on the catalog page and homepage only. However on the product view it should still state "Add to cart".

Which js files do I have to edit in order to achieve that?

  • for homepage check with file, which is loaded Jul 10, 2019 at 10:47

1 Answer 1


For homepage check with which file are you using.

for product list page override js file from path




you can changes text which you want to from this file.

  • I don't really understand your solution, could you elaborate? I am not so experienced so a step by step guide would be very useful.
    – warum7
    Jul 11, 2019 at 11:12
  • first goto vendor/magento/module-catalog/view/frontend/web/js/catalog-add-to-cart.js and copy this file, than paste here - app/design/frontend/yourthemename/yourpackagename/Magento_Catalog/web/js/catalog-add-to-cart.js than find 'Add to Cart' text and than replace. Jul 12, 2019 at 5:01

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.