Skip to content

Commit 3701fff

Browse files
committed
ACP2E-45: Tiered pricing tax always shows including tax
- Removed the extra spaces.
1 parent 0268086 commit 3701fff

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

app/code/Magento/Catalog/Pricing/Price/TierPrice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TierPrice extends AbstractPrice implements TierPriceInterface, BasePricePr
8787
*/
8888
public function __construct(
8989
Product $saleableItem,
90-
$quantity,
90+
$quantity,
9191
CalculatorInterface $calculator,
9292
PriceCurrencyInterface $priceCurrency,
9393
Session $customerSession,

app/code/Magento/ConfigurableProduct/view/base/templates/product/price/tier_price.phtml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,37 @@
88
<script type="text/x-magento-template" id="tier-prices-template">
99
<ul class="prices-tier items">
1010
<% var inclExclPrice = ' <span class="price-wrapper price-excluding-tax"'
11-
+ 'data-label="<?= $block->escapeHtml(__('Excl. Tax')) ?>">'
12-
+ '<span class="price">&nbsp;%1</span>'
13-
+ '</span>'
11+
+ 'data-label="<?= $block->escapeHtml(__('Excl. Tax')) ?>">'
12+
+ '<span class="price">&nbsp;%1</span>'
13+
+ '</span>'
1414
%>
1515

1616
<% _.each(tierPrices, function(item, key) { %>
17-
<% var itemInclExclPrice = item.hasOwnProperty('incl_excl_tax_price')
18-
? inclExclPrice.replace('%1', priceUtils.formatPrice(item['incl_excl_tax_price'], currencyFormat))
19-
: ''
20-
%>
21-
<% var price = item.hasOwnProperty('excl_tax_price')
22-
? priceUtils.formatPrice(item['excl_tax_price'], currencyFormat)
23-
: priceUtils.formatPrice(item.price, currencyFormat)
24-
%>
17+
<% var itemInclExclPrice = item.hasOwnProperty('incl_excl_tax_price')
18+
? inclExclPrice.replace('%1', priceUtils.formatPrice(item['incl_excl_tax_price'], currencyFormat))
19+
: ''
20+
%>
21+
<% var price = item.hasOwnProperty('excl_tax_price')
22+
? priceUtils.formatPrice(item['excl_tax_price'], currencyFormat)
23+
: priceUtils.formatPrice(item.price, currencyFormat)
24+
%>
2525

26-
<% var priceStr = '<span class="price-container price-tier_price">'
27-
+ '<span data-price-amount="' + priceUtils.formatPrice(item.price, currencyFormat) + '"'
28-
+ ' data-price-type=""' + ' class="price-wrapper price-including-tax">'
29-
+ '<span class="price">' + price + '</span>'
30-
+ '</span>' + itemInclExclPrice + '</span>';
31-
%>
32-
<li class="item">
33-
<%= '<?= $block->escapeHtml(__('Buy %1 for %2 each and', '%1', '%2')) ?>'
34-
.replace('%1', item.qty)
35-
.replace('%2', priceStr)
26+
<% var priceStr = '<span class="price-container price-tier_price">'
27+
+ '<span data-price-amount="' + priceUtils.formatPrice(item.price, currencyFormat) + '"'
28+
+ ' data-price-type=""' + ' class="price-wrapper price-including-tax">'
29+
+ '<span class="price">' + price + '</span>'
30+
+ '</span>' + itemInclExclPrice + '</span>';
3631
%>
37-
<strong class="benefit">
38-
<?= $block->escapeHtml(__('save')) ?><span
39-
class="percent tier-<%= key %>">&nbsp;<%= item.percentage %></span>%
40-
</strong>
41-
</li>
32+
<li class="item">
33+
<%= '<?= $block->escapeHtml(__('Buy %1 for %2 each and', '%1', '%2')) ?>'
34+
.replace('%1', item.qty)
35+
.replace('%2', priceStr)
36+
%>
37+
<strong class="benefit">
38+
<?= $block->escapeHtml(__('save')) ?><span
39+
class="percent tier-<%= key %>">&nbsp;<%= item.percentage %></span>%
40+
</strong>
41+
</li>
4242
<% }); %>
4343
</ul>
4444
</script>

0 commit comments

Comments
 (0)