How to remove Quantity selector and total from cart page? Look at main-cart.liquid code

Topic summary

A user seeks to remove the quantity selector and total from their Shopify cart page, sharing code from their main-cart.liquid file along with a screenshot highlighting the elements to remove.

Solution Provided:

  • BSS-TekLabs offered step-by-step instructions to hide these elements using CSS
  • The fix involves adding custom CSS code to the base.css file:
    .t4s-page_cart__item .t4s-cart-item-pr .t4s-quantity-cart-item,
    .t4s-main-cart .t4s-cart__price {
      display: none !important;
    }
    
  • The user confirmed the solution works successfully

Follow-up Request:
The user now wants to create more spacing between the product and price, and reposition the price to the opposite side of the cart layout. This additional customization request remains unresolved and awaits further assistance.

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

Remove circle selected from this main-cart.liquid

{{ ‘button-style.css’ | asset_url | stylesheet_tag }}

{%- liquid assign section_blocks = section.blocks assign se_stts = section.settings assign ccount = cart.item_count assign ck_lumise = 'ck_lumise' assign cart_url = routes.cart_url assign cart_change_url = routes.cart_change_url assign min_qty = settings.min_qty | plus: 0 assign compare_tt_price = 0 assign shipping_amount = settings.free_ship_pr.metafields.theme.shipping_money.value | default: settings.free_ship_pr.price | default: -1 assign total_price = cart.total_price

assign gift_pr = all_products[settings.gift_wrap_pr]
assign gift_pr_id = gift_pr.id
assign arr_gift_id = cart.items | where: ‘product_id’, gift_pr_id

assign ck_agree = false
assign arrblock = section_blocks | where: “type”, ‘agree’
if arrblock.size > 0
assign cl_agree = ’ t4s-pe-none’
assign ck_agree = true
endif
if cart.note != blank
assign style_add = ‘t4s-d-none’
assign style_edit = ‘’
else
assign style_add = ‘’
assign style_edit = ‘t4s-d-none’
endif
assign edit_item = settings.edit_item
assign cur_code_enabled = settings.currency_code_enabled
assign atc_ajax_enable = settings.atc_ajax_enable
assign cart_ajax_enable = settings.cart_ajax_enable
unless cart_ajax_enable
assign min_qty = 1
endunless
-%}

{{ 'cart.general.cookies_required' | t }}
{{ 'cart.cart_page.label.product' | t }}
{{ 'cart.cart_page.label.price' | t }}
{{ 'cart.cart_page.label.quantity' | t }}
{{ 'cart.cart_page.label.total' | t }}

{%- if ccount > 0 -%}
{%- for item in cart.items -%}
{%- render ‘cart-item-page’, item: item , gift_pr_id: gift_pr_id, min_qty: min_qty, compare_tt_price: compare_tt_price, cart_change_url: cart_change_url, edit_item: edit_item, cur_code_enabled: cur_code_enabled, atc_ajax_enable: atc_ajax_enable -%}
{%- endfor -%}

{%- else -%}

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

{{ 'cart.cart_page.empty_html' | t }}
{%- assign btn_blocks = section_blocks | where: "type", 'btn' -%} {%- if btn_blocks.size > 0 -%} {%- for block in btn_blocks -%} {%- assign bk_stts = block.settings -%} {%- assign button_style = bk_stts.button_style -%} {%- if bk_stts.title != blank -%}

{{ bk_stts.title }}{%- if bk_stts.btn_icon -%}{%- endif -%}

{%- endif -%} {%- endfor -%} {%- endif -%} {%- if se_stts.enable_calc_ship and shipping_amount > -1 -%} {%- liquid assign shipping_money = shipping_amount | money assign des_shipbar_per_1 = settings.des_shipbar_per_1 assign des_shipbar_per_2 = settings.des_shipbar_per_2 assign des_shipbar_per_3 = settings.des_shipbar_per_3 assign less_100 = 99.99 assign array_shipbar_per = des_shipbar_per_1 | append: ';' | append: des_shipbar_per_2 | append: ';' | append: des_shipbar_per_3 | split: ';' | sort_natural assign percent_class = array_shipbar_per[0] | plus: 0 if percent_class == 100 assign percent_class = less_100 endif -%}

