I want to remove the quantity selector button and its title “Quantity” from the out-of-stock product page.
Below is the link to my website’s out-of-stock product: https://www.swayur.com/
A user seeks to hide the quantity selector and its “Quantity” label on out-of-stock product pages.
Two solutions proposed:
Solution 1 (ZestardTech):
product.liquid or product-template.liquidproduct-form__input product-form__quantity{% if product.available %} … {% endif %}Solution 2 (PageFly-Oliver):
base.css file.product-info:has(.product-form__submit button[disabled]) .product-form__quantity { display: none !important; }Both approaches target the quantity selector visibility when products are unavailable. The discussion remains open with no confirmation of which solution was implemented.
I want to remove the quantity selector button and its title “Quantity” from the out-of-stock product page.
Below is the link to my website’s out-of-stock product: https://www.swayur.com/
Hello @swayurindia
you can use Liquid conditionals to check if the product is out of stock and then hide the quantity selector based on that condition.
Like this :-
{% if product.available %}
{% endif %}
Hi @swayurindia ,
You can try this code by following these steps:
Step 1: Go to Online Store->Theme->Edit code.
Step 2: Search file base.css
Step 3: Paste the below code at the bottom of the file → Save
product-info:has(.product-form__submit button[disabled]) .product-form__quantity{
display:none !important
}
Hope my solution works perfectly for you!
Best regards,
Oliver | PageFly