enter image description here

have a problem with catalog price rules in 1.9.0

we uploaded about 1000 products in a site.

we applied catalog price rules to give discount for 500 products.

i did't gave any date limit for catalog price rules

those special prices are displaying only until mid night.

next day, after mid- night special prices are not displaying in site.

here i posted catalog price rule table : catalogrule_product_price image

seems primary key not reached to max limit, please give some guidance about this image.

  • 1
    Please make sure you have setup the the Magento default Cron May 15, 2015 at 11:43
  • yes, cron is working fine, i used aoe scheduler magento extension : prntscr.com/75g4ie May 15, 2015 at 11:45

1 Answer 1


source : https://stackoverflow.com/questions/25280095/magento-catalog-price-rule-disappears-at-night

credits for genius "Alexei Yerofeyev". mostly i will never forget this man.

Yes, this is a bug in Magento (or some logic beyond my understanding). When Magento displays products on frontend, it checks if there are catalog rules for this date. And the date used for this check is your local, so in your case GMT+5. However, when catalog rules are being applied, it uses GMT date. So that means that you aren't able to apply rules until 5 AM.

The problem is in Mage_CatalogRule_Model_Action_Index_Refresh::execute() function. You will have to rewrite this function/class either in your extension, or via the local version of the file.

You have to replace line 121 here : app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh.php

$timestamp = $coreDate->gmtTimestamp('Today');

with this line:

$timestamp = Mage::app()->getLocale()->date(null, null, null, true)->get(Zend_Date::TIMESTAMP);

After that you should be able to apply the rules.

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