How can I eliminate the quantity label from the Dawn theme cart?

Topic summary

Goal: Remove the quantity label/selector from the Dawn theme cart while keeping the remove (delete) option.

Solution provided and confirmed working:

  • Add CSS in Assets > base.css to hide the quantity UI in cart:
    • Hide the quantity component (.cart-item__quantity .quantity).
    • Hide the table header label by setting its font-size to 0.
  • This resolved the original request and also worked for another user on the Crave theme.

Further requests/variations:

  • Product page: A user asked to remove the quantity box on product pages for digital goods; code guidance was given and they confirmed success.
  • Not working cases: For one Dawn store, initial CSS didn’t work. Additional CSS was suggested to hide the entire quantity cell (td.cart-item__quantity). When still ineffective, the helper requested theme code and advised removing/commenting the quantity block directly in main-cart-item.liquid.

Open issues/unresolved:

  • Some users couldn’t find base.css or reported the CSS didn’t work on their Dawn setup; assistance requested with store URL/password.
  • On the Refresh theme, the selector disappeared but an extra button remained; needs store-specific review.

Status: Multiple successes via CSS; in stubborn cases, edit the cart item snippet to remove the quantity block. Discussion ongoing.

Summarized with AI on December 29. AI used: gpt-5.

@KetanKumar and this is the whole code in main-cart-item.liquid

{{ ‘component-cart.css’ | asset_url | stylesheet_tag }}
{{ ‘component-cart-items.css’ | asset_url | stylesheet_tag }}
{{ ‘component-totals.css’ | asset_url | stylesheet_tag }}
{{ ‘component-price.css’ | asset_url | stylesheet_tag }}
{{ ‘component-discounts.css’ | asset_url | stylesheet_tag }}
{{ ‘component-loading-overlay.css’ | asset_url | stylesheet_tag }}

{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}

@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}

{{ 'sections.cart.title' | t }}

{{ 'general.continue_shopping' | t }}

{{ 'sections.cart.empty' | t }}

{{ 'general.continue_shopping' | t }}

{%- if shop.customer_accounts_enabled and customer == nil -%}

{{ 'sections.cart.login.title' | t }}

{{ 'sections.cart.login.paragraph_html' | t: link: routes.account_login_url }}

{%- endif -%}
{%- if cart != empty -%} {%- for item in cart.items -%} {%- endfor -%}
{{ 'sections.cart.headings.product' | t }} {{ 'sections.cart.headings.total' | t }} {{ 'sections.cart.headings.quantity' | t }} {{ 'sections.cart.headings.total' | t }}
{% if item.image %} {% comment %} Leave empty space due to a:empty CSS display: none rule {% endcomment %}
{{ item.image.alt | escape }}
{% endif %}
{%- if section.settings.show_vendor -%}

{{ item.product.vendor }}

{%- endif -%}

{{ item.product.title | escape }}

{%- if item.original_price != item.final_price -%}

{{ 'products.product.price.regular_price' | t }} {{ item.original_price | money }} {{ 'products.product.price.sale_price' | t }} {{ item.final_price | money }}
{%- else -%}
{{ item.original_price | money }}
{%- endif -%}

{%- if item.product.has_only_default_variant == false or item.properties.size != 0 or item.selling_plan_allocation != nil -%}

{%- if item.product.has_only_default_variant == false -%} {%- for option in item.options_with_values -%}
{{ option.name }}:
{{ option.value }}
{%- endfor -%} {%- endif -%}

{%- for property in item.properties -%}
{%- assign property_first_char = property.first | slice: 0 -%}
{%- if property.last != blank and property_first_char != ‘_’ -%}

{{ property.first }}:
{%- if property.last contains '/uploads/' -%} {{ property.last | split: '/' | last }} {%- else -%} {{ property.last }} {%- endif -%}
{%- endif -%} {%- endfor -%}

{{ item.selling_plan_allocation.selling_plan.name }}

{%- endif -%}
    {%- for discount in item.discounts -%}
  • {%- render 'icon-discount' -%} {{ discount.title }}
  • {%- endfor -%}
{%- if item.original_line_price != item.final_line_price -%}
{{ 'products.product.price.regular_price' | t }}
{{ item.original_line_price | money }}
{{ 'products.product.price.sale_price' | t }}
{{ item.final_line_price | money }}
{%- else -%} {{ item.original_line_price | money }} {%- endif -%}

{%- if item.variant.available and item.unit_price_measurement -%}

{{ 'products.product.price.unit_price' | t }} {{ item.variant.unit_price | money }} /  {{ 'accessibility.unit_price_separator' | t }}  {%- if item.variant.unit_price_measurement.reference_value != 1 -%} {{- item.variant.unit_price_measurement.reference_value -}} {%- endif -%} {{ item.variant.unit_price_measurement.reference_unit }}
{%- endif -%}
{{ 'products.product.quantity.label' | t }} {{ 'products.product.quantity.decrease' | t: product: item.product.title | escape }} {% render 'icon-minus' %} {{ 'products.product.quantity.increase' | t: product: item.product.title | escape }} {% render 'icon-plus' %} {% render 'icon-remove' %}
{%- if item.original_line_price != item.final_line_price -%}
{{ 'products.product.price.regular_price' | t }}
{{ item.original_line_price | money }}
{{ 'products.product.price.sale_price' | t }}
{{ item.final_line_price | money }}
{%- else -%} {{ item.original_line_price | money }} {%- endif -%}

{%- if item.variant.available and item.unit_price_measurement -%}

{{ 'products.product.price.unit_price' | t }} {{ item.variant.unit_price | money }} /  {{ 'accessibility.unit_price_separator' | t }}  {%- if item.variant.unit_price_measurement.reference_value != 1 -%} {{- item.variant.unit_price_measurement.reference_value -}} {%- endif -%} {{ item.variant.unit_price_measurement.reference_unit }}
{%- endif -%}
{%- endif -%}

{{ 'accessibility.loading' | t }}

{% schema %}
{
“name”: “t:sections.main-cart-items.name”,
“settings”: [
{
“type”: “checkbox”,
“id”: “show_vendor”,
“default”: false,
“label”: “t:sections.main-cart-items.settings.show_vendor.label”
},
{
“type”: “header”,
“content”: “t:sections.all.padding.section_padding_heading”
},
{
“type”: “range”,
“id”: “padding_top”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_top”,
“default”: 36
},
{
“type”: “range”,
“id”: “padding_bottom”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_bottom”,
“default”: 36
}
]
}
{% endschema %}

{% comment %}{% endcomment %}
1 Like