I've always thought nopCommerce is a great e-commerce platform, but it has a poor attribute management, and I still see there are no improvements in the latest releases.
Say, I have to deal with stores that have thousands of products, and only size/color attributes.
I have to insert possible attribute values for each product, and this ends up with thousands of duplicate values in the ProductVariantAttributeValue table.
Even more frustrating: attribute combinations are handled through XML strings, not with relational data in the database.
This works fine with small stores, but it's hard to deal when the store grows bigger and bigger.
I am often asked to implement custom import procedures to synchronize the store with any kind of external sources.
It's hard to explain to the client that each synchronization run requires hours of processing, most of the time they think I'm unable to write optimized code.
First suggestion: I noticed that the GetProductVariantAttributesByProductId() method in the ProductAttributeService was becoming very slow to retrieve values.
This is becaus the Linq query orders the record by display order, but there is no index configured on the displayorder column.
I got great performance improvements by adding a ProductId, DisplayOrder index to the Product_ProductAttribute_Mapping table.
Second suggestion: years ago I was working on a e-commerce project (this was before I knew nopCommerce).
I used a different approach for attributes: I had introduced the "Product Typology" entity.
Attributes were mapped to the typology instead of a single product, as well as possible values.
Then, each product had its typology and possible value combinations (picking from the values available to that typology).
Product typology: "Shirt"
Shirt has: Size and Color
Size may be: S, M, L
Color may be: red, green, blue
When I created a "shirt" product, I then assigned the "Shirt" typology, and I only had to choose the available Size/Color combinations.
Notice, in this scenraio I have to insert possible values only once, not per each Shirt I have in my store!
Furthermore: there is not need to emebd data in an XML field, and therefore performs much better when you have to query/insert data.
In my project I also ended up to bind the product typology to a category instead of a single product... but this in not an important point.
Don't you think this would greatly enhance attribute management in nopCommerce?
Any comments are greatly welcome.