X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Tags Filter in Groups (https://forum.x-cart.com/showthread.php?t=76268)

xgarb 05-23-2018 06:05 AM

Tags Filter in Groups
 
I'm working on microsites within our main site. Each microsite features one range of our products and filters (like a product finder) to narrow down the products shown.

I'm using a custom version of the tags module along with an Itemlist module to show results.

The filters look something like this and work through the entire site...



I want to be able to show results (based on the above example) like
SELECT * WHERE animals=blue OR red AND liquid=Slurry OR Dirty Water OR Clean Water … etc

The problem is the tags aren't stored or referenced in groups (the block above is static HTML) so the normal Tags module query is more like:
SELECT * WHERE tag=blue OR red OR Slurry OR Dirty Water OR Clean Water

So this results in options being shown that don't match all the filters.

What approach should I take to putting the tags in groups and modifying my itemlist search? I can put the tag names or ids in arrays for each group and use that in a query or I could add the groups into a new table. I don't fully understand how X-cart creates an SQL query to do something like this.


All times are GMT -8. The time now is 05:29 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.