silvershop / silvershop-core

SilverShop is an e-commerce shopping cart module for the SilverStripe CMS
http://silvershop.github.io
BSD 2-Clause "Simplified" License
113 stars 119 forks source link

ParentID not added to ProductCategories Manymany #804

Open wernerkrauss opened 12 months ago

wernerkrauss commented 12 months ago

I think it's bad practice, that the main category (aka ParentID) isn't added to ProductCategories manymany relation. This makes it harder to find e.g. all products of a given category programatically or when you want to export data to other data stores like SOLR for searching.

Proposal:

getCategories() is a workaround for this right now, but having the data stored in DB is better IMHO