Add - add to cart- button on home page collection

Add - add to cart- button on home page collection

Adri
Tourist
5 0 1

Hi, I am using dawn theme 1. 0. 9 I want to add the add to cart button in the collection in the home page not just in products. Could you please help me? www.sentientthebrand.com 

 

Thanks!

Replies 2 (2)

PaulNewton
Shopify Partner
7108 631 1484

Hi @Adri if a theme doesn't already have a setting to enable this behavior then it's an advanced theme customization to add product forms to certain sections.

 

To DIY you'd have to find the relevant section in the code editor and add a product form to the relevant area of code and style any buttons, etc.

https://shopify.dev/docs/storefronts/themes/architecture/templates/product#the-product-form 

For Dawn based themes also see the github repo's quickadd behaviors

https://github.com/search?q=repo%3AShopify%2Fdawn+quickadd&type=code 

 

If you need this customization implemented for you then contact me by for services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

 

Contact [email protected] for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


PaulMartin
Shopify Partner
576 57 136

Hi Adri,

To add an add to cart button in the cards in your home page, your theme's code needs to be changed. Specifically, you'll need to, first, locate the code for the product card. Then, edit the card's code to include a button to add such product to cart. The code for such button would look like:

{% form 'product' %}
  <!-- form content -->

  <input type="submit" value="Add to cart">
{% endform %}


Please note that the code example I gave is just a basic example. It's quite difficult to give code that will work for your specific theme.

After adding this (plus some additional code to ensure it works well with your theme), you'll then be able to have an add to cart button for the cards in your home page 👌

Hope this helps and if you have any questions, feel free to ask here or through my contact email below! 🙂👍

If you feel that this is quite a complicated task for you to do, I'd be happy to take this off of your hands for a $25 fee. I'll make sure that I'll be able to add your desired add-to-cart button in the home page according to your specific requirements. In addition to that, I'll also make sure that this will work well with your theme and make it feel like a built-in feature instead of it being added. Let me know if you're interested so that I'll be doing all of this for you! Feel free to reply or contact me thru my email below 🙂👌

[email protected]
Feel free to email me! 😄
I'm open to conversations or work ʕ •ᴥ•ʔ