We have been starting to use the filtered search result pages a little more as they’re quite powerful when used with creative SQL queries and mappings to create automated filters like ‘on sale’, ‘in stock’ etc.
One issue though is with product URL parameters. These appear to work on the filtered result page but unfortunately do not persist once another another filter has been added or once paginated etc.
Is there an easy way to have these, or even specific parameters, persist when the page is rendered?
As mentioned it looks like it’s possible to filter this result set even further with additional product parameters like “?&product_stock_gte=3” to return all products which are in stock with 3 or more units etc.
Can you suggest a way to achieve this at all?
Additionally, replacing the department ID with a wildcard “*” from any filtered page does seem to return global results. This seems quite handy but unfortunately the page does not show any filter options.
Do you think there would be a way to also enhance this result with the inclusion of filters?
If you have any spare product_weblinxcustomtext fields which are not being used you can map one of these under your item table sync client with the following query.
WHEN [nitroasl_pamtable].[PAM_WebSalePrice] < [nitroasl_pamtable].[PAM_WebPrice] THEN ‘On Sale’
WHEN [nitroasl_pamtable].[PAM_Promotion] = 1 THEN ‘Special Offer’
You can then just reference that particular customfield within the filtered search options via the portal.
We do similar with extracts from our product names as below as these do not require any user involvement providing our naming convention is followed correctly.
case when Item.ExtendedDescription LIKE ‘%grain free%’ THEN ‘Grain Free’ when (Item.ExtendedDescription LIKE ‘%weight control%’ OR Item.ExtendedDescription LIKE ‘% light %’ OR Item.ExtendedDescription LIKE ‘%perfect weight%’ ) THEN ‘Weight Control’ end
You would of course need to map this to a different custom fields since they’re obviously going to be different filters.