vuestorefront / vue-storefront-1

The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Newest updates: https://blog.vuestorefront.io. Always Open Source, MIT license.
https://www.vuestorefront.io
MIT License
18 stars 13 forks source link

Category filters in layered navigation #334

Open PandaTawer3 opened 3 years ago

PandaTawer3 commented 3 years ago

I am trying to add a category filter to layered navigation such as in Magento 2.

I added a new property to defaultFilters on config/local.json "defaultFilters": [ "price", "category_ids" ],

Also, I added this to elastic.schema.product.json "category_ids": {"type": "integer"},

I rebuilt container but when I try to go to category page I see the error that "Products don't synchronous for this category"

In field "category_ids" value like as 1682.

What can I do? Or maybe all my steps are wrong? I need to do it

UPD: I also tried to add a category to defaultFilters and add it to productList->includeFields and productListWithChildren->includeFields. No one errors but results are not shown too.