How to create custom log files for Magento 1

The standard way for logging is to use

Mage::log(“This will show up in var/log/system.log”);

However, you may want to split these up so specific information goes to the same place. To do this, you simply need to do:

Mage::log(“This will show up in var/log/custom.log”, null, custom.log);

If you need to add a variable you are trying to log, you would use:

Mage::log(“The variable is: ” . $variable, null, custom.log);

Magento doesn’t displays group price

The issue:

I have multiple customer groups which have different prices then the standard price on the website. If the standard price is higher then the group price, the group price shows up. If the standard price is lower then the group price, the standard price is only displayed.


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 PricesWholesale PricingRetailer 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.

This was from my answer to this StackExchange question: