When we setup a catalog price rule with a from and to date, the cache is not invalidated when the catalog price rule becomes active. Cache needs to be flushed manually to see the effect of the catalog price rule.
Preconditions
Steps to reproduce
Expected result
When the catalog price rule becomes valid on the 'from' date, the prices on the grid and the PDP should be updated automatically according to the discount of the catalog price rule. Without manual inteference like flushing cache of reindexing manually.
Actual result
The updated prices according to the price rule are not updated / visible in the category or PDP. Manual flush of cache or reindexing manually is needed.
Note: the same unexpected behaviour occurs when the 'to' date of the catalog price rule has expired. The prices are not changed back to the normal prices unless the cache is flushed.
video
This is indeed an issue.
When the cronjob "catalogrule_apply_all" is run it invalidates the indexer.
However when the indexer "catalogrule_rule" is run it does not invalidate / clear the cache.
Furthermore i found an unused method _invalidateCache in the class Magento\CatalogRule\Model\Rule.
Hi @GuiltyNL
Thank you for your report.
We were not able to reproduce this issue by following the steps you provided.
New prices shows after run reindex.
See video
Ok, but you manually start a reindex? Before manually starting the reindex your prices were not updated either?
So you did reproduce it, as I saw in your video. The new prices did not pop up, you ran the cron several times without success and you needed to run the indexer manually from the command line to let the catalog price rule work?
Am I missing it?
Yes, this can be bug, but you should correct the description
Done.
@GuiltyNL, thank you for your report.
We've acknowledged the issue and added to our backlog.
Any updates on this one?
The same issue here.
It looks like there is missing scheduled process to invalidate product related pages, when date rule should become active.
This bug is causing severe issues, is no one working on this one?
I cannot understand that nobody is working on this issue.
As catalog price rules can't be used since the introduction of Magento 2.
@magento-engcom-team @miguelbalparda @osrecio could somebody give this an issue some much-needed attention?
I can't be difficult to solve.
It is a important core feature of M2 that can't be used now.
Hi @engcom-Delta. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
Component: XXXXX label(s) to the ticket, indicating the components it may be related to.[ ] 2. Verify that the issue is reproducible on 2.4-develop branchDetails
- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.
:white_check_mark: Confirmed by @engcom-Delta
Thank you for verifying the issue. Based on the provided information internal tickets MC-30655 were created
Issue Available: @engcom-Delta, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._
I can also confirm that this is still happening on 2.3.3. It would be nice to be able to use Catalog prices rules. My ticket is almost two years old now. ;)
@GuiltyNL is this still an issue on 2.3.4 ?
I think so @antoninobonumore as they just confirmed it is still an issue in 2.4-develop too.
Hi @engcom-Kilo. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
Component: XXXXX label(s) to the ticket, indicating the components it may be related to.2.4-develop branch@magento give me 2.4-develop instance to deploy test instance on Magento infrastructure. 2.4-develop branch, please, add the label Reproduced on 2.4.x.Hello, @GuiltyNL
Thanks for your report.
I'm not able to reproduce this issue on latest 2.4-develop. Looks like it has been fixed in https://github.com/magento/magento2/commit/fc6c7f1aeadf83e7e6083e387b4a82c8a1cacbea