diff --git a/sections/collapsible-content.liquid b/sections/collapsible-content.liquid index a2d923d2c0c..d1ada25f5de 100644 --- a/sections/collapsible-content.liquid +++ b/sections/collapsible-content.liquid @@ -83,7 +83,7 @@ {% render 'icon-accordion', icon: block.settings.icon %}

- {{ block.settings.heading | default: block.settings.page.title }} + {{ block.settings.heading | default: block.settings.page.title | escape }}

{% render 'icon-caret' %}
diff --git a/sections/featured-collection.liquid b/sections/featured-collection.liquid index 047f025e3e3..e5316f472ff 100644 --- a/sections/featured-collection.liquid +++ b/sections/featured-collection.liquid @@ -158,7 +158,7 @@ {{ 'sections.featured_collection.view_all' | t }} diff --git a/sections/main-product.liquid b/sections/main-product.liquid index be03b3103aa..c1978fe3584 100644 --- a/sections/main-product.liquid +++ b/sections/main-product.liquid @@ -68,52 +68,52 @@ {% assign variant_images = product.images | where: 'attached_to_variant?', true | map: 'src' %}
-
- {% render 'product-media-gallery', variant_images: variant_images %} -
-
- - {%- assign product_form_id = 'product-form-' | append: section.id -%} +
+ {% render 'product-media-gallery', variant_images: variant_images %} +
+
+ + {%- assign product_form_id = 'product-form-' | append: section.id -%} - {%- for block in section.blocks -%} - {%- case block.type -%} - {%- when '@app' -%} - {% render block %} - {%- when 'text' -%} -

- {{- block.settings.text -}} -

- {%- when 'title' -%} -
-

{{ product.title | escape }}

- -

- {{ product.title | escape }} -

-
-
- {%- when 'price' -%} -
- {%- render 'price', - product: product, - use_variant: true, - show_badges: true, - price_class: 'price--large' - -%} -
- {%- if product.quantity_price_breaks_configured? -%} -
- {{ 'products.product.volume_pricing.note' | t }} + {%- for block in section.blocks -%} + {%- case block.type -%} + {%- when '@app' -%} + {% render block %} + {%- when 'text' -%} +

+ {{- block.settings.text -}} +

+ {%- when 'title' -%} +
+

{{ product.title | escape }}

+ +

+ {{ product.title | escape }} +

+
- {%- endif -%} + {%- when 'price' -%} +
+ {%- render 'price', + product: product, + use_variant: true, + show_badges: true, + price_class: 'price--large' + -%} +
+ {%- if product.quantity_price_breaks_configured? -%} +
+ {{ 'products.product.volume_pricing.note' | t }} +
+ {%- endif -%}
{%- if cart.taxes_included -%} {{ 'products.product.include_taxes' | t }} @@ -122,554 +122,652 @@ {{ 'products.product.shipping_policy_html' | t: link: shop.shipping_policy.url }} {%- endif -%}
-
- {%- assign product_form_installment_id = 'product-form-installment-' | append: section.id -%} - {%- form 'product', product, id: product_form_installment_id, class: 'installment caption-large' -%} - - {{ form | payment_terms }} - {%- endform -%} -
- {%- when 'inventory' -%} -

- {%- if product.selected_or_first_available_variant.inventory_management == 'shopify' -%} - {%- if product.selected_or_first_available_variant.inventory_quantity > 0 -%} - {%- if product.selected_or_first_available_variant.inventory_quantity <= block.settings.inventory_threshold -%} - - {%- if block.settings.show_inventory_quantity -%} - {{- 'products.product.inventory_low_stock_show_count' | t: quantity: product.selected_or_first_available_variant.inventory_quantity -}} +

+ {%- assign product_form_installment_id = 'product-form-installment-' | append: section.id -%} + {%- form 'product', product, id: product_form_installment_id, class: 'installment caption-large' -%} + + {{ form | payment_terms }} + {%- endform -%} +
+ {%- when 'inventory' -%} +

