0

This is a group product with tier prices in our shop. As you can see, the lowest possible price is 151,20 €.

enter image description here

But in the category view it shows 167,20 € instead of 151,20 €

enter image description here

How can I fix it?

1
  • I think you will have trouble with price filtering too Jun 5, 2020 at 12:11

1 Answer 1

1

To check the tier price of any product, you can use the following code in the conditions :

<?php
$tierprices = array();
if ($_product->getTypeId() == 'grouped'){
    $associatedProducts = $_product->getTypeInstance(true)->getAssociatedProducts($_product);
    foreach ($associatedProducts as $assoc_product) {
    //$assoc_product = Mage::getModel('catalog/product')->load($assoc_product->getId());// use this only if necessary
        if($assoc_product->getTierPrice()){
            $product_tier_prices = $this->getTierPrices($assoc_product);
            if(count($product_tier_prices) > 0){
                $product_tier_prices = (object)$product_tier_prices;
                foreach($product_tier_prices as $key=>$value){
                    $value = (object)$value;
                    $tierprices[] = $value->price;
                }
            }
        }  
    }
} ?>

In this way you will get tier prices of all the associated products of Group product. You need to use the following condition to display "minimum tier" or "as low as":

<?php if(count($tierprices) > 0){ ?>
    <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
        <?php echo $_coreHelper->currency(min($tierprices), true, false) ?>
    </span>

<?php } else { ?>
all your rest of normal price will come here.
<?php } ?>

And more information Check link :-

https://www.reddit.com/r/Magento/comments/5kxvbc/always_show_lowest_price_for_grouped_product_with/

Hope this help you

Thanks ...

1
  • Your answer is about Magento 1, not 2 ...
    – Black
    Jun 15, 2020 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.