All things Shopify and commerce
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
Hello There ,
Is there any way to hide the quantity box and buy it now buttons only in the sold out products . I do not want the buttons to get affected in available products . Can anyone assist me with this .
Thank You!!
Solved! Go to the solution
This is an accepted solution.
Hey @jnud21
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
{% if product.available %}
<style>
quantity-input.quantity {
display: flex;
}
.shopify-payment-button {
display: block;
}
</style>
{% else %}
<style>
quantity-input.quantity {
display: none;
}
.shopify-payment-button {
display: none;
}
</style>
{% endif %}
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
This is an accepted solution.
Hey @jnud21
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
{% if product.available %}
<style>
quantity-input.quantity {
display: flex;
}
.shopify-payment-button {
display: block;
}
</style>
{% else %}
<style>
quantity-input.quantity {
display: none;
}
.shopify-payment-button {
display: none;
}
</style>
{% endif %}
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Hi Moeed,
Thanks for this solution! My site doesn't display the quantity selector itself anymore, but it still shows the word 'quantity'. Can I remove this somehow too?
Thanks so much!