+ {%- if product.selected_or_first_available_variant.inventory_management == 'shopify' -%} + {%- if product.selected_or_first_available_variant.inventory_quantity > 0 -%} + {%- if product.selected_or_first_available_variant.inventory_quantity + <= block.settings.inventory_threshold + -%} + + {%- if block.settings.show_inventory_quantity -%} + {{- + 'products.product.inventory_low_stock_show_count' + | t: quantity: product.selected_or_first_available_variant.inventory_quantity + -}} + {%- else -%} + {{- 'products.product.inventory_low_stock' | t -}} + {%- endif -%} {%- else -%} - {{- 'products.product.inventory_low_stock' | t -}} + + {%- if block.settings.show_inventory_quantity -%} + {{- + 'products.product.inventory_in_stock_show_count' + | t: quantity: product.selected_or_first_available_variant.inventory_quantity + -}} + {%- else -%} + {{- 'products.product.inventory_in_stock' | t -}} + {%- endif -%} {%- endif -%} {%- else -%} - - {%- if block.settings.show_inventory_quantity -%} - {{- 'products.product.inventory_in_stock_show_count' | t: quantity: product.selected_or_first_available_variant.inventory_quantity -}} + {%- if product.selected_or_first_available_variant.inventory_policy == 'continue' -%} + + {{- 'products.product.inventory_out_of_stock_continue_selling' | t -}} {%- else -%} - {{- 'products.product.inventory_in_stock' | t -}} + + {{- 'products.product.inventory_out_of_stock' | t -}} {%- endif -%} {%- endif -%} - {%- else -%} - {%- if product.selected_or_first_available_variant.inventory_policy == 'continue' -%} - - {{- 'products.product.inventory_out_of_stock_continue_selling' | t -}} - {%- else -%} - - {{- 'products.product.inventory_out_of_stock' | t -}} - {%- endif -%} {%- endif -%} +

+ {%- when 'description' -%} + {%- if product.description != blank -%} +
+ {{ product.description }} +
{%- endif -%} -

- {%- when 'description' -%} - {%- if product.description != blank -%} -
- {{ product.description }} -
- {%- endif -%} - {%- when 'sku' -%} -

- {{ 'products.product.sku' | t }}: {{- product.selected_or_first_available_variant.sku -}} -

- {%- when 'custom_liquid' -%} - {{ block.settings.custom_liquid }} - {%- when 'collapsible_tab' -%} -
-
- -
- {% render 'icon-accordion', icon: block.settings.icon %} -

- {{ block.settings.heading | default: block.settings.page.title }} -

+ {%- when 'sku' -%} +

+ {{ 'products.product.sku' | t }}: + {{- product.selected_or_first_available_variant.sku -}} +

+ {%- when 'custom_liquid' -%} + {{ block.settings.custom_liquid }} + {%- when 'collapsible_tab' -%} +
+
+ +
+ {% render 'icon-accordion', icon: block.settings.icon %} +

+ {{ block.settings.heading | default: block.settings.page.title | escape }} +

