Hi
I am creating a plugin. I am using NavigationPageLoadedEvent in my plugin.
But the problem is Shopware cache the events so the events are not working in the dev server.
I have installed the user version of Shopware (6.1.3). and SHOPWARE_HTTP_CACHE_ENABLED is 1.
if I change the SHOPWARE_HTTP_CACHE_ENABLED to 0 it will work.
is there any way to do some functions NavigationPageLoadedEvent even if the Http cache enabled.?
There are no issues with the local installation running on the docker. the events are working even if the SHOPWARE_HTTP_CACHE_ENABLED is 1.
Why is the production server caching the events?
1 „Gefällt mir“
The http cache caches the complete html response, when the http-cache is active you can only use ESI-tags or javascript to change the html output. This is not a shopware issue, but the functionality of the caching itself.
https://symfony.com/doc/current/http_cache/esi.html
Do you have any criterias that are based on the logged in customer and so on? Something that will change between requests?
Because it should work with general criterias (e.g. „only products with stock > 500“), because the output will always be the same.
Hi @abinjohnedamana,
this might come a little late, but have you been able to resolve your issue with adding criteria using the ProductSearchCriteriaEvent?
I face a quite similar issue with ProductListingCriteriaEvent.
1 „Gefällt mir“
Have you found the solution? A filter plugin doesn’t work after update to 6.5.7.0.