Shopify themes, liquid, logos, and UX
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 button
Solved! Go to the solution
This is an accepted solution.
can you please try this
Just follow the steps for Debut theme for Add to cart button on collection pages.
<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>
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.
On Desktop add to cart buttons are ok but on mobile look big. I want smaller or maybe thinner
can you please confirm this look
I like the add to cart section like that but is there any way to remove quantity? @KetanKumar
Hi @KetanKumar
I have been trying to find some solutions but couldn't find any. Would you help me, please?
Hi,
Is there a way to get the add to cart button and quantity to be inactive when the product is sold out?
yes, please sent store url?
can you please show me issue images
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
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.
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;
}
It worked! Finally! been going at it for 10 days! Thank you!
its my pleasure to help us
Hello,
I have also added this code but it doesn't seem to be aligning my add to cart buttons. Currently, the buttons are not aligned because my product titles are different lengths and some take up more lines than others. Could you please help me align my buttons? My site is schwabies.myshopify.com. I appreciate your help.
Thank you,
Erin
yes, please try this code
1. Go to Online Store->Theme->Edit code
2. Asset->/theme.css ->paste below code at the bottom of the file.
.product-card__title {
min-height: 50px;
display: inline-block;
}
do you have try
hi ketan, man you are really doing a great job here. helping people. can you help me in the below issue. I have added add to cart button on my homepage and collection pages but its alignment is not right. can you let me know what is the code and where should i put to make it right. so, they all look at the same heidht/width.
yes, please share store url
Hi, can you share how did you do this?
Hello there, I have done this, but on mobile, i have very weird spacing on my buttons. (see photo) Can you advise how to correct that?
Thanks
sorry for this issue 'bt i can't see any photos also please share store url
sorry i can't see your attachment bt can you please 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.
@media only screen and (max-width: 749px) {
.btn, .shopify-payment-button .shopify-payment-button__button--unbranded {font-size: 12px;}
}
Here is what I am referring to.
do you have like this?
Hi there, I'm hoping you can help me with a similar issue. I've followed your instructions to add the cart button, but the buttons are laying right on top of the next row like pictured. Could you help with this? Jacob University Store password: awtsoh
sorry for that issue can you please try this
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 {margin-bottom: 10px;}
.product-card+form {margin-bottom: 30px;}
.product-card+form input {width: 100%;}
Wonderful, that's perfect! Thank you so much!
User | RANK |
---|---|
140 | |
114 | |
79 | |
64 | |
64 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023