Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Debut Theme: Add to Cart button on homepage/collection pages

Solved

Debut Theme: Add to Cart button on homepage/collection pages

cdanielc
Tourist
16 0 1

Hi,

This question has been raised a few times, but I can't get it up and working (outdated posts?) and I have an additional question regarding the design. 

As I am using Debut theme there is by default no "add to cart" button below the products on the homepage/collection pages. I would like to add an "add to cart" button in the same style as if you would create a Buy button for an external site  (Sales Channels > Buy button > Create a buy button). Please find an image below.

Can anyone help me out? Thanks in advance!

Buy buttonBuy button




Accepted Solution (1)

KetanKumar
Shopify Partner
37363 3656 12099

This is an accepted solution.

@cdanielc 

can you please try this 

Just follow the steps for Debut theme for Add to cart button on collection pages.

  • From Shopify Admin select Online Store and click on Themes
  • Choose your main theme
  • Click the . . . on the top left-right (see below) and hit Edit code
  • Open Snippets -> product-card-grid.liquid File and paste below code at the end of the page.
    <form method="post" action="/cart/add">
      <input type="hidden" name="id" value="{{ product.variants.first.id }}" />
      <input min="1" type="number" id="quantity" name="quantity" value="1"/>
      <input type="submit" value="Add to cart" class="btn" />
    </form>
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

View solution in original post

Replies 114 (114)

KetanKumar
Shopify Partner
37363 3656 12099

This is an accepted solution.

@cdanielc 

can you please try this 

Just follow the steps for Debut theme for Add to cart button on collection pages.

  • From Shopify Admin select Online Store and click on Themes
  • Choose your main theme
  • Click the . . . on the top left-right (see below) and hit Edit code
  • Open Snippets -> product-card-grid.liquid File and paste below code at the end of the page.
    <form method="post" action="/cart/add">
      <input type="hidden" name="id" value="{{ product.variants.first.id }}" />
      <input min="1" type="number" id="quantity" name="quantity" value="1"/>
      <input type="submit" value="Add to cart" class="btn" />
    </form>
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Robertjl
Visitor
1 0 1

Hello. I also have problem with no “add cart” button, I didn’t notice it at first, but when after editing my shipping and delivery that’s the time I notice that there is no add cart. I’m using minimal theme. Thank you 

KetanKumar
Shopify Partner
37363 3656 12099

@Robertjl 

Sorry for facing this issue, it's my pleasure to help us.

Welcome to the Shopify community!
and Thanks for your Good question. 😊

Please share your site URL,
So I will check and provide a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
SkynSin
Excursionist
18 0 9

Hi @KetanKumar , I noticed you managed to help some other Shopify store owners with this issue. I'm facing the same issue now trying to align my Add to cart buttons on my collection page.

Screenshot 2021-01-30 at 19.04.53.png

1. I'd like to make it so the Add to Cart button is in line with the Quantity.

2. I'd like to fix the height o the Product title so that the Quantity and Add to cart line will be aligned.

Would appreciate your help with this. Thank you!

 

Kristyn

KetanKumar
Shopify Partner
37363 3656 12099

@SkynSin 

Sorry for facing this issue, it's my pleasure to help us.

Welcome to the Shopify community!
and Thanks for your Good question. 😊

Please share your site URL,
So I will check and provide a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
SkynSin
Excursionist
18 0 9
Hi, thanks for replying!

This is my URL: SkynSin.com
SkynSin
Excursionist
18 0 9

Hi @KetanKumar  , thanks for replying!

This is my URL: SkynSin.com

KetanKumar
Shopify Partner
37363 3656 12099

@SkynSin 

is this fine look?

KetanKumar_0-1612020297800.png

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
SkynSin
Excursionist
18 0 9

Hi @KetanKumar 

Yes that looks better! But can the Product Title be in line with the picture and the Quantity line?

Screenshot 2021-01-31 at 01.35.28.png

Thanks!

KetanKumar
Shopify Partner
37363 3656 12099

@SkynSin 

yes, please add this code

1. Go to Online Store->Theme->Edit code
2. Asset->/theme.css ->paste below code at the bottom of the file.
this code apply for after 5 - 6 second

.product-card + form {
    display: flex;
    justify-content: space-between;
}
.product-card + form input {
    width: 70%;
}
.product-card + form input#quantity {
    width: 25%;
}

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
SkynSin
Excursionist
18 0 9

Hi @KetanKumar, I applied it and waited for a while but it still doesn't seem to be working?

KetanKumar
Shopify Partner
37363 3656 12099

@SkynSin 

oh, what's an issue can you please us after add above code

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
SkynSin
Excursionist
18 0 9

Hi @KetanKumar , I've added the above code as follows but the edits are not appearing on my collection page: https://skynsin.com/collections/single-sheet-mask

Screenshot 2021-01-31 at 23.59.58.png

Grateful for your assistance! Thanks.

KetanKumar
Shopify Partner
37363 3656 12099

@SkynSin 

KetanKumar_0-1612188462998.png

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Mayaps
Tourist
3 0 2

HI @KetanKumar  how are you. notice you helped other users that have similar problem than me. I was able to put the add to cart button buy I would like to put it besides the box to inlcude quantity, not below. Please do you know how to do this? my website is https://carnavalmayorista.myshopify.com/  password for now is mayorista   Also just if you know, can I remove the box were it says "oferta" (sale in spanish)??? Thanks so much!

Mayaps_1-1613504895341.png

 

 

 

KetanKumar
Shopify Partner
37363 3656 12099

@Mayaps 

Sorry you are facing this issue, it would be my pleasure to help you.

i can't see now do you have fix?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Mayaps
Tourist
3 0 2

HI, hope you a re doing good.