{%- style -%}
[data-t4s-percent=“{% if des_shipbar_per_1 == 100 %}{{ less_100 }}{% else %}{{ des_shipbar_per_1 }}{% endif %}”] { --main-threshold-color: {{ settings.des_shipbar_cl_1 }}; }
[data-t4s-percent=“{% if des_shipbar_per_2 == 100 %}{{ less_100 }}{% else %}{{ des_shipbar_per_2 }}{% endif %}”] { --main-threshold-color: {{ settings.des_shipbar_cl_2 }}; }
[data-t4s-percent=“{% if des_shipbar_per_3 == 100 %}{{ less_100 }}{% else %}{{ des_shipbar_per_3 }}{% endif %}”] { --main-threshold-color: {{ settings.des_shipbar_cl_3 }}; }
[data-t4s-percent=“100”] { --main-threshold-color: {{ settings.des_shipbar_cl_4 }}; }
{%- endstyle -%}

{{ 'cart.shipping_threshold.text_1_html' | t: money: shipping_money }}
{%- endif -%}
{%- endif -%}
{%- if se_stts.enable_note or se_stts.enable_discount or se_stts.enable_gift_wrap and gift_pr.available == true -%}{%- assign ck_col = true -%}
{%- if se_stts.enable_gift_wrap and gift_pr.available == true -%}
0 %} style="display:none"{% endif %}>
{%- assign gift_pr_money = gift_pr.variants.first.price | money -%} {{ 'cart.tool.gift_wrap_html' | t: money: gift_pr_money }}
{%- endif -%} {%- if se_stts.enable_note -%} {{ 'cart.tool.note' | t }}{{ 'cart.tool.edit_note' | t }} {{ cart.note }} {%- endif -%} {%- if se_stts.enable_discount -%} {{ 'cart.tool.coupon' | t }}

{{ 'cart.tool.info_coupon' | t }}

{%- endif -%}
{%- endif -%}
{%- if se_stts.enable_calc_ship and shipping_amount > -1 -%} {%- liquid assign shipping_money = shipping_amount | money assign enable_shipbar = settings.enable_shipbar assign des_shipbar_per_1 = settings.des_shipbar_per_1 assign des_shipbar_per_2 = settings.des_shipbar_per_2 assign des_shipbar_per_3 = settings.des_shipbar_per_3 assign less_100 = 99.99 -%}

{%- if enable_shipbar -%}
{%- capture text_w_ship -%}
{%- if total_price == 0 -%}
{%- liquid
assign array_shipbar_per = des_shipbar_per_1 | append: ‘;’ | append: des_shipbar_per_2 | append: ‘;’ | append: des_shipbar_per_3 | split: ‘;’ | sort_natural
assign percent_class = array_shipbar_per[0] | plus: 0
if percent_class == 100
assign percent_class = less_100
endif
-%}
{%- capture style_w %} style=“width:0”{% endcapture -%}

{{ 'cart.shipping_threshold.text_1_html' | t: money: shipping_money }}
{%- elsif shipping_amount > total_price %}{% assign space_money = shipping_amount | minus: total_price | money -%}
{{ 'cart.shipping_threshold.text_2_html' | t: money: space_money }}

{%- liquid
assign array_shipbar_per = des_shipbar_per_1 | append: ‘;’ | append: des_shipbar_per_2 | append: ‘;’ | append: des_shipbar_per_3 | split: ‘;’ | sort_natural
assign percent_w2 = shipping_amount | minus: total_price | times: 100.0 | divided_by: shipping_amount
assign percent_w2 = 100 | minus: percent_w2
assign shipbar_num_0 = array_shipbar_per[0] | plus: 0
assign shipbar_num_1 = array_shipbar_per[1] | plus: 0
assign shipbar_num_2 = array_shipbar_per[2] | plus: 0
if percent_w2 < shipbar_num_0
assign percent_class = shipbar_num_0
elsif percent_w2 < shipbar_num_1
assign percent_class = shipbar_num_1
else
assign percent_class = shipbar_num_2
else
assign percent_class = 99.994
endif
if percent_class == 100
assign percent_class = less_100
endif
-%}
{%- capture style_w %} style=“width:{{ percent_w2 }}%”{% endcapture -%}
{%- else -%}

