Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Category filters in layered navigation #106

Closed
bloodf opened this issue Aug 20, 2021 · 5 comments
Closed

Category filters in layered navigation #106

bloodf opened this issue Aug 20, 2021 · 5 comments
Labels
question If you are not sure how sth works or want discuss someting VSF1 Issues in regards to VSF1

Comments

@bloodf
Copy link
Contributor

bloodf commented Aug 20, 2021

From vue-storefront created by PandaTawer3: vuestorefront/vue-storefront#4028

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.

@bloodf bloodf added question If you are not sure how sth works or want discuss someting VSF1 Issues in regards to VSF1 labels Aug 20, 2021
@bloodf
Copy link
Contributor Author

bloodf commented Aug 20, 2021

I think the problem is the way categories are indexed. For other attributes you have attribute: [1,2] and attribute_value: ["label","second label"] but for category_ids this does not apply as there is no field for category_ids_value, so the aggregation building fails.
It would indeed be a great feature to have.

@bloodf
Copy link
Contributor Author

bloodf commented Aug 20, 2021

Hi there, did you find a solution for this bug? i'm stuck on it. I've tried the solution on here #3980 but it didn't work.

an update would be more than useful. Thanks

@bloodf
Copy link
Contributor Author

bloodf commented Aug 20, 2021

Hi @pkarw
Were you able to find a resolution here?
This is really important feature in the need for a good user experience.
I see you have closed similar task here #3980 but we are not able to implement it by solution provided by you there and in this issue.

Thanks,
Anup

@bloodf
Copy link
Contributor Author

bloodf commented Aug 20, 2021

Hi there! Is there any particular error in the vsfapi console output logs?

@bloodf
Copy link
Contributor Author

bloodf commented Aug 20, 2021

@pkarw No, but if I check available filters in category only [], but every product have field category.

@bloodf bloodf closed this as completed Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question If you are not sure how sth works or want discuss someting VSF1 Issues in regards to VSF1
Projects
None yet
Development

No branches or pull requests

1 participant