Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hii,
I wanted to hide the quantities from the cart line item on the checkout page to fulfill my requirement. Is there any way to hide the quantity on the checkout page? It would be helpful if we could achieve this using the extension or any other way.
Thanks!
On extension you can not do that. But if you want to show the quantity as 1 or desired quantity as per your requirement, then you can always update the line item quantity using the cart line change graphql mutation.
Hi @fenil ,
There are two methods to implement this:
Method 1: Product-Specific Template Overrides
Create conditional logic in cart templates to target products by handle, tag, or collection:
Duplicate cart template:
Navigate to Sections/main-cart-items.liquid
Identify the <quantity-input> block (typically lines 150–180)2
Implement handle-based exclusion:
{% assign target_handles = "product-handle-1,product-handle-2" | split: "," %}
<td class="cart-item__quantity">
{% unless target_handles contains item.product.handle %}
<quantity-input class="quantity">
<!-- Default quantity selector code -->
</quantity-input>
{% endunless %}
</td>
This preserves quantity inputs except for specified products.
Method 2: CSS Visibility Control
Inject theme-specific CSS via theme.scss.liquid:
/* Hide quantity for products tagged 'no-quantity' */
[data-product-tags~="no-quantity"] .quantity__input {
display: none !important;
}
/* Remove +/- buttons */
[data-product-tags~="no-quantity"] .quantity__button {
visibility: hidden;
}
This non-destructive approach maintains cart functionality while hiding UI elements
Hope this helps, let me know if you need more help.
Regards,
Dotsquares Ltd
Problem Solved? ✔ Accept and Like solution to help future merchants.
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025