From dd0ef0d59976dc856c3e3f6def1ba10e053c4d76 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Thu, 18 Feb 2021 15:05:40 +0100 Subject: [PATCH] Display unit price info if feature is enabled --- app/views/shared/menu/_cart_sidebar.html.haml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/app/views/shared/menu/_cart_sidebar.html.haml b/app/views/shared/menu/_cart_sidebar.html.haml index a511faaffa..8a1561903c 100644 --- a/app/views/shared/menu/_cart_sidebar.html.haml +++ b/app/views/shared/menu/_cart_sidebar.html.haml @@ -23,15 +23,16 @@ %span.quantity {{ line_item.quantity }} %td .total-price.text-right {{ line_item.total_price | localizeCurrency }} - .flex.unit-price - %div{:style => "margin-right: 5px"} - %question-mark-with-tooltip{"question-mark-with-tooltip" => "_", - "question-mark-with-tooltip-append-to-body" => "true", - "question-mark-with-tooltip-placement" => "top", - "question-mark-with-tooltip-animation" => true, - context: "'cart-sidebar'"} - .options-text - {{ line_item.variant.unit_price_price | localizeCurrency }} / {{ line_item.variant.unit_price_unit }} + - if feature? :unit_price, spree_current_user + .flex.unit-price + %div{:style => "margin-right: 5px"} + %question-mark-with-tooltip{"question-mark-with-tooltip" => "_", + "question-mark-with-tooltip-append-to-body" => "true", + "question-mark-with-tooltip-placement" => "top", + "question-mark-with-tooltip-animation" => true, + context: "'cart-sidebar'"} + .options-text + {{ line_item.variant.unit_price_price | localizeCurrency }} / {{ line_item.variant.unit_price_unit }} .cart-empty{"ng-show" => "Cart.line_items.length == 0"} %p