{{ 'cart.shipping_threshold.text_3' | t | replace: '[', '' | replace: ']', '' }}
{%- assign percent_class = 100 -%} {%- capture style_w %} style="width:100%"{% endcapture -%} {%- endif -%}

{%- endcapture -%}

{%- style -%}
[data-t4s-percent=“{% if des_shipbar_per_1 == 100 %}{{ less_100 }}{% else %}{{ des_shipbar_per_1 }}{% endif %}”] { --main-threshold-color: {{ settings.des_shipbar_cl_1 }}; }
[data-t4s-percent=“{% if des_shipbar_per_2 == 100 %}{{ less_100 }}{% else %}{{ des_shipbar_per_2 }}{% endif %}”] { --main-threshold-color: {{ settings.des_shipbar_cl_2 }}; }
[data-t4s-percent=“{% if des_shipbar_per_3 == 100 %}{{ less_100 }}{% else %}{{ des_shipbar_per_3 }}{% endif %}”] { --main-threshold-color: {{ settings.des_shipbar_cl_3 }}; }
[data-t4s-percent=“99.994”],[data-t4s-percent=“100”] { --main-threshold-color: {{ settings.des_shipbar_cl_4 }}; }
{%- endstyle -%}
{%- endif -%}

{{- text_w_ship -}} {%- if settings.enable_shipbar %}
{% endif -%}
{%- endif -%}

{%- for block in section_blocks -%}
{%- assign bk_stts = block.settings -%}
{%- assign button_style = bk_stts.button_style -%}
{%- case block.type -%}
{%- when ‘price’ -%}

{%- if cart.cart_level_discount_applications != blank -%}
    {%- for discount_application in cart.cart_level_discount_applications -%}
  • {{- discount_application.title -}} (-{{ discount_application.total_allocated_amount | money }})
  • {%- endfor -%}
{%- endif -%}
{{ 'cart.cart_page.subtotal' | t }}
{%- if cart.total_discount > 0 -%}
{{ cart.original_total_price | money }}
- {{ cart.total_discount | money }}
{%- elsif compare_tt_price > total_price and false -%}
{{ compare_tt_price | money }}
- {{ compare_tt_price | minus: total_price | money }}
{%- endif -%}
{{ total_price | money }}

{%- when ‘tax’ -%}
{%- capture taxes_shipping_checkout -%}{%- assign page_url = settings.link_ship -%}
{%- if se_stts.show_discount -%}
{%- if cart.taxes_included and page_url != blank -%}
{{ ‘cart.general.taxes_included_discounts_and_shipping_policy_html’ | t: link: page_url }}
{%- elsif cart.taxes_included -%}
{{ ‘cart.general.taxes_included_discounts_but_shipping_at_checkout’ | t }}
{%- elsif page_url != blank -%}
{{ ‘cart.general.taxes_discounts_and_shipping_policy_at_checkout_html’ | t: link: page_url }}
{%- else -%}
{{ ‘cart.general.taxes_discounts_and_shipping_at_checkout’ | t }}
{%- endif -%}
{%- else -%}
{%- if cart.taxes_included and page_url != blank -%}
{{ ‘cart.general.taxes_included_and_shipping_policy_html’ | t: link: page_url }}
{%- elsif cart.taxes_included -%}
{{ ‘cart.general.taxes_included_but_shipping_at_checkout’ | t }}
{%- elsif page_url != blank -%}
{{ ‘cart.general.taxes_and_shipping_policy_at_checkout_html’ | t: link: page_url }}
{%- else -%}
{{ ‘cart.general.taxes_and_shipping_at_checkout’ | t }}
{%- endif -%}
{%- endif -%}
{%- endcapture -%}

{{ taxes_shipping_checkout }}

{%- when ‘agree’ -%}
{%- capture terms_and_conditions -%}{%- assign page_url = settings.link_conditions -%}
{%- if page_url != blank -%}
{{ ‘cart.general.terms_and_conditions_html’ | t: link: page_url }}
{%- else -%}
{{ ‘cart.general.terms_and_conditions’ | t }}
{%- endif -%}
{%- endcapture -%}

{{ terms_and_conditions }}

