Editing the Add To Cart button on Product Page - THEME: DAWN

Solved

Editing the Add To Cart button on Product Page - THEME: DAWN

simlulu
Tourist
24 0 3

Hey! How can I edit the product page's ADD_TO_CART Button. I want it to simply display the price of the respective product (just like how it does on my home page) Thanks!
https://www.colomojofindz.com/products/warm-light-saturn-nebula-moon-bedside-nightlight-luminous-cry...

Accepted Solution (1)

HazilStudiosNYC
Shopify Partner
139 23 26

This is an accepted solution.

You would want to do this via code:

1. Create e duplicate of your theme 
2. In the duplicate, click the three dots -> Edit Code
3. In the code editor, search for the file (top left) "buy-buttons.liquid" (click it)
4. In the file, search for "products.product.add_to_cart" should be around line 92 (depending on theme version)
4. Replace the entire line with:

{{ 'products.product.add_to_cart' | t }} {{ product.selected_or_first_available_variant.price | money }}


It will look like this
Screenshot 2024-09-01 at 11.53.00 AM.png 

Let me know if this was helpful.

Flo | Co-Founder and CEO; Hazil - Shopify Mentorship
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
-
Want fast help? Chat with me

View solution in original post

Replies 2 (2)

HazilStudiosNYC
Shopify Partner
139 23 26

This is an accepted solution.

You would want to do this via code:

1. Create e duplicate of your theme 
2. In the duplicate, click the three dots -> Edit Code
3. In the code editor, search for the file (top left) "buy-buttons.liquid" (click it)
4. In the file, search for "products.product.add_to_cart" should be around line 92 (depending on theme version)
4. Replace the entire line with:

{{ 'products.product.add_to_cart' | t }} {{ product.selected_or_first_available_variant.price | money }}


It will look like this
Screenshot 2024-09-01 at 11.53.00 AM.png 

Let me know if this was helpful.

Flo | Co-Founder and CEO; Hazil - Shopify Mentorship
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
-
Want fast help? Chat with me
simlulu
Tourist
24 0 3

thank you so much!