Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi,
Is it possible to create an ''ADD TO BASKET'' button for product recommendations shown on the product page without using an app?
I've attached an image of what i want the button to look like (black box with white text - ''ADD TO BASKET'')
any help would be appreciated, thank you
Hey @samr66,
Adding a custom "Add to Cart" in Shopify require to do the custom code. Could you please share your store url so that I can take a look and check which theme is used there and based on that I provide you solution code.
Hi,
my url is - thescentedmeltshop.com and password - shop90
I am using dawn theme (15.3.0)
Thank you
Go to Edit Code > Open related-products.liquid > Search for {% render 'card-product' %} and paste the code on line number 50.
<form method="post" action="/cart/add" style="margin-top: -20px; !important">
<input type="hidden" name="id" value="{{ recommendation.variants.first.id }}">
<button type="submit" class="quick-add__submit button button--full-width button--secondary" style="background: black; color: white;">Add to Basket</button>
</form>
Thanks!
Hi,
Thank you i've added the code and it's now showing. Could you take a look at this image as there's just 2 things I can't work out how to change on the page?
Thank you!
Hi @samr66,
kindly provide your store URL please and if it is password protected, please share the password as well.Thanks
Hi,
Good morning,
Welcome to the shopify ,
Please share your store URL and if your store is password protected then also provide password too.
Thank you.