Cascading Product Attributes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 anni tempo fa
I need to have a product with multiple attributes that are only needed if certain values are picked for the first attributes.

Example

T-shirt

Color:  Red, Green, Blue
Size: L, XL, XXL
Style:  A, B


So for this I would want to hide the Style attribute entirely if the customer select Green or Blue for the color.  I'm currently on 2.3, does this exist in 2.4 or 2.5?  

If you were going to custom develop this, how would you model it?  My initial thought is a new table to define the dependencies from one attribute to another:


ProductVariant_ProductAttribute_Dependencies
Id int,
ProductVariantAttributeId int   (FK to ProductVariant_ProductAttribute_Mapping)
DependentProductVariantAttributeValueId int


In the JS change() function that each attribute triggers, I would check to see if the selected ProductVariantAttributeValue.Id matches this table and hide the DIV that matches the ProductVariantAttribute.Id.  I imagine I would also need to modify the function that generates cart warnings to not throw an error because that attribute is missing.

Any better ideas?  (I'm kinda using this post to do some [url="http://en.wikipedia.org/wiki/Rubber_duck_debugging"]Rubber Duck Designing[/url])
12 anni tempo fa
AndyMcKenna wrote:
I'm currently on 2.3, does this exist in 2.4 or 2.5?  

No, this feature is not supported.

AndyMcKenna wrote:
Any better ideas?

I would implement it the same way as you suggested with the only difference. I wouldn't add this new [ProductVariant_ProductAttribute_Dependencies] table. I would better use existing [ProductVariantAttributeCombination] entity/table. It already contains all information that you need. And it already has UI in admin area. Furthermore, it also has information about stock levels which you can use. I think it can save some time.
11 anni tempo fa
AndyMcKenna wrote:
I need to have a product with multiple attributes that are only needed if certain values are picked for the first attributes.

Example

T-shirt

Color:  Red, Green, Blue
Size: L, XL, XXL
Style:  A, B




I think that to include the concept of cascading or conditional attributes in Nop would give tremendous flexibility for cofigurable products.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.