diff --git a/components/buy-button.tpl b/components/buy-button.tpl index 82fe457..7d78e93 100644 --- a/components/buy-button.tpl +++ b/components/buy-button.tpl @@ -1,7 +1,17 @@ +{%- if product.price_min_with_tax != product.price_max_with_tax -%} + {%- assign with_price = true -%} +{%- else -%} + {%- assign with_price = false -%} +{%- endif -%} + {%- capture _button_attributes %} data-product-id="{{ product.id }}" data-product="{{ product | json | escape }}" - data-settings="{"title":"{{ "add_to_cart" | lc | escape_once }}"}" + data-settings="{"title":"{{ "add_to_cart" | lc | escape_once }}" + {%- if with_price -%} + ,"button_style":"with_price" + {%- endif -%} + }" {% endcapture -%} {% if editmode != true and product.available? == false %} @@ -34,6 +44,10 @@ {% else %} {{ 'add_to_cart' | lc | escape_once }} {% endif -%} + + {%- if with_price and product.price_min_with_tax == product.price_max_with_tax -%} + {{ product.price_with_tax | money_with_currency: product.currency }} + {%- endif -%} diff --git a/components/menu-breadcrumbs-sd.tpl b/components/menu-breadcrumbs-sd.tpl index 0fc4056..ee87026 100644 --- a/components/menu-breadcrumbs-sd.tpl +++ b/components/menu-breadcrumbs-sd.tpl @@ -1,11 +1,14 @@ {%- assign breadcrumbsString = breadcrumbsScript | replace: '", '' | replace: site.url, '' | replace: '@', '' -%} {%- assign breadcrumbsObj = breadcrumbsString | json_parse -%} +{%- if breadcrumbsObj.itemListElement.size > 2 -%} + {%- assign breadcrumbsOffset = 1 -%} +{%- else -%} + {%- assign breadcrumbsOffset = 0 -%} +{%- endif -%}