Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions app/code/core/Mage/Catalog/Helper/Product/Type/Composite.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,17 @@ public function prepareJsonProductConfig($product)
$_tierPrices = [];
$_tierPricesInclTax = [];
foreach ($product->getTierPrice() as $tierPrice) {
// Skip tier prices >= lower of final price or group price
$comparePrice = $_finalPrice;
$groupPrice = $product->getGroupPrice();
if ($groupPrice !== null && $groupPrice < $comparePrice) {
$comparePrice = $groupPrice;
}

if ((float) $tierPrice['website_price'] >= $comparePrice) {
continue;
}

$_tierPrices[] = Mage::helper('core')->currency(
Mage::helper('tax')->getPrice($product, (float) $tierPrice['website_price'], false) - $_priceExclTax,
false,
Expand Down
Loading