1

I'm trying to set scheduled catalog price rules in my store.

When applying a catalog price rule to my store it does not work when the starting date is set to the current day.

It does work when I subtract one day of the current date.

Examples (using 2016-11-21 as the current date):

  • From: 2016-11-21. Doesn't work.
  • From: 2016-11-20. Does work.

Is this supposed to happen? If not, what could be the issue?

I'm running Magento CE 1.9.2.4.

Thank you!

2 Answers 2

1

Problem in this instance is on these lines

$fromTime = (int) strtotime($rule->getFromDate());
$toTime = (int) strtotime($rule->getToDate());

Update the two lines to

$fromTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime($rule->getFromDate()));
$toTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime($rule->getToDate()));

You should add class to override if you can.

Please check more detail here: https://magento.stackexchange.com/a/82394

0

Please match your date with your current store time stamp.

For example, If your current store stamp is US then please consider from date as per US not other country.

8
  • My current timestamp is 2016-11-21 12:20:10 and so is my server timestamp. So setting the catalog rule to 2016-11-21 should (in theory) work, right?
    – Roy van Os
    Nov 21, 2016 at 11:20
  • yeah it should work.. can you please give me live url? So i can check Nov 21, 2016 at 12:03
  • I'm not able to do that since this is a project for a customer with valuable data.
    – Roy van Os
    Nov 21, 2016 at 13:12
  • it's ok .But there is only one possibility for locale so please check proper. Nov 21, 2016 at 13:20
  • My timezone is set to Western Europe Standard Time (Europe/Amsterdam) and so is the server we're running the store on. catalog price rule dates are set using the same timezone as the store and server.
    – Roy van Os
    Nov 21, 2016 at 13:28

Your Answer

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

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