What I’m going to write is a little advanced so you might not be able to grasp it by just copy pasting, you’ll need to study the code and the links I have given along with it.
On your 1st page code each ‘shop’ button to redirect to the dynamic page along with the parameter in the URL.
export function shopCleanse_click(event) {
wixLocation.to(`https://www.domain.com/pageName?keyword=Cleanse`);
}
export function shopHydrate_click(event) {
wixLocation.to(`https://www.domain.com/pageName?keyword=Hydrate`);
}
I’m using the Wix Location API in the above code, read more about it here
Then on your Dynamic Page (assuming that you already have the filter functions) fetch the parameter’s value from the URL and run the filter like this
export function dataset1_ready() {
getLinks();
}
function getlinks() {
let keyword = wixLocation.query["keyword"];
if(keyword) {
filter(keyword);
}
}
You’ll see that I’m running the function under the dataset’s onReady function to allow the dataset to load prior to running the filter.
Then using wixLocation.query function I am retrieving the parameter from the URL.
After this I check if the URL’s parameter contained a value or not. If it did then I run the filter function using the value.