DivanteLtd / magento1-vsbridge-indexer

This is an official, native Vue Storefront data indexer for Magento 1.9

Home Page:https://vuestorefront.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

product_count is not indexed

Ogek opened this issue · comments

Introduction

I noticed that in VSF code there is a check for excluding categories that have children_count <= 0 and product_count <= 0.
I think this is necessary in order to remove all the categories that are empty.
https://github.com/DivanteLtd/vue-storefront/blob/6cd57ab269a8a31ed8eb5a18ebc8934abe1b9b55/src/themes/default/components/core/blocks/SidebarMenu/SidebarMenu.vue#L204

Issue

The problem is that this indexer doesn't seem to take product_count in consideration so if a category haven't children categories but only products, it will be hidden by VSF.

Proposal

Index product_count field value to ES.