Two-dimensional 'select' attribute type
Permalink
Hello,
With the development of a webshop for car parts and accessories I'm in the need for a new type of attribute that I would describe as a two-dimensional 'select' attribute.
First, in my case products need to be able to be assigned to one or more car manufacturers. If this was all I simply would add a new select-attribute 'Manufacturer' and add all available car manufacturers to the select list. Unfortunately this isn't all. Besides the possibility to assign a car manufacturer to a product, car TYPES will also need to be able to be assigned to a product. The best way to acomplish this is, I guess, to create a new attribute type where for every 'select' item, subitems can be added.
I would like to know if others would resolve this problem the same way and I hope someone can give me a little push in the right direction for how to set up this new attribute type.
I think this type of attribute could be very usefull in much more ocasions than just my case and once sorted out I'd be happy to share the results with the C5 Community.
Many thanks!
With the development of a webshop for car parts and accessories I'm in the need for a new type of attribute that I would describe as a two-dimensional 'select' attribute.
First, in my case products need to be able to be assigned to one or more car manufacturers. If this was all I simply would add a new select-attribute 'Manufacturer' and add all available car manufacturers to the select list. Unfortunately this isn't all. Besides the possibility to assign a car manufacturer to a product, car TYPES will also need to be able to be assigned to a product. The best way to acomplish this is, I guess, to create a new attribute type where for every 'select' item, subitems can be added.
I would like to know if others would resolve this problem the same way and I hope someone can give me a little push in the right direction for how to set up this new attribute type.
I think this type of attribute could be very usefull in much more ocasions than just my case and once sorted out I'd be happy to share the results with the C5 Community.
Many thanks!
Thank you, John!
I searched the forum for simular issues but couldn't find anything concrete. Maybe the cases you know of didn't reach a conclusion but still could help me. Do you know where to find these?
I already noticed the simularity with the address attribute, but pre programming all manufacturers and car types will be too much work and I really prefer the data to be editable, so this isn't an option for me.
I didn't understand exactly your point about the multi-level jquery widget. I intent to create a product search/filter block somewhere in the webshop where the user can select a manufacturer first and then select a car type from a list of car types of the selected manufacturer. I will use jquery and ajax to do this and i'm not directly expecting much dificulties with this. But probably this isn't what you ment...?
I searched the forum for simular issues but couldn't find anything concrete. Maybe the cases you know of didn't reach a conclusion but still could help me. Do you know where to find these?
I already noticed the simularity with the address attribute, but pre programming all manufacturers and car types will be too much work and I really prefer the data to be editable, so this isn't an option for me.
I didn't understand exactly your point about the multi-level jquery widget. I intent to create a product search/filter block somewhere in the webshop where the user can select a manufacturer first and then select a car type from a list of car types of the selected manufacturer. I will use jquery and ajax to do this and i'm not directly expecting much dificulties with this. But probably this isn't what you ment...?
For the above discussions, unless you want extreme database performance, in most cases they come round full circle to doing it with pages to represent the data.
On the jQuery select, just browse through any multi level menus that are jQuery based. A menu displays a hierarchy of pages. You need to display a hierarchy of manufacturers/cars.
So you could take any of these menus as the front end for your selector. Or you could build your data as pages for manufactures & cars and a suitably configured navigation menu would take care of the rest of it for you.
Even if you are not taking sales, C5 eCommerce would handle this as product groups (manufacturers) and products.
On the jQuery select, just browse through any multi level menus that are jQuery based. A menu displays a hierarchy of pages. You need to display a hierarchy of manufacturers/cars.
So you could take any of these menus as the front end for your selector. Or you could build your data as pages for manufactures & cars and a suitably configured navigation menu would take care of the rest of it for you.
Even if you are not taking sales, C5 eCommerce would handle this as product groups (manufacturers) and products.
Thanks again, John! A solution with pages could be a good one. Though, this also would have to be implemented in a new attribute type, since only this way products in the store can be assigned to a specific category/page. Thinking of this, it might be better to use that time to make a concrete multi-level select solution as a new attribute type.
Fortunately my client's whish to assign a manufacturer's model to a product is not a must have, so I think I will stick with the normal select attribute to use for assigning only a manufacturer to a product. Who knows the C5 core team will come up with a solution in the future...
Fortunately my client's whish to assign a manufacturer's model to a product is not a must have, so I think I will stick with the normal select attribute to use for assigning only a manufacturer to a product. Who knows the C5 core team will come up with a solution in the future...
The country/state/county aspects of the existing address attribute do similar to what you want, but from pre-programmed lists. The code from the address attribute may be a good starting point.
Looking at the problem from a different angle, I am sure I have seen jQuery multi-level select widgets, which could be a cleaner front end to such an attribute.