How does the plugin work in connection with Shopware's HTTP cache?
The plugin has two different types of integration:
- Directly when loading the page (default)
- Loading via AJAX
If option 1 "Directly when loading the page" is selected, the HTTP cache is not active on the first page load. This is because, on the first page load, it is checked from which country/with which browser language the customer is accessing the page.
With option 2 "Loading via AJAX," the check for country and browser language is only performed after the customer has already accessed the page. In this case, the HTTP cache is active on the first page load.
If the plugin is activated, the value of the cookie "sw-cache-hash" is changed depending on the values of the two functional cookies "acris_shop_switch_checked" and "acris_shop_switch_country_id." Shopware serves a different page from the HTTP cache depending on the value of the Shopware cookie "sw-cache-hash." This ensures that the modal window or a direct redirection is only displayed or executed when it is truly necessary and desired.