Add Product Price to "Add to Cart" Button on Product Pages

Add Product Price to "Add to Cart" Button on Product Pages

getbodyfuel
Excursionist
16 0 5

Hi everyone,

I’m trying to add the product price inside the "Add to Cart" button on my product pages. I’ve tried multiple code solutions, but none have worked properly. One attempt only worked on product pages without a template, but not on those with templates.

 

What i want it to look like:
Screenshot_18.png
https://doreandrose.com/en-se/products/joiedevivrepillowcase?variant=43679627378918 

Heres my store: https://q0p3zs-fq.myshopify.com/products/test1?pr_prod_strat=e5_desc&pr_rec_id=2d29cad26&pr_rec_pid=... 

 

 

Does anyone know the correct way to add the product price inside the button on all product pages, regardless of whether they use a template or not?

Thanks in advance!

Reply 1 (1)

Small_Task_Help
Shopify Partner
1120 53 111


Hi,

You can try below

- Find the "Add to Cart" Button Code
code example

<button type="submit">
    {{ 'products.product.add_to_cart' | t }}
</button>

- Add Price to the Button

Modify the button code to include the price:

Code example

<button type="submit">
    {{ 'products.product.add_to_cart' | t }} - {{ product.price | money }}
</button>

Need to update another file called product-form.liquid inside the snippets folder,if your theme has dynamic button.

add css for styling if required

To Get Shopify Experts Help, Click Here or E-mail - hi@ecommercesmalltask.com
About Us - We are Shopify Expert India
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad