I want to remove quantity selector button and it's heading from the out of stock product page

Topic summary

A user seeks to hide the quantity selector and its “Quantity” label on out-of-stock product pages.

Two solutions proposed:

Solution 1 (ZestardTech):

  • Navigate to: Shopify Admin → Online Store → Themes → Actions → Edit Code
  • Locate product.liquid or product-template.liquid
  • Find the class product-form__input product-form__quantity
  • Use Liquid conditionals to check if product is out of stock: {% if product.available %}{% endif %}
  • Hide quantity selector based on this condition

Solution 2 (PageFly-Oliver):

  • Go to: Online Store → Theme → Edit Code
  • Open base.css file
  • Add CSS at bottom: .product-info:has(.product-form__submit button[disabled]) .product-form__quantity { display: none !important; }
  • Save the file

Both approaches target the quantity selector visibility when products are unavailable. The discussion remains open with no confirmation of which solution was implemented.

Summarized with AI on November 16. AI used: claude-sonnet-4-5-20250929.

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/

1 Like

Hello @swayurindia

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find “product.liquid” or “product-template.liquid.” and find this class “product-form__input product-form__quantity”

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