Skip to content

Commit 81db656

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-33393' into MAGETWO-37571
2 parents 19ad462 + 65443b4 commit 81db656

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,26 @@ $product = $block->getSaleableItem();
5858
data-tier-price="<?php echo $block->escapeHtml($block->jsonEncode($tierPriceData)); ?>">
5959
<?php echo __('Click for price'); ?></a>
6060
<?php else:
61-
echo __(
62-
'Buy %1 for %2',
63-
$price['price_qty'],
64-
$block->renderAmount(
65-
$price['price'],
66-
[
67-
'price_id' => $index,
68-
'id_suffix' => '-' . $index,
69-
'include_container' => true,
70-
'zone' => \Magento\Framework\Pricing\Render::ZONE_ITEM_OPTION
71-
]
72-
)
61+
$priceAmountBlock = $block->renderAmount(
62+
$price['price'],
63+
[
64+
'price_id' => $index,
65+
'id_suffix' => '-' . $index,
66+
'include_container' => true,
67+
'zone' => \Magento\Framework\Pricing\Render::ZONE_ITEM_OPTION
68+
]
7369
);
74-
?><?php echo __('each') ?>
75-
<?php if ($block->getShowDetailedPrice() !== false): ?>
76-
&nbsp;<?php echo __('and') ?>&nbsp;<strong class="benefit"><?php echo __('save')?>
77-
<span class="percent tier-<?php echo $index ?>">&nbsp;<?php echo $tierPriceModel->getSavePercent($price['price']) ?></span>%
78-
</strong>
79-
<?php endif ?>
70+
?>
71+
<?php echo ($block->getShowDetailedPrice() !== false)
72+
? __(
73+
'Buy %1 for %2 each and <strong class="benefit">save<span class="percent tier-%3">&nbsp;%4</span>%</strong>',
74+
$price['price_qty'],
75+
$priceAmountBlock,
76+
$index,
77+
$tierPriceModel->getSavePercent($price['price'])
78+
)
79+
: __('Buy %1 for %2 each', $price['price_qty'], $priceAmountBlock);
80+
?>
8081
<?php endif; ?>
8182
</li>
8283
<?php endforeach; ?>

0 commit comments

Comments
 (0)