Spy on Your Competitors - Extended Free Trial!  GO!
How To Add An “Add To Cart” Button In Shopify

How To Add An “Add To Cart” Button In Shopify

Last modified: May 8, 2020

FAQ
Shopify Trial

Shopify is one of the most robust eCommerce platforms available online. And the centre of the success is the ‘Add To Cart’ button. It’s the starting point for any conversion of a website visitor into a customer. And you should ensure that you have the ‘Add To Cart’ button prominently placed on your website, where relevant.

You can even add it to different places on your website. So here is how you can add a ‘Add To Cart’ button to anywhere on your website.

Show More

* This button will show the rest of the post and open up an offer from Shopify

Step 1 – Login

Sign into your store using your Shopify credentials.

Step 2 – Themes

Head over to the ‘Themes’ section in the Shopify admin panel, which you’ll land upon when you first log in.

Step 3 – Edit Code

In the ‘Actions’ drop-down option of your current theme section, find and choose the ‘Edit Code’ option. This will open the ‘Shopify Theme Editor’ that will contain the coding for your store’s theme.

Step 4 – Choose File

Find and choose the file where you wish to add the ‘Add To Cart’ button.

Step 5 – Insert Code

Now insert the following code into the file.

<form action="/cart/add" method="post" id="product-form- {{ product.id }}">
<input type="hidden" name="id" value="{{ product.variants.first.id }}">
<div>
<button type="submit" name="add">Add to cart</button>
</div>
</form>

You can click on the ‘Preview’ button to confirm the changes have been made.

Step 6 – Save

Now click on the ‘Save’ option. This will complete the process.

Final Word

There are lots of apps you can also use to add the button to your website. Or you could make your ‘Add-to-cart’ button sticky with these apps.

Recap:
Got Something To Say?

Your email address will not be published. Required fields are marked *

Free Trial