質問

I have about 100 special attributes in the default attribute set.

Would I have better or worse performances if I would create about 200 attribute sets (nearly one for each category) and spread the special attributes in those?

Knowing that one special attribute may be in 1 or many attribute sets.

Did someone already made a benchmark for this, or the changes on the performances of the application would be insignificant?

Thank you.

役に立ちましたか?

解決

You need to think about the information architecture of your site so that it is efficient and befitting your products. Some consideration is also needed for how you get your data into the database.

For instance, say you sold clothes. You could have different attributes for size, e.g. 'shoe size', 'waist size', 'glove size', 'collar size' and so on. You could then make different attribute sets for 'shoes' where you would just have the 'shoe size' attribute and not the other 'size' attributes. You could also have a 'shoe width' attribute on the 'shoe' attribute set. This would give you fine control over the presentation of the product on the front end, however, when importing data from some supplier CSV you would need to make sure that the attribute set was imported/set too. This may not be operationally sensible if importing thousands of sku's, some of which are shoes, some of which are coats etc.

Some catalogues just have the one attribute set and just the one 'size' attribute, this becomes hard to manage if there are lots of sizes, e.g. trousers can come in lots of lengths and widths and you need attributes like '32W 32L', '32W 34L' and so on, bulking up the attribute option values.

Once you get too many attribute option values it becomes impossible to change/amend them in admin and it becomes impractical to list them in the front end. Performance problems in terms of loading the catalogue can be mitigated against by Magento tricks, e.g. cache, however, if it is operationally possible to use as many attribute sets as are needed to model your products in the best way, then go for it, the pay off will be in improved performance.

There is also a side benefit in that if you do have lots of attribute sets then you can send layout handles to the front end based on attribute set. For instance, if you wanted to show a size guide then you could base that off the attribute set, so 'shirts' would have a different guide to 'shoes'. (In reality you would probably want to make size guides brand specific, but shipping, returns policy and other product content could change based on attribute set as far as front end presentation is concerned).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top