Hello guys. Can someone tell me the item api url f...
# suitecommerce
s
Hello guys. Can someone tell me the item api url for pulling items those are instock ? I tried with the below url, but its not working. www.mywebsite.com/api/items?isinstock=true
k
Create a facet?
s
But i don't want to show that in frontend. Is it possible?
k
Only through development or by deleting facet values but that's not really recommended I would say.
s
if you want to filter search results then you need to set that filter up as a facet
✔️ 1
the easiest way to hide that facet from search results is to use hide with CSS or remove with JS.
A more complicated way would be to extend the configuration record to add an additional column to the facets table which accepts a boolean value, eg, "Hide Facet?" which the user can then use to hide the facet in config, and then, extend the appropriate class that renders the facets and tell it that if a facet's value is true, it should not be rendered
k
☝️I would always recommend that, empower administrators
s
generally speaking yeah, please do empower your administrators, but then you're extending base classes 🙂 so the 'hacky' route of targeting an element's
data-facet-id
value and running
remove()
may actually be neater
k
What about the hack to delete facet list values? It's some kind of NS generated table behind url components for facets
s
I'm unsure what you're referring to?
k
I thought that worked before to hide the MZ facets
s
are you talking about the Dark Times (ie Site Builder)?
k
In url components for facets, there's a clickable link to Facet values. They can be deleted.
k
you can customize, or just set it in the template
<div data-view=“Facets.FacetedNavigation” data-exclude-facets=“commercecategoryname,category”></div>
🧐 2
☝🏻 2
k
I've never visited the dark ages, but they do occasionally impact SCA behavior 👀
s
Nice find @kkennedydesign
s
Thanks everyone.