I've run into a strange issue where scheduling a catalog price rule does not affect the price on the website. It does affect the price if I preview the rule. In the content staging area the rule claims it is active. I've manually tried reindexing and I've also triggered a reindex by switching to scheduled and then back to real time mode.
In the database, I'm able to see the following:
mysql> select * from indexer_state; +----------+----------------------------------+--------+---------------------+----------------------------------+ | state_id | indexer_id | status | updated | hash_config | +----------+----------------------------------+--------+---------------------+----------------------------------+ | 1 | design_config_grid | valid | 2018-05-25 02:18:58 | 34ec592bfa6c952bed4d0a1d58c98770 | | 2 | customer_grid | valid | 2018-05-25 02:18:58 | b9632e06cf957d6e8103eb236ca38cc1 | | 3 | catalog_category_product | valid | 2018-05-25 02:18:59 | 2124d5bfcd83b609c67eee94a0e4708c | | 4 | catalog_product_category | valid | 2018-05-25 02:18:08 | 77b6356629f3259568a68ea64c773238 | | 5 | catalog_product_price | valid | 2018-05-25 02:19:00 | 2c3434338353a47cb4c5783800c0bdbe | | 6 | catalog_product_attribute | valid | 2018-05-25 02:19:00 | f73cae77ec4dee3b587a60a2f38dd26a | | 7 | cataloginventory_stock | valid | 2018-05-25 02:19:03 | 1bf66e64558a5171e523b32f25cb99ca | | 8 | catalogrule_rule | valid | 2018-05-25 02:19:03 | c4f8344a2e6a7d8ebc065631454a4724 | | 9 | catalogrule_product | valid | 2018-05-25 02:18:08 | 667205576ee3764b1ee81c4a076d10ae | | 10 | catalogsearch_fulltext | valid | 2018-05-25 02:19:03 | cc2d2701487ee835df4e72b15254852b | | 11 | targetrule_product_rule | valid | 2018-05-25 02:19:03 | 55af0f132230456b1f0c5ccb03e30c7c | | 12 | targetrule_rule_product | valid | 2018-05-25 02:18:08 | 3f674acb9a7455f8367357b04f1424f2 | | 13 | salesrule_rule | valid | 2018-05-25 02:19:03 | 213fdc402b507c87f88134583bb0c9d9 | | 14 | amasty_xsearch_category_fulltext | valid | 2018-05-25 02:19:05 | e25fd47dc4ad2526741542354058abdc | | 15 | amasty_mostviewed_rule | valid | 2018-05-25 02:19:07 | 53573745be5ffc669fb5705217694def | | 16 | blackbird_contenttype_fulltext | valid | 2018-05-25 02:19:07 | 12e3df8ced13f212bb14d387737e3caa | +----------+----------------------------------+--------+---------------------+----------------------------------+ 16 rows in set (0.00 sec) mysql> SELECT * FROM catalogrule_product WHERE (from_time = 0 OR from_time <= unix_timestamp()) AND (to_time = 0 OR to_time >= unix_timestamp()) AND rule_id = 3; +-----------------+---------+------------+---------+-------------------+------------+-----------------+---------------+-------------+------------+------------+ | rule_product_id | rule_id | from_time | to_time | customer_group_id | product_id | action_operator | action_amount | action_stop | sort_order | website_id | +-----------------+---------+------------+---------+-------------------+------------+-----------------+---------------+-------------+------------+------------+ | 1 | 3 | 1527212100 | 0 | 0 | 23 | by_fixed | 9.9500 | 0 | 1 | 1 | | 2 | 3 | 1527212100 | 0 | 0 | 24 | by_fixed | 9.9500 | 0 | 1 | 1 | | 3 | 3 | 1527212100 | 0 | 0 | 25 | by_fixed | 9.9500 | 0 | 1 | 1 | | 4 | 3 | 1527212100 | 0 | 0 | 26 | by_fixed | 9.9500 | 0 | 1 | 1 | | 5 | 3 | 1527212100 | 0 | 0 | 27 | by_fixed | 9.9500 | 0 | 1 | 1 | | 6 | 3 | 1527212100 | 0 | 0 | 28 | by_fixed | 9.9500 | 0 | 1 | 1 | | 7 | 3 | 1527212100 | 0 | 0 | 29 | by_fixed | 9.9500 | 0 | 1 | 1 | | 8 | 3 | 1527212100 | 0 | 0 | 30 | by_fixed | 9.9500 | 0 | 1 | 1 | | 9 | 3 | 1527212100 | 0 | 0 | 31 | by_fixed | 9.9500 | 0 | 1 | 1 | | 10 | 3 | 1527212100 | 0 | 0 | 32 | by_fixed | 9.9500 | 0 | 1 | 1 | | 11 | 3 | 1527212100 | 0 | 0 | 33 | by_fixed | 9.9500 | 0 | 1 | 1 | | 12 | 3 | 1527212100 | 0 | 0 | 34 | by_fixed | 9.9500 | 0 | 1 | 1 | | 13 | 3 | 1527212100 | 0 | 0 | 35 | by_fixed | 9.9500 | 0 | 1 | 1 | | 14 | 3 | 1527212100 | 0 | 0 | 36 | by_fixed | 9.9500 | 0 | 1 | 1 | | 15 | 3 | 1527212100 | 0 | 0 | 37 | by_fixed | 9.9500 | 0 | 1 | 1 | | 16 | 3 | 1527212100 | 0 | 0 | 38 | by_fixed | 9.9500 | 0 | 1 | 1 | | 17 | 3 | 1527212100 | 0 | 0 | 39 | by_fixed | 9.9500 | 0 | 1 | 1 | | 18 | 3 | 1527212100 | 0 | 0 | 40 | by_fixed | 9.9500 | 0 | 1 | 1 | | 19 | 3 | 1527212100 | 0 | 0 | 41 | by_fixed | 9.9500 | 0 | 1 | 1 | | 20 | 3 | 1527212100 | 0 | 0 | 42 | by_fixed | 9.9500 | 0 | 1 | 1 | | 21 | 3 | 1527212100 | 0 | 0 | 43 | by_fixed | 9.9500 | 0 | 1 | 1 | +-----------------+---------+------------+---------+-------------------+------------+-----------------+---------------+-------------+------------+------------+ 21 rows in set (0.00 sec) mysql> select * from catalog_product_index_price WHERE website_id = 1 AND customer_group_id = 0; +-----------+-------------------+------------+--------------+---------+-------------+-----------+-----------+------------+ | entity_id | customer_group_id | website_id | tax_class_id | price | final_price | min_price | max_price | tier_price | +-----------+-------------------+------------+--------------+---------+-------------+-----------+-----------+------------+ | 1 | 0 | 1 | 2 | 0.0000 | 0.0000 | 44.9500 | 44.9500 | NULL | | 2 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 3 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 4 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 6 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 7 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 8 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 9 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 10 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 11 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 12 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 13 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 14 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 15 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 16 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 17 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 18 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 19 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 20 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 21 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 44 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 45 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 46 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 47 | 0 | 1 | 2 | 44.9500 | 44.9500 | 44.9500 | 44.9500 | NULL | | 22 | 0 | 1 | 2 | 0.0000 | 0.0000 | 89.9500 | 89.9500 | NULL | | 23 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 24 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 25 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 26 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 27 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 28 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 29 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 30 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 31 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 32 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 33 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 34 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 35 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 36 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 37 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 38 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 39 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 40 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 41 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 42 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | | 43 | 0 | 1 | 2 | 89.9500 | 89.9500 | 89.9500 | 89.9500 | NULL | +-----------+-------------------+------------+--------------+---------+-------------+-----------+-----------+------------+ 46 rows in set (0.00 sec)
So from what I can tell the rule should be active, and appears to be active based on a date range query. However, you can see in the final price index table, that value isn't getting updated. In the preview mode, I correctly see 80.00 because of the 9.95 discount.
So the next day after checking things out, it now appears the price rule is in effect. Is there any type of delay on catalog price rules? I'm not sure when it went into effect, but it must have been at least 4-5 hours after the initial creation / scheduling for 1 min in the future.
What I've been reading seems to indicate that indexing would put the rule in place, and I did that. I also verified it being shown in the database tables, but it was not updating the final price table.
Any idea what might be causing this?
Any update on this? We just upgraded to 2.2.7 and we're experiencing this same issue. Catalog rules are taking 6+ hours to apply. We only have 10k products and 10 rules. I keep getting tickets from marketing that the rules are not working and I have to just tell them to wait. There is nothing I can do to speed this up (re-index does not help).
I'm also seeing in the change log table catalogrule_product_cl lots of duplicate ids to products that do not even apply to any rule.
+------------+-----------+
| version_id | entity_id |
+------------+-----------+
| 132864882 | 4038323 |
| 132864883 | 4038323 |
| 132864884 | 4038323 |
| 132864885 | 4038323 |
| 132864886 | 4038323 |
| 132864887 | 4038323 |
| 132864888 | 4038323 |
| 132864889 | 4038323 |
| 132864890 | 4038323 |
| 132864891 | 4038323 |
| 132864892 | 4038323 |
| 132864893 | 4038323 |
| 132864894 | 4038323 |
| 132864895 | 4038323 |
| 132864896 | 4038323 |
| 132864897 | 4038323 |
| 132864898 | 4038323 |
| 132864899 | 4038323 |
| 132864900 | 4038323 |
| 132864901 | 4038323 |
| 132864902 | 4038323 |
| 132864903 | 4039679 |
| 132864904 | 4039679 |
| 132864905 | 4039679 |
| 132864906 | 4039679 |
| 132864907 | 4039679 |
| 132864908 | 4039679 |
| 132864909 | 4039679 |
| 132864910 | 4039679 |
| 132864911 | 4039679 |
| 132864912 | 4039679 |
| 132864913 | 4039679 |
| 132864914 | 4039679 |
| 132864915 | 4039679 |
| 132864916 | 4039679 |
| 132864917 | 4039679 |
| 132864918 | 4039679 |
| 132864919 | 4039679 |
| 132864920 | 4039389 |
| 132864921 | 4039389 |
| 132864922 | 4039389 |
| 132864923 | 4039389 |
| 132864924 | 4039389 |
| 132864925 | 4039389 |
| 132864926 | 4039389 |
| 132864927 | 4039389 |
| 132864928 | 4039389 |
| 132864929 | 4039389 |
| 132864930 | 4039389 |
+------------+-----------+
Were you able to fix this issue? We experiencing the same on 2.2.5 setup.
Hi everyone.
Did anyone solve this problem in 2.2.10 or 2.3.x?
Thanks