Jump to content

the algorithm for groups of attributes


Recommended Posts

Help me, please, with the algorithm for attribute groups - how best to implement this (the code is not needed, only the algorithm):
A product has attribute groups, and a group has attributes. The user first selects a value of group in the product , and then selects a value of an attribute from the attributes belonging to the group. Price premium depends on the group, and does not depend on the attribute itself. In the product there are several groups and several attributes without groups. Accordingly, there can be a lot of combinations.
For example, a product is a carpet, two attributes without groups — width (50, 60, 70, ..., 240, 250) and length (50, 60, 70, ..., 240, 250), two group attributes:
group1 - material:
               wool + $ 20 (attributes - mohair, cashmere, merino, alpaca, ..., angora),
               artificial thread + $ 0 (attributes - acrylic, polyamide, polyester, ..., polypropyl),
               vegetable + 0 $ (attributes - viscose, bamboo, flax, cotton, jute, hemp, ..., sisal)
               silk + $ 1000 (attributes - 1000, 1400, ..., 2000)
group2 - palette:
               autumn + $ 0 (attributes - red, warm, ..., wine)
               winter + $ 10 (attributes - cold, blue, ..., frosty)
               summer + $ 0 (attributes - hot, ..., colorful)
How best to accomplish this task? (version 1.6)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...