Multiple classes for products VS one class + classification store


#1

Hello, folks

I’m doing PIMCore integration project for my client. Client has about 300 attribute sets in Magento and my first desire was to create separate object class for each attribute set and now I’m dealing with like 300+ classes. Client sells a lots of really different products, like food, TV, Electronics, etc
Everything was good, but now client wants to setup workflows and I think I have to create like 900+ custom layouts (3 layouts per product in average) to setup workflows properly!!!

Also I need completeness reporting and I think I have to create custom report for each object class as well, which is just crazy. Maybe the whole idea of creating such a lot of classes is bad???

I’ve came into another conclusion. Maybe its a good idea to create one class per each type of product, like Food, Electronics, Smartphones. etc… In this case I will end up with having like 10 classes which is simple, but I still need to create custom layouts and reports for each of them… still not so good.

My last idea is to create one Product class and use object bricks and/or classification stores to hold uncommon data.

Please, let me know how you deal with classes, workflows and custom layouts in projects like mine.


#2

Hi,
You should definitely go for one class approach. Object Bricks and Classification store were made specifically for use cases like yours, I am personally using them for similar projects.


#3

Thank you!
One note: How would you export new products. Because if we have one class per each attribute set in Magento - we could easy create a mapping between them, but if we have one class - Product and we add new object and then publish - how can we know about the product attribute set?