Hi thank you very much
my theme Snippets doesn’t include “cart-totals.liquid” file.
And I thought the code you mention is in sections: main-cart.liquid
This is the code of the file, I have replaced the code, but it not work
This is the original code of the "main-cart.liquid "file
{%- liquid
assign padding_top = section.settings.mg_top_desktop | append: 'px'
assign padding_bottom = section.settings.mg_bottom_desktop | append: 'px'
assign padding_top_tablet = section.settings.mg_top_tablet | append: 'px'
assign padding_bottom_tablet = section.settings.mg_bottom_tablet | append: 'px'
assign padding_top_mobile = section.settings.mg_top_mobile | append: 'px'
assign padding_bottom_mobile = section.settings.mg_bottom_mobile | append: 'px'
assign show_breadcrumb = section.settings.show_breadcrumb
assign breadcrumb_alignment = section.settings.breadcrumb_alignment
assign show_page_title = section.settings.show_page_title
assign page_title_alignment = section.settings.page_title_alignment
assign container = section.settings.container
assign side_padding_full_width = section.settings.side_padding_full_width | append: 'px'
assign show_cart_countdown = section.settings.show_cart_countdown
assign media_size = section.settings.image_ratio
assign portrait_aspect_ratio = section.settings.portrait_aspect_ratio | append: '%'
assign show_shipping_rate_calculator = settings.show_cart_shipping
assign default_country = settings.shipping_rate_calculator_default_country
assign show_coupon_code = settings.show_cart_discount
assign show_cart_note = settings.show_cart_note
assign show_gift_card = settings.show_cart_gift
assign continue_button_action = section.settings.continue_button_action
assign custom_button_link = section.settings.custom_button_link
assign show_trust_image = section.settings.show_trust_image
if show_cart_countdown
assign cart_countdown_time = section.settings.cart_countdown_time
endif
if show_gift_card
assign gift_card_product = settings.cart_product_gift
assign gift_card_content = settings.main_cart_gift_content
assign product = all_products[gift_card_product]
assign id = product.selected_or_first_available_variant.id | minus: 0
assign check = false
for item in cart.items
if item.id == id
assign check = true
endif
endfor
endif
-%}
{% schema %}
{
"name": "t:sections.main_cart.name",
"settings":
[
{
"type": "header",
"content": "t:sections.main_lookbook_page.settings.header__1"
},
{
"type": "checkbox",
"id": "show_breadcrumb",
"label": "t:sections.general.settings.breadcrumb.label__1",
"default": false
},
{
"type": "color",
"id": "breadcrumb_color",
"label": "t:sections.general.settings.breadcrumb.breadcrumb_color"
},
{
"type": "select",
"id": "breadcrumb_alignment",
"label": "t:sections.general.settings.breadcrumb.label__2",
"options": [
{
"value": "left",
"label": "t:sections.general.settings.breadcrumb.options__1"
},
{
"value": "center",
"label": "t:sections.general.settings.breadcrumb.options__2"
},
{
"value": "right",
"label": "t:sections.general.settings.breadcrumb.options__3"
}
],
"default": "center"
},
{
"type": "checkbox",
"id": "show_page_title",
"label": "t:sections.general.settings.page-title.label__1",
"default": false
},
{
"type": "color",
"id": "page_title_color",
"label": "t:settings_schema.typography.settings.typography.text_color"
},
{
"type": "select",
"id": "page_title_alignment",
"label": "t:sections.general.settings.page-title.label__2",
"options": [
{
"value": "left",
"label": "t:sections.general.settings.page-title.options__1"
},
{
"value": "center",
"label": "t:sections.general.settings.page-title.options__2"
},
{
"value": "right",
"label": "t:sections.general.settings.page-title.options__3"
}
],
"default": "center"
},
{
"type": "select",
"id": "container",
"label": "t:sections.layout.container.option",
"default": "container",
"options": [
{
"value": "container",
"label": "t:sections.layout.container.option1"
},
{
"value": "1170",
"label": "t:sections.layout.container.option4"
},
{
"value": "fullwidth",
"label": "t:sections.layout.container.option2"
},
{
"value": "1770",
"label": "t:sections.layout.container.option3"
}
]
},
{
"type": "range",
"id": "side_padding_full_width",
"label": "t:sections.general.settings.container.padding_full",
"info": "t:sections.general.settings.container.padding_full_info",
"min": 0,
"max": 100,
"step": 1,
"default": 0,
"unit": "t:sections.general.settings.padding.unit"
},
{
"type": "header",
"content": "t:sections.layout.margin_top"
},
{
"type": "range",
"id": "mg_top_desktop",
"label": "t:sections.layout.mg_desktop.label",
"min": 0,
"max": 100,
"step": 5,
"unit": "t:sections.layout.mg_desktop.unit",
"default": 50
},
{
"type": "range",
"id": "mg_top_tablet",
"label": "t:sections.layout.mg_tablet.label",
"min": 0,
"max": 100,
"step": 5,
"unit": "t:sections.layout.mg_desktop.unit",
"default": 50
},
{
"type": "range",
"id": "mg_top_mobile",
"label": "t:sections.layout.mg_mobile.label",
"min": 0,
"max": 100,
"step": 5,
"unit": "t:sections.layout.mg_desktop.unit",
"default": 50
},
{
"type": "header",
"content": "t:sections.layout.margin_bottom"
},
{
"type": "range",
"id": "mg_bottom_desktop",
"label": "t:sections.layout.mg_desktop.label",
"min": 0,
"max": 100,
"step": 5,
"unit": "t:sections.layout.mg_desktop.unit",
"default": 50
},
{
"type": "range",
"id": "mg_bottom_tablet",
"label": "t:sections.layout.mg_tablet.label",
"min": 0,
"max": 100,
"step": 5,
"unit": "t:sections.layout.mg_desktop.unit",
"default": 50
},
{
"type": "range",
"id": "mg_bottom_mobile",
"label": "t:sections.layout.mg_mobile.label",
"min": 0,
"max": 100,
"step": 5,
"unit": "t:sections.layout.mg_desktop.unit",
"default": 50
},
{
"type": "header",
"content": "t:sections.main_cart.settings.header__1"
},
{
"type": "checkbox",
"id": "show_vendor",
"label": "t:sections.main-product.settings.info.label__1",
"default": false
},
{
"type": "select",
"id": "image_ratio",
"label": "t:sections.general.settings.image-ratio.label__1",
"default": "portrait",
"options": [
{
"value": "adapt",
"label": "t:sections.general.settings.image-ratio.options__1"
},
{
"value": "portrait",
"label": "t:sections.general.settings.image-ratio.options__2"
},
{
"value": "square",
"label": "t:sections.general.settings.image-ratio.options__3"
},
{
"value": "circle",
"label": "t:sections.general.settings.image-ratio.options__4"
}
]
},
{
"type": "range",
"id": "portrait_aspect_ratio",
"label": "t:sections.general.settings.image-ratio.label__2",
"min": 101,
"max": 150,
"step": 1,
"unit": "t:sections.general.settings.image-ratio.unit",
"default": 148,
"info": "t:sections.general.settings.image-ratio.info"
},
{
"type": "header",
"content": "t:settings_schema.countdown.name"
},
{
"type": "checkbox",
"id": "show_cart_countdown",
"label": "t:settings_schema.countdown.settings.general.label__1",
"default": true
},
{
"type": "range",
"id": "cart_countdown_time",
"label": "t:settings_schema.countdown.settings.general.label__3",
"default": 30,
"min": 1,
"max": 60,
"step": 1,
"unit": "t:settings_schema.before_you_leave.settings.general.unit"
},
{
"type": "header",
"content": "t:sections.main_cart.settings.header__2"
},
{
"type": "checkbox",
"id": "show_trust_image",
"label": "t:sections.main_cart.settings.label__1",
"default": true
},
{
"type": "header",
"content": "t:sections.main_cart.settings.header__3"
},
{
"type": "select",
"id": "continue_button_action",
"label": "t:sections.main_cart.settings.label__2",
"default": "1",
"options": [
{
"value": "1",
"label": "t:sections.main_cart.settings.option__1"
},
{
"value": "2",
"label": "t:sections.main_cart.settings.option__2"
}
]
},
{
"type": "url",
"id": "custom_button_link",
"label": "t:sections.main_cart.settings.label__3",
"info": "t:sections.main_cart.settings.info"
}
]
}
{% endschema %}