New showcase alert: here's how to build an ecommer...
# important-announcements
j
New showcase alert: here's how to build an ecommerce storefront (product listing pages) with Typesense: https://ecommerce-store.typesense.org/
💯 1
👍 2
m
I can't see any global search bar (just one for the brands) is that normal?
It's awesome, I'm currently building an e-commerce website using Algolia + InstantSearch, it's great to have an example with Typesense I really felt like it was missing.
🙌 1
Would it be easy to add filters that appear only for the relevant items? For example if there were phones and speakers, both would have a battery capacity but only phones would have a screen size. And would it be made with the front-end or could it be done using Typesense? I'm looking into implementing a classification system into the website for this kind of purpose.
j
I can't see any global search bar (just one for the brands) is that normal?
I wanted to emphasize the fact that you don't need a search bar per se to use Typesense, which is why I skipped adding it to the UI. I can may be add a small search bar on the top right so it doesn't steal attention
👍 1
Would it be easy to add filters that appear only for the relevant items? For example if there were phones and speakers, both would have a battery capacity but only phones would have a screen size. And would it be made with the front-end or could it be done using Typesense?
You can do this yes, but if you want to implement it without a page refresh or creating a new page (where you'd instantiate the required filters based on the page), then you'd have to create a new custom widget in Instantsearch, that looks at the results for a particular query and then based on the attributes returned in the results, the widget would have to issue a new call to Typesense this time with facet_by set to those fields and then render widgets for the facetted attributes returned.
Looks like Algolia has put together a guide on how to do this with Instantsearch: https://github.com/algolia/dynamic-faceting-instant-search-guide
❤️ 1
m
Awesome, that looks like something that would help us. It theory it should work with Typesense without any change needed?
j
Yup it should, but let me know if you run into any issues
c
k
Thanks for reporting this. It is a quirk because of the way multiple queries are assembled for the final UI. The demo is using the default
typo_tokens_threshold
value and that causes actual records fetched to vary slightly between the search query used to populate results vs the brand facet counts. This has been a bit of a surprising behaviour in some cases, so we are going make the default value of
typo_tokens_threshold
to just
1
to address it.
j
@Claudiu Roman Ardelean This is now fixed. Here's the change I did: https://github.com/typesense/showcase-ecommerce-store/commit/b3ac55dca4c6de6b9bafabc159067f10678ee8aa
1