Shopify themes, liquid, logos, and UX
Hi
I have been in contact with the author of the theme, Add to cart buttons cannot be added to the home page/front page of the shop. This is hard for me to believe.
I was able to post a string of code to give me a add to cart button, but this also gave the collections pages add to cart button. Collections pages then had 2 add to cart buttons.
I hope someone can help me to add to cart button only to the front page / home page.
Preview link; https://norwegianfoodstore.com/?_ab=0&_fd=0&_sc=1&preview_theme_id=135292616937
Thanks
Hi @maxlime
I have been in contact with the author of the theme, Add to cart buttons cannot be added to the home page/front page of the shop. This is hard for me to believe.
More likely they mean they cannot customize the theme for you, or that the theme does not have a section exclusively for an add to cart button or that fits the use case.
If the theme has a custom-html section either just try adding a buy button.
https://help.shopify.com/en/manual/online-sales-channels/buy-button
Or all an add-to-cart(ATC) button is really is a url query to the /cart endpoint.
So if not using locales simply make a link setup to add a product using the info in the ajax api docs.
https://shopify.dev/api/ajax/reference/cart#post-locale-cart-add-js
If the theme is OS2.0 compatable see if it has a custom-liquid section, or if so check resources like the parters code examples for snippets that may guide you to a customization.
https://shopify.github.io/liquid-code-examples/
Beyond that, that theme is not available in the shopify theme store so expect limited support or contributions.
If such a theme has it's own forums it can be best to pursue answers there.
Contact paull.newton+shopifyforum@gmail.com 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
Hi @maxlime
We can add the add to cart button on the home page by customizing the featured product liquid file.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024