+
+ {% render 'icon-caret' %} +
+
+ {{ block.settings.content }} + {{ block.settings.page.content }}
- {% render 'icon-caret' %} -
-
- {{ block.settings.content }} - {{ block.settings.page.content }} +
+
+ {%- when 'quantity_selector' -%} +
+ {% comment %} TODO: enable theme-check once `item_count_for_variant` is accepted as valid filter {% endcomment %} + {% # theme-check-disable %} + {%- assign cart_qty = cart + | item_count_for_variant: product.selected_or_first_available_variant.id + -%} + {% # theme-check-enable %} + +
+ + + + + + {%- liquid + assign volume_pricing_array = product.selected_or_first_available_variant.quantity_price_breaks | sort: 'quantity' | reverse + assign current_qty_for_volume_pricing = cart_qty | plus: product.selected_or_first_available_variant.quantity_rule.min + if cart_qty > 0 + assign current_qty_for_volume_pricing = cart_qty | plus: product.selected_or_first_available_variant.quantity_rule.increment + endif + -%} + {%- if product.quantity_price_breaks_configured? -%} + + {%- if product.selected_or_first_available_variant.quantity_price_breaks.size > 0 -%} + {%- assign variant_price_compare = product.selected_or_first_available_variant.compare_at_price -%} +
+ {%- if variant_price_compare -%} +
+
+ {{ 'products.product.price.regular_price' | t }} +
+
+ + {{ variant_price_compare | money_with_currency }} + +
+
+ {%- endif -%} + {%- if current_qty_for_volume_pricing < volume_pricing_array.last.minimum_quantity -%} + {%- assign variant_price = product.selected_or_first_available_variant.price + | money_with_currency + -%} + + {{- 'products.product.volume_pricing.price_at_each' | t: price: variant_price -}} + + {%- else -%} + {%- for price_break in volume_pricing_array -%} + {%- if current_qty_for_volume_pricing >= price_break.minimum_quantity -%} + {%- assign price_break_price = price_break.price | money_with_currency -%} + + {{- + 'products.product.volume_pricing.price_at_each' + | t: price: price_break_price + -}} + + {%- break -%} + {%- endif -%} + {%- endfor -%} + {%- endif -%} +
+ {%- else -%} + {%- assign variant_price = product.selected_or_first_available_variant.price + | money_with_currency + -%} + {%- assign variant_price_compare = product.selected_or_first_available_variant.compare_at_price -%} +
+ {%- if variant_price_compare -%} +
+
+ {{ 'products.product.price.regular_price' | t }} +
+
+ + {{ variant_price_compare | money_with_currency }} + +
+
+ {{ 'products.product.price.sale_price' | t }} +
+
+ + {{- 'products.product.volume_pricing.price_at_each' | t: price: variant_price -}} + +
+
+ {%- else -%} + + {{- 'products.product.volume_pricing.price_at_each' | t: price: variant_price -}} + + {%- endif -%} +
+ {%- endif -%} +
+ {%- endif -%}
- -
- {%- when 'quantity_selector' -%} -
- {% comment %} TODO: enable theme-check once `item_count_for_variant` is accepted as valid filter {% endcomment %} - {% # theme-check-disable %} - {%- assign cart_qty = cart | item_count_for_variant: product.selected_or_first_available_variant.id -%} - {% # theme-check-enable %} - -
- - - - - - {%- liquid - assign volume_pricing_array = product.selected_or_first_available_variant.quantity_price_breaks | sort: 'quantity' | reverse - assign current_qty_for_volume_pricing = cart_qty | plus: product.selected_or_first_available_variant.quantity_rule.min - if cart_qty > 0 - assign current_qty_for_volume_pricing = cart_qty | plus: product.selected_or_first_available_variant.quantity_rule.increment - endif - - -%} + {%- endif -%} + {%- if product.selected_or_first_available_variant.quantity_rule.max != null -%} + + {{- + 'products.product.quantity.maximum_of' + | t: quantity: product.selected_or_first_available_variant.quantity_rule.max + -}} + + {%- endif -%} +
{%- if product.quantity_price_breaks_configured? -%} - + {%- if product.selected_or_first_available_variant.quantity_price_breaks.size > 0 -%} - {%- assign variant_price_compare = product.selected_or_first_available_variant.compare_at_price -%} -
- {%- if variant_price_compare -%} -
-
- {{ 'products.product.price.regular_price' | t }} -
-
- - {{ variant_price_compare | money_with_currency }} - -
-
- {%- endif -%} - {%- if current_qty_for_volume_pricing < volume_pricing_array.last.minimum_quantity -%} - {%- assign variant_price = product.selected_or_first_available_variant.price | money_with_currency -%} - {{ 'products.product.volume_pricing.price_at_each' | t: price: variant_price }} - {%- else -%} - {%- for price_break in volume_pricing_array -%} - {%- if current_qty_for_volume_pricing >= price_break.minimum_quantity -%} - {%- assign price_break_price = price_break.price | money_with_currency -%} - {{ 'products.product.volume_pricing.price_at_each' | t: price: price_break_price }} - {%- break -%} - {%- endif -%} - {%- endfor -%} - {%- endif -%} -
- {%- else -%} - {%- assign variant_price = product.selected_or_first_available_variant.price | money_with_currency -%} - {%- assign variant_price_compare = product.selected_or_first_available_variant.compare_at_price -%} -
- {%- if variant_price_compare -%} -
-
- {{ 'products.product.price.regular_price' | t }} -
-
- - {{ variant_price_compare | money_with_currency }} - -
-
- {{ 'products.product.price.sale_price' | t }} -
-
- {{ 'products.product.volume_pricing.price_at_each' | t: price: variant_price }} -
-
- {%- else -%} - {{ 'products.product.volume_pricing.price_at_each' | t: price: variant_price }} - {%- endif -%} -
+ {{ 'products.product.volume_pricing.title' | t }} +
    +
  • + {{ product.selected_or_first_available_variant.quantity_rule.min }}+ + {%- assign price = product.selected_or_first_available_variant.price + | money_with_currency + -%} + + {{- 'sections.quick_order_list.each' | t: money: price -}} + +
  • + {%- for price_break in product.selected_or_first_available_variant.quantity_price_breaks -%} + {%- assign price_break_price = price_break.price | money_with_currency -%} +
  • + + {{- price_break.minimum_quantity -}} + + + {{- 'sections.quick_order_list.each' | t: money: price_break_price -}} + +
  • + {%- endfor -%} +
+ {%- if product.selected_or_first_available_variant.quantity_price_breaks.size >= 3 -%} + + + + {%- endif -%} {%- endif -%} -
+ {%- endif -%}
-
- {%- if product.selected_or_first_available_variant.quantity_rule.increment > 1 -%} - - {{- - 'products.product.quantity.multiples_of' - | t: quantity: product.selected_or_first_available_variant.quantity_rule.increment - -}} - - {%- endif -%} - {%- if product.selected_or_first_available_variant.quantity_rule.min > 1 -%} - - {{- - 'products.product.quantity.minimum_of' - | t: quantity: product.selected_or_first_available_variant.quantity_rule.min - -}} + {%- when 'popup' -%} + + + + + {{- block.settings.text -}} + + {%- when 'share' -%} + {% assign share_url = product.selected_variant.url | default: product.url | prepend: request.origin %} + {% render 'share-button', block: block, share_link: share_url %} + + {%- when 'variant_picker' -%} + {% render 'product-variant-picker', product: product, block: block, product_form_id: product_form_id %} + {%- when 'buy_buttons' -%} + {%- render 'buy-buttons', + block: block, + product: product, + product_form_id: product_form_id, + section_id: section.id, + show_pickup_availability: true + -%} + {%- when 'rating' -%} + {%- if product.metafields.reviews.rating.value != blank -%} + {% liquid + assign rating_decimal = 0 + assign decimal = product.metafields.reviews.rating.value.rating | modulo: 1 + if decimal >= 0.3 and decimal <= 0.7 + assign rating_decimal = 0.5 + elsif decimal > 0.7 + assign rating_decimal = 1 + endif + %} + +

+ - {%- endif -%} - {%- if product.selected_or_first_available_variant.quantity_rule.max != null -%} - - {{- - 'products.product.quantity.maximum_of' - | t: quantity: product.selected_or_first_available_variant.quantity_rule.max - -}} +

+

+ + + {{- product.metafields.reviews.rating_count }} + {{ 'accessibility.total_reviews' | t -}} - {%- endif -%} -

- {%- if product.quantity_price_breaks_configured? -%} - - {%- if product.selected_or_first_available_variant.quantity_price_breaks.size > 0 -%} - {{ 'products.product.volume_pricing.title' | t }} -
    -
  • - {{ product.selected_or_first_available_variant.quantity_rule.min }}+ - {%- assign price = product.selected_or_first_available_variant.price | money_with_currency -%} - {{ 'sections.quick_order_list.each' | t: money: price }} -
  • - {%- for price_break in product.selected_or_first_available_variant.quantity_price_breaks -%} - {%- assign price_break_price = price_break.price | money_with_currency -%} -
  • - {{ price_break.minimum_quantity }} - {{ 'sections.quick_order_list.each' | t: money: price_break_price }} -
  • - {%- endfor -%} -
- {%- if product.selected_or_first_available_variant.quantity_price_breaks.size >= 3 -%} - - - - {%- endif -%} - {%- endif -%} -
+

{%- endif -%} -
- {%- when 'popup' -%} - - - - - {{- block.settings.text -}} - - {%- when 'share' -%} - {% assign share_url = product.selected_variant.url | default: product.url | prepend: request.origin %} - {% render 'share-button', - block: block, - share_link: share_url - %} - - {%- when 'variant_picker' -%} - {% render 'product-variant-picker', product: product, block: block, product_form_id: product_form_id %} - {%- when 'buy_buttons' -%} - {%- render 'buy-buttons', block: block, product: product, product_form_id: product_form_id, section_id: section.id, show_pickup_availability: true -%} - {%- when 'rating' -%} - {%- if product.metafields.reviews.rating.value != blank -%} - {% liquid - assign rating_decimal = 0 - assign decimal = product.metafields.reviews.rating.value.rating | modulo: 1 - if decimal >= 0.3 and decimal <= 0.7 - assign rating_decimal = 0.5 - elsif decimal > 0.7 - assign rating_decimal = 1 - endif - %} - -

- -

-

- - - {{- product.metafields.reviews.rating_count }} - {{ 'accessibility.total_reviews' | t -}} - -

- {%- endif -%} - {%- when 'complementary' -%} - - {%- if recommendations.performed and recommendations.products_count > 0 -%} -
- - {%- endif -%} - {{ 'component-card.css' | asset_url | stylesheet_tag }} - {{ 'component-complementary-products.css' | asset_url | stylesheet_tag }} - {%- if block.settings.enable_quick_add -%} - {{ 'quick-add.css' | asset_url | stylesheet_tag }} - - {%- endif -%} - - {%- when 'icon-with-text' -%} - {% render 'icon-with-text', - block: block - %} - {%- endcase -%} - {%- endfor -%} - - {{ 'products.product.view_full_details' | t }} - {% render 'icon-arrow' %} - -
-
- {%- if section.settings.media_position == 'right' -%} - {% comment %} Duplicate gallery to display after product content on tablet/desktop breakpoint {% endcomment %} -
- {% render 'product-media-gallery', variant_images: variant_images, is_duplicate: true %} +
+ + {%- endif -%} + {{ 'component-card.css' | asset_url | stylesheet_tag }} + {{ 'component-complementary-products.css' | asset_url | stylesheet_tag }} + {%- if block.settings.enable_quick_add -%} + {{ 'quick-add.css' | asset_url | stylesheet_tag }} + + {%- endif -%} + + {%- when 'icon-with-text' -%} + {% render 'icon-with-text', block: block %} + {%- endcase -%} + {%- endfor -%} + + {{ 'products.product.view_full_details' | t }} + {% render 'icon-arrow' %} + +
- {%- endif -%} -
+ {%- if section.settings.media_position == 'right' -%} + {% comment %} Duplicate gallery to display after product content on tablet/desktop breakpoint {% endcomment %} +
+ {% render 'product-media-gallery', variant_images: variant_images, is_duplicate: true %} +
+ {%- endif -%} + - {% render 'product-media-modal' variant_images: variant_images %} + {% render 'product-media-modal', variant_images: variant_images %} - {% assign popups = section.blocks | where: 'type', 'popup' %} - {%- for block in popups -%} - - - - {%- endfor -%} + + {%- endfor -%} - {%- if product.media.size > 0 -%} - - - {%- endif -%} + {%- if product.media.size > 0 -%} + + + {%- endif -%} - {%- if first_3d_model -%} - - - {%- endif -%} + {%- if first_3d_model -%} + + + {%- endif -%} - + - {%- liquid - if product.selected_or_first_available_variant.featured_media - assign seo_media = product.selected_or_first_available_variant.featured_media - else - assign seo_media = product.featured_media - endif - -%} + {%- liquid + if product.selected_or_first_available_variant.featured_media + assign seo_media = product.selected_or_first_available_variant.featured_media + else + assign seo_media = product.featured_media + endif + -%} - + diff --git a/sections/predictive-search.liquid b/sections/predictive-search.liquid index 2075f2820d4..ad2add596a9 100644 --- a/sections/predictive-search.liquid +++ b/sections/predictive-search.liquid @@ -54,7 +54,7 @@ >
-

{{ collection.title }}

+

{{ collection.title | escape }}

@@ -85,7 +85,7 @@ >
-

{{ page.title }}

+

{{ page.title | escape }}

@@ -99,7 +99,7 @@ >
-

{{ article.title }}

+

{{ article.title | escape }}

@@ -191,7 +191,7 @@ >
-

{{ page.title }}

+

{{ page.title | escape }}

@@ -205,7 +205,7 @@ >
-

{{ article.title }}

+

{{ article.title | escape }}