{%- when 'btnck' -%} {%- if settings.currency_type == '2' and settings.notify_currency and settings.mess_currency != blank %}{% assign cart_iso_code = cart.currency.iso_code %}{% assign text1 = '{{ currency }}' -%}

{{ settings.mess_currency | replace: text1, cart_iso_code | replace: '[currency]', cart_iso_code | replace: '[original_currency]', cart_iso_code | replace: '[current_currency]', '' }}

{%- endif -%}
{%- unless cart_ajax_enable -%}{%- assign button_style2 = bk_stts.button_style2 -%} {%- if bk_stts.btn_icon2 -%}{%- endif -%}{{ 'cart.cart_page.update' | t }} {% endunless -%} {%- if bk_stts.btn_icon -%}{%- endif -%}{{ 'cart.cart_page.checkout' | t }}
{%- when 'btnmr' -%} {%- if additional_checkout_buttons -%}
{{ content_for_additional_checkout_buttons }}
{%- endif -%} {%- when 'img' -%}{% if bk_stts.image == blank %}{% continue %}{% endif -%} {%- assign image = bk_stts.image -%}
{{ image.alt | escape }}

{%- else -%}{% continue -%}
{%- endcase -%}
{%- endfor -%}

{%- if se_stts.enable_rates %}{% assign idShip = ‘main_cart’ -%}

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

{{ 'cart.shipping_estimator.country' | t }}
{{ 'cart.shipping_estimator.province' | t }}
{{ 'cart.shipping_estimator.zip_code' | t }}
{{ 'cart.shipping_estimator.estimate' | t }}
{ "multiple_rates": {{ 'cart.shipping_estimator.multiple_rates' | t | json }}, "one_rate": {{ 'cart.shipping_estimator.one_rate' | t | json }}, "no_rates": {{ 'cart.shipping_estimator.no_rates' | t | json }}, "rate_value": {{ 'cart.shipping_estimator.rate_value' | t | json }}, "errors": {{ 'cart.shipping_estimator.errors' | t | json }} }
{%- endif -%}

