I am working on a requirement to add a custom parameter in the configurable product page URL. This will have the simple SKU to preselect the color in the swatches, something like this:
The user requires this way because these URLs will be generated by the marketing team and need an easy way to create a URL to each simple and send in the marketing communication (for example, newsletter or Facebook posts).
The customization works fine, and it selects the simple product in the swatches specified in the URL without a problem. However, this selection seems to be caching. So, for example, if you first go to this URL:
It shows the correct color. But if you next go to:
Or even without the parameter in the URL:
The result is the same. The page shows the first color and ignores the parameter in all the subsequent attempts. Is it a way to add this custom parameter to prevent to be caching, and with that, each URL with a different value in it generates a different page result?