vuestorefront / mage2vuestorefront

Magento to Vue-storefront datapump - synchronizes Products, Categories and Product-to-category links between your Magento2 API and NoSQL database of vue-storefront
http://vuestorefront.io
MIT License
199 stars 114 forks source link

Delta indexer for categories #55

Open Cyclonecode opened 5 years ago

Cyclonecode commented 5 years ago

I was wondering how to best syncronize changes to categories using a delta indexer. The productdelta command only syncronizes products. For instance, if I add a new category and an new product under this category and then run node --harmony cli.js productsdelta --partitions=1 no new category/product will be displayed when reloading the frontend.

Could this be done by running a normal full indexing for just categories e.g node --harmony cli.js categories --partitions=1 or similar?

pkarw commented 5 years ago

Yes, for now I believe its' a only way (to run the full reindex on categories); however, it would be nice to add categoriesdelta mode :-) The problematic thing is that if the category is on deeper level like 3, 4 - the parent categories should also be refreshed as the SidebarMenu.vue component is using category.children_data to display subcategories.