0

We are using Magento version 1.9.2.3. We have a cart price rules setup based on user's group and product's custom attribute. It sometimes doesn't work. And I am not sure the reason if it. I can't really replicate the issue as it is on and off type of issue.

Users are complaining about it for not getting discounts and i can verify it form their order but if i manually add same order for the specific user then i see the discount.

Has any one experienced this issue. I will really appreciate your help on this

Thanks.

orbnexus
  • 737
  • 1
  • 9
  • 38
  • I'm voting to close this question as off-topic because Stack Overflow is a [programming-related](http://stackoverflow.com/help/on-topic) Q&A site. Your question is not about programming. Perhaps you should post it on http://magento.stackexchange.com instead? – Enigmativity Apr 28 '16 at 01:13

2 Answers2

0

Catalog price rules Need Cron jobs. install this extension and check whether cron is working or not. if it is working check your Default Store Timezone is matching your server timezone.

enter image description here

credits : @Alexei Yerofeyev

if both timings are same, than Yes, this is a bug in Magento (or some logic beyond my understanding). we had the same problem. 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 our case it was GMT+5. However, when catalog rules are being applied, it uses GMT date. So that means that we were'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.

we replaced line 121:

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

with this line:

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

After that it worked for us.

if that also didt worked for you, than

using AOE scheduler extension, change catalogrule_apply_all cron expression from 0 1 * * * to 30 */6 * * * and it may work for you.

if possible check the order time that didt applied discount and you may need to find what is exact timings that price rules are not working. Temparary fix is clicking "Apply catalog rules " button again when it was not working.

fresher
  • 917
  • 2
  • 20
  • 55
0

In one shop we had this issue where sometimes the catalog price rules would not work but most of the time it worked fine (even on the same day or within the same hour for the same product!). It was very hard to reproduce as the catelogrule prices were correct (database table filled with correct dates and product ids and correct prices).

We already made use of an extra extension to make sure the rules were applied everyday and still faced the problem...

But after some weeks we found a pattern: it turns out this only happens when an order is made through the backend/admin. There is a little known bug in Magento that is nicely described in this blog:

http://www.techytalk.info/catalog-price-rules-not-applied-creating-order-magento-admin/

hope it helps someone!

Isolde
  • 626
  • 6
  • 12