Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joostvanveen/40fd2efc2126679e0c8980d26566341c to your computer and use it in GitHub Desktop.
Save joostvanveen/40fd2efc2126679e0c8980d26566341c to your computer and use it in GitHub Desktop.
Reindex catalogrule prices in Magento 2
## Reindex catalogrule prices in Magento 2
## Navigate to Magento root, e.g.:
cd ~/magento2
## Reindex the catalogrule prices
php bin/magento indexer:reindex catalogrule_product
## For this indexer to correctely index the new productprices, the
## catalogrules need to be indexed first. This usually happens
## every night by cron.
## You can check if the catalogrules have been indexed correctly,
## by running the following query. Result needs to show a rule_
## date for yesterday, today and tomorrow
SELECT rule_date FROM catalogrule_product_price GROUP BY rule_date;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment