From 5d4b31819575d40de48e17bcb7f3270a2a6af37a Mon Sep 17 00:00:00 2001 From: "Jason Zamora (jz)" Date: Tue, 19 Jun 2018 12:41:52 -0500 Subject: [PATCH] fix(catalog): STRF-4701 - Found some tests breaking due to some missing class names. Updated class names in the pricing to make sure they are consistent among the various code paths. Added some comments. --- templates/components/products/price-range.html | 6 +++--- templates/components/products/price.html | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/templates/components/products/price-range.html b/templates/components/products/price-range.html index 050607d8ad..a29aeb926f 100644 --- a/templates/components/products/price-range.html +++ b/templates/components/products/price-range.html @@ -1,5 +1,5 @@ {{#and price.retail_price_range.min.with_tax price.retail_price_range.max.with_tax}} -
+
{{theme_settings.pdp-retail-price-label}} {{price.retail_price_range.min.with_tax.formatted}} - {{price.retail_price_range.max.with_tax.formatted}}
@@ -23,7 +23,7 @@
{{theme_settings.pdp-price-label}} - {{price.price_range.min.with_tax.formatted}} - {{price.price_range.max.with_tax.formatted}} + {{price.price_range.min.with_tax.formatted}} - {{price.price_range.max.with_tax.formatted}} {{#and price.price_range.min.without_tax price.price_range.max.without_tax}} {{lang 'products.price_with_tax' tax_label=price.price_range.min.tax_label}} {{/and}} @@ -41,7 +41,7 @@
{{/and}} {{#and price.retail_price_range.min.without_tax price.retail_price_range.max.without_tax}} -
+
{{theme_settings.pdp-retail-price-label}} {{price.retail_price_range.min.without_tax.formatted}} - {{price.retail_price_range.max.without_tax.formatted}}
diff --git a/templates/components/products/price.html b/templates/components/products/price.html index bcf0e68962..395959c78a 100644 --- a/templates/components/products/price.html +++ b/templates/components/products/price.html @@ -1,3 +1,9 @@ +{{!-- There are 2 code paths for generating the PDP pricing HTML determined by the following #and condition. +If a 'price_range' exists then we generate all HTML in price-range.html, otherwise it is defined here. Both code +paths generate the same HTML structure with some differences in whether that element is displayed by default (css styling). + +If you are making a change here or in price-range.html, you probably want to make that change in both files. --}} + {{#and price.price_range (if theme_settings.price_ranges '==' true)}} {{> components/products/price-range price=price schema_org=schema_org}} {{else}} @@ -21,7 +27,7 @@ {{theme_settings.pdp-sale-price-label}} - {{price.with_tax.formatted}} + {{price.with_tax.formatted}} {{#if schema_org}} @@ -56,7 +62,7 @@ {{theme_settings.pdp-sale-price-label}} - {{price.without_tax.formatted}} + {{price.without_tax.formatted}} {{#if schema_org}} @@ -76,7 +82,7 @@ {{#if price.saved}}
{{lang 'products.you_save_opening_text'}} - + {{price.saved.formatted}} {{lang 'products.you_save_closing_bracket'}}