diff --git a/themes/meraki/sections/product.liquid b/themes/meraki/sections/product.liquid index b1bbd63f..c03227e0 100644 --- a/themes/meraki/sections/product.liquid +++ b/themes/meraki/sections/product.liquid @@ -170,12 +170,6 @@ "type": "checkbox", "default": true }, - { - "type": "checkbox", - "id": "skip_cart", - "label": "Skip cart", - "default": false - }, { "label": "Background color", "id": "background_color", diff --git a/themes/meraki/snippets/add-to-cart.liquid b/themes/meraki/snippets/add-to-cart.liquid index 5af3c60a..cd1ad97b 100644 --- a/themes/meraki/snippets/add-to-cart.liquid +++ b/themes/meraki/snippets/add-to-cart.liquid @@ -31,17 +31,19 @@ class='spinner hidden' id='loading__cart' > - - {{ text }} - + {% if skip_cart %} + {{ 'snippets.product_preview.cta_button' | t }} + {% else %} + + {{ text }} + + {% endif %} {% javascript %} - const TRANSLATED_TEXT = { empty_inventory: "{{ 'errors.empty_inventory' | t }}" } - - const IS_CART_SKIPED = "{{ skip_cart }}"; + const IS_CART_SKIPED = Boolean("{{ skip_cart }}"); {% endjavascript %} diff --git a/themes/meraki/snippets/product-preview.liquid b/themes/meraki/snippets/product-preview.liquid index 3363dfa5..581ea83f 100644 --- a/themes/meraki/snippets/product-preview.liquid +++ b/themes/meraki/snippets/product-preview.liquid @@ -35,7 +35,7 @@
This is a placeholder description for the product.
{%- when 'add_to_cart' -%} - {% render 'add-to-cart', text: block.settings.text_content, is_sticky: block.settings.is_sticky, background_color: block.settings.background_color, text_color: block.settings.text_color, is_placeholder : is_placeholder %} + {% render 'add-to-cart', text: block.settings.text_content, is_sticky: block.settings.is_sticky, background_color: block.settings.background_color, text_color: block.settings.text_color, is_placeholder : is_placeholder, skip_cart: product.skip_to_checkout %} {%- when 'accordion' -%} {%- render 'accordion', accordion_title: block.settings.accordion_title, accordion_details: block.settings.accordion_details, background_color: block.settings.background_color, text_color: block.settings.text_color, space_bottom: block.settings.space_bottom -%} {%- when 'express_checkout' -%} diff --git a/themes/meraki/snippets/single-product.liquid b/themes/meraki/snippets/single-product.liquid index b8d8f264..429d9c44 100644 --- a/themes/meraki/snippets/single-product.liquid +++ b/themes/meraki/snippets/single-product.liquid @@ -66,7 +66,7 @@ {%- when 'stock' -%} {% render 'stock', stock_title: block.settings.stock_title, stock_items_left: block.settings.stock_items_left, total_stock_items: block.settings.total_stock_items %} {%- when 'add_to_cart' -%} - {% render 'add-to-cart', text: block.settings.text_content, is_sticky: block.settings.is_sticky, background_color: block.settings.background_color, text_color: block.settings.text_color, snippetId: snippetId, skip_cart: block.settings.skip_cart %} + {% render 'add-to-cart', text: block.settings.text_content, is_sticky: block.settings.is_sticky, background_color: block.settings.background_color, text_color: block.settings.text_color, snippetId: snippetId, skip_cart: product.skip_to_checkout %} {%- when 'accordion' -%} {%- render 'accordion', accordion_title: block.settings.accordion_title, accordion_details: block.settings.accordion_details, border_color: block.settings.border_color, text_color: block.settings.text_color, space_bottom: block.settings.space_bottom -%} {%- when 'express_checkout' -%}