I was able to remove the sale box, but still cannot find how to put the Add to cart box besides the qty box in colecction page and in product page also. I use debut theme. https://carnavalmayorista.myshopify.com/ password mayorista

 

Mayaps_0-1613571872624.png

Mayaps_1-1613571945558.png

 

KetanKumar
Shopify Partner
37363 3656 12099

@Mayaps 

1. Go to Online Store->Theme->Edit code
2. Asset->/theme.css ->paste below code at the bottom of the file.
this code apply for after 5 - 6 second

 

.grid__item--collection-template form {
    display: flex;
    align-items: center;
    justify-content: space-between;
flex-wrap: wrap;
}
.grid__item--collection-template form input#quantity {
    width: 70px;
}

 

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Mayaps
Tourist
3 0 2

Thank you so much!!! worked for collection page. Just if you can, could you help with same thing but in product page? So that add to cart box appear besides qty box!! Thanks so much!

 

Mayaps_0-1613585297739.png

 

KetanKumar
Shopify Partner
37363 3656 12099

@Mayaps 

thanks 

i have update my color collection page proper code so can you please update

also if you need same as product page it can be done some customization code 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
FiFiD
Excursionist
24 0 6

Hey i was wondering if you could help me too. 

I have added in thr add to cart button on my best sellers collection on the homepage but its not aligned

Its also not going to cart just an invalid page can you help me too?

 

KetanKumar
Shopify Partner
37363 3656 12099

@FiFiD 

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community!😊
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
FiFiD
Excursionist
24 0 6

Hey Ketan

Thank you i have never posted her before

Im at https://glowdry.myshopify.com/

 

Cheers

Fi 

KetanKumar
Shopify Partner
37363 3656 12099

@FiFiD 

thanks for store URL, please add this code

1. Go to Online Store->Theme->Edit code
2. Asset->/theme.scss.liquid->paste below code at the bottom of the file.

.product-card__title {min-height: 50px;isplay: inline-block;}

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
FiFiD
Excursionist
24 0 6

oh wow 

 

thanks so much

 

Any idea how to fix the add to cart so it goes to the cart page and not an error?

also can we straighten the add to cart button?

 

KetanKumar
Shopify Partner
37363 3656 12099

@FiFiD 

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community!😊
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
FiFiD
Excursionist
24 0 6

thank you

 

Its me again 

https://glowdry.myshopify.com/

KetanKumar
Shopify Partner
37363 3656 12099

@FiFiD 

sorry but you have add wrong code please add this code

<form method="post" action="/cart/add">
  <input type="hidden" name="id" value="{{ product.variants.first.id }}" />
  <input min="1" type="number" id="quantity" name="quantity" value="1"/>
  <input type="submit" value="Add to cart" class="btn" />
</form>
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
FiFiD
Excursionist
24 0 6

Thank you so much 

 

I have done that now

 

Is it possible to move the view all button down?

 

and line up hte add to cart buttons - it looks quite messy on mobileScreen Shot 2021-05-31 at 6.31.37 am.png

KetanKumar
Shopify Partner
37363 3656 12099

@FiFiD 

Yes, please add this css code

.product-card__title {
    min-height: 50px;
    display: inline-block;
}
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
FiFiD
Excursionist
24 0 6

where does it go?

KetanKumar
Shopify Partner
37363 3656 12099

@FiFiD 

1. Go to Online Store->Theme->Edit code
2. Asset->/theme.scss.liquid->paste below code at the bottom of the file.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Firefly1
Tourist
14 0 2

Hi,

Is there a way to get this button inactive when the product is sold out?

sold.png

Thanks in Advance.

moonrise
Excursionist
12 0 4

Hello @KetanKumar 

I followed your customized code which you give about homepage add to cart button code. It worked very well but on mobile, the button is doesn't look very well. I want to resize add to cart button as a thinner. 

URL: onthologie.com

IMG_4509.jpeg

KetanKumar
Shopify Partner
37363 3656 12099

@moonrise 

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community!😊
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
moonrise
Excursionist
12 0 4

@KetanKumar 

On Desktop add to cart buttons are ok but on mobile look big. I want smaller or maybe thinner

https://www.onthologie.com/

KetanKumar
Shopify Partner
37363 3656 12099

@moonrise 

can you please confirm this look

KetanKumar_0-1625902404096.png

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
moonrise
Excursionist
12 0 4

I like the add to cart section like that but is there any way to remove quantity? @KetanKumar 

moonrise
Excursionist
12 0 4

Hi @KetanKumar 

I have been trying to find some solutions but couldn't find any. Would you help me, please?

pinkdiva22
Tourist
3 0 2

Hi,

Is there a way to get the add to cart button and quantity to be inactive when the product is sold out?

 

KetanKumar
Shopify Partner
37363 3656 12099

@pinkdiva22 

yes, please sent  store url?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KetanKumar
Shopify Partner
37363 3656 12099

@pinkdiva22 

can you please show me issue images

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
SaraAkil
Tourist
4 0 4

Hello,

 

I want to REMOVE the add to cart button from my collections and homepage. I want the button to appear only on each product page. Ive searched for the answer and couldnt find the solution please help

KetanKumar
Shopify Partner
37363 3656 12099

@SaraAkil 

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community!😊
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
SaraAkil
Tourist
4 0 4
KetanKumar
Shopify Partner
37363 3656 12099

@SaraAkil 

thanks for URL

can you try this code

1. Go to Online Store->Theme->Edit code
2. Asset->/theme.scss.liquid->paste below code at the bottom of the file.

.product-card form {
    display: none;
}

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
SaraAkil
Tourist
4 0 4

It worked! Finally! been going at it for 10 days! Thank you!

KetanKumar
Shopify Partner
37363 3656 12099

@SaraAkil 

its my pleasure to help us

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing