Skip to content
Snippets Groups Projects
Commit f1349461 authored by Mike Weis's avatar Mike Weis
Browse files

MAGETWO-35054: Tier price message not shown in product page for some customer groups

 - fixed
parent 0dc98542
Branches
No related merge requests found
......@@ -162,10 +162,17 @@ class TierPrice extends AbstractPrice implements TierPriceInterface, BasePricePr
$qtyCache = [];
foreach ($priceList as $priceKey => $price) {
/* filter price by customer group */
if ($price['cust_group'] !== $this->customerGroup && $price['cust_group'] !== $this->groupManagement->getAllCustomersGroup()->getId()) {
$eligible = false;
if ($price['cust_group'] == $this->customerGroup) {
$eligible = true;
} elseif ($price['cust_group'] == $this->groupManagement->getAllCustomersGroup()->getId()) {
$eligible = true;
}
if (!$eligible) {
unset($priceList[$priceKey]);
continue;
}
/* select a lower price for each quantity */
if (isset($qtyCache[$price['price_qty']])) {
$priceQty = $qtyCache[$price['price_qty']];
......
......@@ -73,7 +73,7 @@ $product = $block->getSaleableItem();
);
?><?php echo __('each') ?>
<?php if ($block->getShowDetailedPrice() !== false): ?>
<?php echo __('and') ?>&nbsp;<strong class="benefit"><?php echo __('save')?>
<?php echo __(' and') ?>&nbsp;<strong class="benefit"><?php echo __('save ')?>
<span class="percent tier-<?php echo $index ?>"><?php echo $tierPriceModel->getSavePercent($price['price']) ?></span>%
</strong>
<?php endif ?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment