Hello, thank you.
But I can’t seem to locate the correct section to add the code.
{%- liquid
assign cart_products = ‘’
assign upsell_products = ‘’
assign line_items_html = ‘’
assign upsell_items_html = ‘’
assign animation_name = animation_name | default: ‘cart-items-fade’
assign animation_delay_increment = 50
assign animation_delay = animation_delay | default: 0
-%}
{%- comment -%}
Capture line items
{%- endcomment -%}
{%- for line_item in cart.items -%}
{%- liquid
assign line_item_final_price = line_item.final_price | money
assign line_item_variant_compare_at_price = line_item.variant.compare_at_price | money
assign line_item_original_price = line_item.original_price | money
assign line_item_unit_price = line_item.unit_price | money
assign cart_products = cart_products | append: line_item.product.id | append: ‘,’
-%}
{%- capture cart_line_item -%}
{%- assign properties_html = '' -%}
{%- assign property_size = line_item.properties | size -%}
{%- if property_size > 0 -%}
{%- assign sale_type = ‘products.product.sale_type’ | t -%}
{%- for p in line_item.properties -%}
{%- assign property_first_char = p.first | slice: 0 -%}
{%- if p.last != blank and property_first_char != ‘_’ -%}
{%- if p.first == sale_type -%}
{%- if p.last contains '/uploads/' -%}
{{ p.last | split: '/' | last }}
{%- else -%}
{{ p.last }}
{%- endif -%}
{%- else -%}
{%- capture properties_html -%}
{{ properties_html }}
{{ p.first }}:
{%- if p.last contains '/uploads/' -%}
{{ p.last | split: '/' | last }}
{%- else -%}
{{ p.last }}
{%- endif -%}
{%- endcapture -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- unless line_item.product.has_only_default_variant -%}
{%- for option in line_item.options_with_values -%}
{{ option.name }}:
{{ option.value }}
{%- endfor -%}
{%- endunless -%}
{%- if line_item.selling_plan_allocation -%}
{{ line_item.selling_plan_allocation.selling_plan.name }}
{%- endif -%}
{%- if properties_html != ‘’ -%}
{{ properties_html }}
{%- endif -%}
{%- liquid
assign discounted = false
assign sale = false
if line_item.original_price > line_item.final_price
assign discounted = true
endif
if line_item.variant.compare_at_price > line_item.final_price
assign sale = true
endif
-%}
{%- if sale or discounted -%}
{%- if line_item.final_price == 0 -%}
{{ ‘general.money.free’ | t }}
{%- else -%}
{{- line_item_final_price -}}
{%- endif -%}
{%- else -%}
{%- if line_item.final_price == 0 -%}
{{ ‘general.money.free’ | t }}
{%- else -%}
{{- line_item_final_price -}}
{%- endif -%}
{%- endif -%}
{%- if sale and discounted == false -%}
{{- line_item_variant_compare_at_price -}}
{%- endif -%}
{%- if discounted -%}
{{- line_item_original_price -}}
{%- endif -%}
{%- if line_item.unit_price -%}
{%- capture unit_price_separator -%}
/{{ ‘general.accessibility.unit_price_separator’ | t }}
{%- endcapture -%}
{%- capture unit_price_base_unit -%}
{%- if line_item.unit_price_measurement.reference_value != 1 -%}
{{- line_item.unit_price_measurement.reference_value -}}
{%- endif -%}
{{- line_item.unit_price_measurement.reference_unit -}}
{%- endcapture -%}
{{ 'products.product.unit_price_label' | t }}
{{ line_item_unit_price }}{{ unit_price_separator }}{{ unit_price_base_unit }}
{%- endif -%}
{%- render 'icon-minus' -%}
{%- assign quantity = line_item.quantity -%}
{%- if line_item.variant.inventory_policy == ‘deny’ and line_item.variant.inventory_management != nil and line_item.variant.inventory_quantity < quantity -%}
{%- assign quantity = line_item.variant.inventory_quantity -%}
{%- endif -%}
{%- render ‘icon-plus’ -%}
{{- ‘cart.general.remove’ | t -}}
{%- if line_item.original_price > line_item.final_price -%}
{%- for discount in line_item.line_level_discount_allocations -%}
{%- render 'icon-tags' -%}
{%- assign discount_price = discount.amount | money -%}
{{ ‘cart.general.discount_label’ | t: amount: discount_price, title: discount.discount_application.title }}
{%- endfor -%}
{%- endif -%}
{%- endcapture -%}
{%- assign line_items_html = line_items_html | append: cart_line_item -%}
{%- endfor -%}
{%- comment -%}
Capture upsell items based on products added to Cart
{%- endcomment -%}
{%- for line_item in cart.items -%}
{%- capture upsell_line_item -%}
{%- liquid
comment
Upsell items
endcomment
assign upsell_product_single = line_item.product.metafields.theme.upsell
assign upsell_product_list = line_item.product.metafields.theme.upsell_list
comment
Product meta field type “One product”
endcomment
if upsell_product_single.value != nil and upsell_product_single.type == ‘product_reference’
assign upsell_product = upsell_product_single.value
unless upsell_products contains upsell_product.handle or cart_products contains upsell_product.id
render ‘upsell-product’ upsell_product: upsell_product, is_cart: true
assign upsell_products = upsell_products | append: upsell_product.handle | append: ‘,’
endunless
endif
comment
Product meta field type “List of products”
endcomment
if upsell_product_list.value != nil and upsell_product_list.type == ‘list.product_reference’
for upsell_product in upsell_product_list.value
unless upsell_products contains upsell_product.handle or cart_products contains upsell_product.id
render ‘upsell-product’ upsell_product: upsell_product, is_cart: true
assign upsell_products = upsell_products | append: upsell_product.handle | append: ‘,’
endunless
endfor
endif
-%}
{%- endcapture -%}
{%- assign upsell_items_html = upsell_items_html | append: upsell_line_item -%}
{%- endfor -%}
{%- case part -%}
{%- when ‘line-items’ -%}
{{- line_items_html -}}
{%- when ‘upsell-items’ -%}
{{- upsell_items_html -}}
{%- endcase -%}