Skip to content

Commit f134946

Browse files
author
Mike Weis
committed
MAGETWO-35054: Tier price message not shown in product page for some customer groups
- fixed
1 parent 0dc9854 commit f134946

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,17 @@ protected function filterTierPrices(array $priceList)
162162
$qtyCache = [];
163163
foreach ($priceList as $priceKey => $price) {
164164
/* filter price by customer group */
165-
if ($price['cust_group'] !== $this->customerGroup && $price['cust_group'] !== $this->groupManagement->getAllCustomersGroup()->getId()) {
165+
$eligible = false;
166+
if ($price['cust_group'] == $this->customerGroup) {
167+
$eligible = true;
168+
} elseif ($price['cust_group'] == $this->groupManagement->getAllCustomersGroup()->getId()) {
169+
$eligible = true;
170+
}
171+
if (!$eligible) {
166172
unset($priceList[$priceKey]);
167173
continue;
168174
}
175+
169176
/* select a lower price for each quantity */
170177
if (isset($qtyCache[$price['price_qty']])) {
171178
$priceQty = $qtyCache[$price['price_qty']];

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ $product = $block->getSaleableItem();
7373
);
7474
?><?php echo __('each') ?>
7575
<?php if ($block->getShowDetailedPrice() !== false): ?>
76-
<?php echo __('and') ?>&nbsp;<strong class="benefit"><?php echo __('save')?>
76+
<?php echo __(' and') ?>&nbsp;<strong class="benefit"><?php echo __('save ')?>
7777
<span class="percent tier-<?php echo $index ?>"><?php echo $tierPriceModel->getSavePercent($price['price']) ?></span>%
7878
</strong>
7979
<?php endif ?>

0 commit comments

Comments
 (0)