Shopify themes, liquid, logos, and UX
Hi everyone,
I am hoping someone can provide me with some insight, I would like to remove the add to cart button that appears while scrolling through the product page itself. I think even if everything were re-sized to fit it still looks ugly and tacky. URL to inspect here.
Solved! Go to the solution
This is an accepted solution.
Hi @DaveyAlcatraz,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </body> tag:
{% if template.name == 'product' %}
<script>
window.addEventListener("scroll", (event) => {
if(window.scrollY > 600) {
let atc_active = document.querySelector('#add2cart-cta');
if(atc_active) {
atc_active.style.display = 'none';
}
}
else {
let atc_active = document.querySelector('#add2cart-cta');
atc_active.style.display = 'block';
}
});
</script>
{% endif %}
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
You can try this code by following these steps:
Step 1: Go to the online store ->Theme ->Edit Code.
Step 2: Find the theme.liquid file and add the following code above the </head> tag
<style>
.button.fullwidth.is-primary{
display: none !important;
}
</style>
Result:
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
This is an accepted solution.
Hi @DaveyAlcatraz,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </body> tag:
{% if template.name == 'product' %}
<script>
window.addEventListener("scroll", (event) => {
if(window.scrollY > 600) {
let atc_active = document.querySelector('#add2cart-cta');
if(atc_active) {
atc_active.style.display = 'none';
}
}
else {
let atc_active = document.querySelector('#add2cart-cta');
atc_active.style.display = 'block';
}
});
</script>
{% endif %}
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
This is Richard from PageFly - Shopify Page Builder App
Please add this code to your theme.liquid above the </head> to get this solved
Step 1: Online Stores > Themes > More Actions > Edit code
Step 2: click on theme.liquid and paste the code above the </head>
<style>
##add2cart-cta {
display: none !important;
}
</style>
Hope this can help you solve the issue
Best regards,
Richard | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024