-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Unable to set custom price when the cache is enabled #6699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What cache backend are you using? Varnish PLUS REDIS (SESSION/BACKEND) are the only functioning cache backends - built in file/zend based caching is broken! |
@southerncomputer Thanks |
I'd suggest implementing Varnish as a cache, it should reduce the problem points. It is known issue that the built in cache process for Magento 2 is not for production quality and causes pain-points! See ticket #3572 if you don't believe me! |
@arijit-insync thank you for your feedback. |
According to contributor guide, tickets without response for two weeks should be closed. |
I am using Magento 2.1.Cache is enabled in my magento.
I am using catalog_product_collection_load_after event for loading all the products when a category is triggered from the front-end and to set a custom price for the products.
And similarly, catalog_product_collection_load_after event I have used to set a custom price when a particular product will be viewed.
The problem that I am facing is described below:-
1)The above mentioned two events is getting triggered sometimes not all the time.
2)And if it is triggered, I am failing to get the customer id from the session and at the same time not able to set the price.I am using setPrice($customPrice) method for setting.
These above issues does not arise when the cache is disabled.
I will very thankful if you can provide your ideas or a way around about how I can set a custom price for a product when the cache is enabled.
The text was updated successfully, but these errors were encountered: