Fix height of invisible "in cart" text

While the text "x in cart" isn't visible, the item quantity is not set.
A missing variable leads to longer text that is taken up more space. In
this case it was two lines instead of one line. The resulting extra line
of margin disappeared when adding to the cart and the rest of the page
jumped up.
This commit is contained in:
Maikel Linke
2020-07-07 13:46:03 +10:00
parent 57178659c3
commit 9da91576ac

View File

@@ -8,7 +8,7 @@
{{ "js.shop_variant_no_group_buy.increment" | t }}
%br
.variant-quantity-display{ng: {class: "{visible: variant.line_item.quantity}"}}
{{ "js.shop_variant_no_group_buy.in_cart" | t:{quantity: variant.line_item.quantity} }}
{{ "js.shop_variant_no_group_buy.in_cart" | t:{quantity: variant.line_item.quantity || 0} }}
%input{type: :hidden,
name: "variants[{{::variant.id}}]",
ng: {model: "variant.line_item.quantity"}}