Hello,
I have a question about WixDataFilter.
I’m using filter to filtering content on dynamic category page.
I have some checkboxes on my page and when one of them is unchecked, I want to exclude corresponding items by filtering them with filter.not(queryWithItemsToExclude) . And then I just apply final filter to my page’s dataset.
It’s working fine until this moment :
//Ballon
if (!$w('#reset').checked) {
if (!$w('#chauffage').checked)
filter = filter.not(wixData.query("Chaudiers").contains("ballonEauChaudeSanitaire", "Chauffage seul"));
if (!$w('#microballon').checked)
filter = filter.not(wixData.query("Chaudiers").contains("ballonEauChaudeSanitaire", "Micro"));
if (!$w('#noballon').checked)
filter = filter.not(wixData.query("Chaudiers").contains("ballonEauChaudeSanitaire", "Pas"));
if (!$w('#ballon').checked)
filter = filter.not(wixData.query("Chaudiers").contains("ballonEauChaudeSanitaire", "Ballon").not(wixData.query("Chaudiers").contains("ballonEauChaudeSanitaire", "Micro")));
}
After that, it’s working like there is no filters at all. Can you please tell me what’s wrong with my code? I’m really stucked here.
Thanks a lot!
Nick.