openstore-ecommerce / OS_DnnIdx

OpenStore plugin to have your OpenStore products indexed in the DNN search index
MIT License
0 stars 0 forks source link

Feature/Change proposal (exclude hidden and disabled products) #8

Open sboshuis opened 2 years ago

sboshuis commented 2 years ago

Just after var prodData around line 120 i've added

if (prodData.Disabled || prodData.DataRecord.GetXmlPropertyBool("genxml/checkbox/chkishidden")) { continue; }

this way disabled and hidden product will not show up in the search results.

Maybe better way like using the strFilter little up the tree but not sure. this way i've done it and it does the job.

Still looking for a way to delete search results for products that are deleted/hidden/disabled after included in index without the need to clear entire index (via host or debug option). When I find that I will share here.

leedavi commented 2 years ago

Off the top of my head, does this code do both Admin list and website list? Obviously for the Admin List we need to have the disabled and hidden products showing. Does this work with your code change?

sboshuis commented 2 years ago

No, this just prevents anonymous users to find disabled/hidden products via dnn search. (unless hidden/disabled after included in dnn index offcourse still working on that)

leedavi commented 2 years ago

OK, yes sorry you're right.