Hi there,.
I have an existing solution serving 20+ shops. Products are imported from different ERPs (one per shop). As part of the import, we update a date field per shop. So a product has fields like:
Update shop 1: 2024-2-28
Update shop 2: 2023-2-28
Update shop 3: null
...
We then have logic that only shows products on a given site if the product has been updated for that site in the past 14 days, it's included; otherwise it's filtered from the index.
Given the example above, the product would not be shown since the date is from last year.
This works fine and we get the right products on the right shop.
However, this also means we need to have a query file for each shop.as the column to filter on is different. That's becoming a pain now as every change to a query needs to be repeated 20+ times.
Is there a way to handle this dynamically with a Macro or so? I think inside the Macro I can find the given site / shop but not sure how to map that info to a field in the index. Also, each shop has around 70K products so performance could be a concern.
Does anyone have any ideas how I could bring back the number of repo queries from 20+ to 1 and handle this requirement in a single query file?
Thanks in advance for any insights!
Imar