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?
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.
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.