How to alter 'Add to Cart' and 'Check Out' button texts separately?

How to alter 'Add to Cart' and 'Check Out' button texts separately?

nicolasake
Excursionist
36 0 12

Hello,

 

I'm facing an issue with the product page and the cart.

 

When I modify the text in the ADD TO CART button, the text in the Cart is modified too.

 

So, for example, if I have the  ADD TO CART text in the product page, I get the same ADD TO CART text in the cart button.

 

I would like to have ADD TO CART in the product page button and CHECK OUT in the Cart button.

 

Thanks to anyone who can help! 🙂

 

www.sakesommelierassociation.itScreenshot 2023-05-30 alle 10.22.41.png

Replies 4 (4)

NomtechSolution
Astronaut
1245 113 153
  1. Locate the code for the "Add to Cart" button on the product page. This code is typically found in the product template file, such as product.liquid or product-template.liquid.

 

<button type="submit" class="add-to-cart-btn">ADD TO CART</button>

 

nicolasake
Excursionist
36 0 12

@NomtechSolution I can't actually find that line inside product.liquid.

 

I'm using Turbo Theme and, at first, these buttons were empty and there was no way to add text through the editor.

 

I was told to add this code in sections.js.liquid: Screenshot 2023-05-30 alle 10.57.16.png

NomtechSolution
Astronaut
1245 113 153

Code can be added in theme files  by clicking edit code and then you can add js code in theme.js file

nicolasake
Excursionist
36 0 12

@NomtechSolution Sorry but that doesn't work. When I tried it deleted all the buttons in the product page.