Suggestions about product attributes

5 years ago
Hello,

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).

Example:
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.

Bye,
Gianni
5 years ago
Great improvement idea
5 years ago
Hi Gianni,

Thanks a lot for suggestions.

I've just created a work item for the first suggestion. The work item for the second one already exists (here).
5 years ago
a.m. wrote:
I've just created a work item for the first suggestion

Done. Please see changset ea2ddfc4e165
5 years ago
First off, I want to say that I really like nopCommerce and the ever evolving regularly scheduled releases that you do for your product.  You can tell that you guys are really passionate about what you do!!  I'm a developer too so I know what you go thru, and how much it means when people appreciate what you do.

I do have a question or possible suggestion for Product Attributes, tho.  I have a strictly media download site hosted with nopCommerce, and the images we sale come in 3 sizes (Small - 900x675, Medium - 1024x768, Large - 1440x1080).  The price is the same for all 3 sizes per product, so I thought that I could Setup a Product Attribute for each size and tie each one to an Associated Product.

That I can do, and it works just fine.  However, I want the Customer to be able to download the product directly from the site, and depending on the size selected it would point the customer to a different download specific to the size the customer wanted.

Is this possible?

I tested this on 3.4, but I couldn't make it work and I didn't see anything in the 3.5 release that indicated it being a new feature.

Thank you!!

Brad
5 years ago
Hi Brad,

Thanks a lot for suggestion. But this task is quite specific. Let's leave it for customization. Just add a new "DownloadId" property to ProductAttributeValue entity and then use it
5 years ago
Thank you Andrei for the quick response!!

Forgive me tho, I'm a little new with ASP.NET MVC.

Would that be in the .cshtml frontend side?

Or would it require a recompile?

I'm assuming the latter, but a little help pointing me in the right direction would be much appreciated!

Thanks,

Brad
5 years ago
Hi Brad,

Add a new "DownloadId" property to ProductAttributeValue entity. Have a look at Updating an existing entity. How to add a new property.. Use it in the \Nop.Web\Views\Product\_ProductAttributes.cshtml file (of course, ProductDetailsModel.ProductAttributeModel class also should be updated). Display a download link according to attribute selection
5 years ago
Thank you so much!!
5 years ago
Is there anyway this could be added as a feature in another release?  If you think about it, I'm sure there are many others with the need for this minor update.