5

This is a bit frustrating but, some of my products displays the group price while some others not.

I have the customer group X, and for this customer group I have different prices than the regular price. The issue is, that I've configured all the prices of 'group price' in all the products but only some of them displays the group price on the frontend. Anyone knows why ? Or some clue to find out why this can happen ?

When I try to see the prices, I access to the website with an account of a customer from the group X, so this is not the problem.. but I don't know where the problem is.

Thanks.

EDIT: If the regular price is higher than the 'group price' magento displays the group price, but if the regular price is lower than the 'group price' it doesn't display the group price... this is very strange, isn't it? Anyone knows why?

1
  • You can also test the logic in trying to add a "special price" that is greater than regular price. The special price is not displayed. I want to do the same but do not understand?? please explain to me my
    – user6052
    Commented Apr 7, 2014 at 21:44

1 Answer 1

23

This is actually by design.

Magento will show the minimum price, because the retail price should always be higher then the group prices (otherwise, why wouldn't the customer just not login then attempt to checkout).

This is evident in the following function:

    /**
 * Apply group price for product
 *
 * @param Mage_Catalog_Model_Product $product
 * @param float $finalPrice
 * @return float
 */
protected function _applyGroupPrice($product, $finalPrice)
{
    $groupPrice = $product->getGroupPrice();
    if (is_numeric($groupPrice)) {
        $finalPrice = min($finalPrice, $groupPrice);
    }
    return $finalPrice;
}

Source: app/code/core/Mage/Catalog/Model/Product/Type/Price.php

So running through you scenario above, using EE 1.13, I logged into a customer account. The regular price of the product was $150. The retailer group price I set as $250, and the wholesale group price I set as $125. The wholesale displayed as $125, however the retailer group price was $150. Again, this is as design, it's not a bug but a feature.

Backend Prices Wholesale Pricing Retailer Pricing

You can also try the logic by trying to add a "special price" that is greater then the regular price. The special price won't show.

Solutions for your needs.

  1. Make sure your regular price is always higher then groups
  2. Possibly create an extension that extends the logic in app/code/core/Mage/Catalog/Model/Product/Type/Price.php (this may not be the only file you need to extend, however it is the file with the majority of the pricing logic).

If you do end up creating your own extension, always remember to never edit core code.

2
  • 2
    a very good and detailed explanation! Thanks a lot for your accurate answer :)
    – inavas
    Commented May 9, 2013 at 15:51
  • 2
    Dude, THANK YOU. I've been working with the platform for 7 years and I had no idea that the retail price was meant to be higher than group products for the correct prices to show. Been tearing my hair our for hours thinking we had a price indexing issue or something. Commented Jun 4, 2020 at 14:21

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.