2

I am facing a very strange problem of catalog price rules in magento. I have created catalog price rules to effect prices of product but sometime they automatically stop working then i have to reindex everything again and apply them again. Now i am looking for permanent solution. What i think the solution is to set a cron job and Re-Apply all the Catalog Price Rules through it. So how to Re-Apply all the Catalog Price Rules Programmatically ?

Has anybody also faced this problem ?

Thanks,

1 Answer 1

4

I had this before.
Because the catalog price rules have a start and end date, they need a constant reindex. (look in the tables catalogrule_product_*).
So when you apply all the rules they are valid for the current day only.
Magento already has a cron that applies the catalog rules that should run each day.
If you set up your cron to run this will be solved.
Add to your crontab:

*/5 * * * * /bin/sh /path/to/cron.sh

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.