{%- schema -%}
{
“name”: “Cart”,
“tag”: “section”,
“class”: “t4s-section t4s-section-main t4s-main-cart”,
“settings”: [
{
“type”: “checkbox”,
“id”: “enable_calc_ship”,
“label”: “Enable calc shipping”,
“info”:“Free shipping minimum amount.”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “enable_note”,
“label”: “Enable order notes”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “enable_rates”,
“label”: “Enable shipping rates calculator”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “enable_discount”,
“label”: “Enable input box discounts codes”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “enable_gift_wrap”,
“label”: “Enable gift wrap”,
“default”: true
},
{
“type”: “header”,
“content”: “+ Shipping Rates Calculator”
},
{
“type”: “text”,
“id”: “ship_df_country”,
“label”: “Default country selection”,
“default”: “United States”
},
{
“type”: “paragraph”,
“content”: “If your customer is logged-in, the country in his default shipping address will be selected. If you are not sure about the spelling to use here, refer to the first checkout page.”
}
],
“blocks”: [
{
“type”: “price”,
“name”: “Total price”,
“limit”: 1
},
{
“type”: “tax”,
“name”: “Taxes and shipping info”,
“limit”: 1/,
“settings”: [
{
“type”: “richtext”,
“id”: “image”,
“label”: “Content”
}
]
/
},
{
“type”: “agree”,
“name”: “Terms,conditions checkbox”,
“limit”: 1
},
{
“type”: “btnck”,
“name”: “Button checkout, updated”,
“limit”: 1,
“settings”:[
{
“type”: “header”,
“content”: “+ Checkout button options”
},
{
“type”:“checkbox”,
“id”:“btn_icon”,
“label”:“Enable button icon”,
“default”:false
},
{
“type”: “select”,
“id”: “button_style”,
“label”: “Button style”,
“options”: [
{
“label”: “Default”,
“value”: “default”
},
{
“label”: “Outline”,
“value”: “outline”
},
{
“label”: “Bordered bottom”,
“value”: “bordered”
},
{
“label”: “Link”,
“value”: “link”
}
]
},
{
“type”: “select”,
“id”: “btn_size”,
“label”: “Button size”,
“default”:“large”,
“options”: [
{
“label”: “Extra small”,
“value”: “small”
},
{
“label”: “Small”,
“value”: “extra-small”
},
{
“label”: “Medium”,
“value”: “medium”
},
{
“label”: “Large”,
“value”: “extra-medium”
},
{
“label”: “Extra large”,
“value”: “large”
},
{
“label”: “Extra extra large”,
“value”: “extra-large”
}
]
},
{
“type”: “select”,
“id”: “btn_cl”,
“label”: “Button color”,
“default”: “dark”,
“options”: [
{
“value”: “light”,
“label”: “Light”
},
{
“value”: “dark”,
“label”: “Dark”
},
{
“value”: “primary”,
“label”: “Primary”
},
{
“value”: “custom1”,
“label”: “Custom color 1”
},
{
“value”: “custom2”,
“label”: “Custom color 2”
}
]
},
{
“type”:“select”,
“id”:“button_effect”,
“label”:“Button hover effect”,
“default”:“default”,
“info”:“Only working button style default, outline”,
“options”:[
{
“label”:“Default”,
“value”:“default”
},
{
“label”:“Fade”,
“value”:“fade”
},
{
“label”:“Rectangle out”,
“value”:“rectangle-out”
},
{
“label”:“Sweep to right”,
“value”:“sweep-to-right”
},
{
“label”:“Sweep to left”,
“value”:“sweep-to-left”
},
{
“label”:“Sweep to bottom”,
“value”:“sweep-to-bottom”
},
{
“label”:“Sweep to top”,
“value”:“sweep-to-top”
},
{
“label”:“Shutter out horizontal”,
“value”:“shutter-out-horizontal”
},
{
“label”:“Outline”,
“value”:“outline”
},
{
“label”:“Shadow”,
“value”:“shadow”
}
]
},
{
“type”: “header”,
“content”: “+ Update button options”
},
{
“type”: “paragraph”,
“content”: “Only visible when disable automatic cart updates”
},
{
“type”:“checkbox”,
“id”:“btn_icon2”,
“label”:“Enable button icon”,
“default”:false
},
{
“type”: “select”,
“id”: “button_style2”,
“label”: “Button style”,
“default”:“outline”,
“options”: [
{
“label”: “Default”,
“value”: “default”
},
{
“label”: “Outline”,
“value”: “outline”
},
{
“label”: “Bordered bottom”,
“value”: “bordered”
},
{
“label”: “Link”,
“value”: “link”
}
]
},
{
“type”: “select”,
“id”: “btn_size2”,
“label”: “Button size”,
“default”:“large”,
“options”: [
{
“label”: “Extra small”,
“value”: “small”
},
{
“label”: “Small”,
“value”: “extra-small”
},
{
“label”: “Medium”,
“value”: “medium”
},
{
“label”: “Large”,
“value”: “extra-medium”
},
{
“label”: “Extra large”,
“value”: “large”
},
{
“label”: “Extra extra large”,
“value”: “extra-large”
}
]
},
{
“type”: “select”,
“id”: “btn_cl2”,
“label”: “Button color”,
“default”: “dark”,
“options”: [
{
“value”: “light”,
“label”: “Light”
},
{
“value”: “dark”,
“label”: “Dark”
},
{
“value”: “primary”,
“label”: “Primary”
},
{
“value”: “custom1”,
“label”: “Custom color 1”
},
{
“value”: “custom2”,
“label”: “Custom color 2”
}
]
},
{
“type”:“select”,
“id”:“button_effect2”,
“label”:“Button hover effect”,
“default”:“default”,
“info”:“Only working button style default, outline”,
“options”:[
{
“label”:“Default”,
“value”:“default”
},
{
“label”:“Fade”,
“value”:“fade”
},
{
“label”:“Rectangle out”,
“value”:“rectangle-out”
},
{
“label”:“Sweep to right”,
“value”:“sweep-to-right”
},
{
“label”:“Sweep to left”,
“value”:“sweep-to-left”
},
{
“label”:“Sweep to bottom”,
“value”:“sweep-to-bottom”
},
{
“label”:“Sweep to top”,
“value”:“sweep-to-top”
},
{
“label”:“Shutter out horizontal”,
“value”:“shutter-out-horizontal”
},
{
“label”:“Outline”,
“value”:“outline”
},
{
“label”:“Shadow”,
“value”:“shadow”
}
]
}
]
},
{
“type”: “btnmr”,
“name”: “Accelerated checkouts”,
“limit”: 1,
“settings”: [
/{
“type”: “paragraph”,
“content”: “Note: Only show when cart empty.”
}
/
]
},
{
“type”: “img”,
“name”: “Image trust”,
“limit”: 1,
“settings”: [
{
“type”: “image_picker”,
“id”: “image”,
“label”: “Image”
},
{
“type”: “range”,
“id”: “wimg”,
“min”: 40,
“max”: 100,
“step”: 1,
“unit”: “%”,
“label”: “Width image”,
“default”: 50
}
]
},
{
“type”: “btn”,
“name”: “Button emty”,
“settings”: [
{
“type”: “paragraph”,
“content”: “Note: Only show when cart empty.”
},
{
“type”: “text”,
“id”: “title”,
“label”: “Button Title”,
“default”: “Return To Shop”,
“info”:“If set blank will not show”
},
{
“type”: “url”,“id”: “url”,“label”: “Button link”
},
{
“type”:“checkbox”,
“id”:“btn_icon”,
“label”:“Enable button icon”,
“default”:false
},
{
“type”: “select”,
“id”: “button_style”,
“label”: “Button style”,
“options”: [
{
“label”: “Default”,
“value”: “default”
},
{
“label”: “Outline”,
“value”: “outline”
},
{
“label”: “Bordered bottom”,
“value”: “bordered”
},
{
“label”: “Link”,
“value”: “link”
}
]
},
{
“type”: “select”,
“id”: “btn_cl”,
“label”: “Button color”,
“default”: “dark”,
“options”: [
{
“value”: “light”,
“label”: “Light”
},
{
“value”: “dark”,
“label”: “Dark”
},
{
“value”: “primary”,
“label”: “Primary”
},
{
“value”: “custom1”,
“label”: “Custom color 1”
},
{
“value”: “custom2”,
“label”: “Custom color 2”
}
]
},
{
“type”:“select”,
“id”:“button_effect”,
“label”:“Button hover effect”,
“default”:“fade”,
“info”:“Only working button style default, outline”,
“options”:[
{
“label”:“Default”,
“value”:“default”
},
{
“label”:“Fade”,
“value”:“fade”
},
{
“label”:“Rectangle out”,
“value”:“rectangle-out”
},
{
“label”:“Sweep to right”,
“value”:“sweep-to-right”
},
{
“label”:“Sweep to left”,
“value”:“sweep-to-left”
},
{
“label”:“Sweep to bottom”,
“value”:“sweep-to-bottom”
},
{
“label”:“Sweep to top”,
“value”:“sweep-to-top”
},
{
“label”:“Shutter out horizontal”,
“value”:“shutter-out-horizontal”
},
{
“label”:“Outline”,
“value”:“outline”
},
{
“label”:“Shadow”,
“value”:“shadow”
}
]
}
]
}
],
“default”: {
“blocks”: [
{“type”: “price”},{“type”: “tax”},{“type”: “agree”},{“type”: “btnck”},{“type”: “btnmr”},{“type”: “img”},{“type”: “btn”}
]
}
}
{% endschema %}

Hello @Optimist1 .
Our team is ready to help you.
Please share your website address and access password (if necessary) so that we can check and assist you.

1 Like

Thanks, here are https://happyoff.com and the password: stewbe

Please modify the code

Thanks, here are https://happyoff.com and the Password: stewbe

Please modify the code

  • Here is the solution for you @Optimist1
  • Please follow these steps:

  • Then find the base.css file.
  • Then add the following code at the end of the file and press ‘Save’ to save it.
.t4s-page_cart__item .t4s-cart-item-price, .t4s-main-cart .t4s-quantity-cart-item {
 display: none !important;
}
  • Here is the result you will achieve:

  • Please press ‘Like’ and mark it as ‘Solution’ if you find it helpful. Thank you.
1 Like

Thanks, it’s working :+1:

Can you make more space between the product and the price and put the price on the other side like a modified screenshot?