- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
seeking help on changing add to cart text and link.
I already tried to modify addtocart.phtml (made a copy on my custom theme to edit)
ran setup:upgrade , cache:clean
but it didnt change the text.
Any help would be appreciated, Thanks!
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @gerald_cruz1
Method 1:
Override js file from path
vendor/magento/module-catalog/view/frontend/web/js/catalog-add-to-cart.js
to
app/design/frontend/YourTheme/Packadge/Magento_Catalog/web/js/catalog-add-to-cart.js
Change the text which you want to from this file.
Method 2:
The shortest way is to enable translate inline and change the add to cart button text.
Add to cart button type is "submit" so you can enable template hint path in Configuration -> Developer -> Debug -> Enable Template Path Hints for Storefront and change the form action in which file call add to cart button.
You can refer https://meetanshi.com/blog/enable-template-path-hints-in-magento-2/
Hope one of the above methods is helpful.
If you've found my answer useful, please give"Kudos" and "Accept as Solution"
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @gerald_cruz1
Method 1:
Override js file from path
vendor/magento/module-catalog/view/frontend/web/js/catalog-add-to-cart.js
to
app/design/frontend/YourTheme/Packadge/Magento_Catalog/web/js/catalog-add-to-cart.js
Change the text which you want to from this file.
Method 2:
The shortest way is to enable translate inline and change the add to cart button text.
Add to cart button type is "submit" so you can enable template hint path in Configuration -> Developer -> Debug -> Enable Template Path Hints for Storefront and change the form action in which file call add to cart button.
You can refer https://meetanshi.com/blog/enable-template-path-hints-in-magento-2/
Hope one of the above methods is helpful.
If you've found my answer useful, please give"Kudos" and "Accept as Solution"
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Changing Add to cart text and link
Hi sir @Meetanshi! this worked for me! thank you so much!