Discussions

Product attribute/option logic

I know that this is probably way beyond the scope of what you're planning but it would be nice to have attribute/option logic. For example, when buying a shirt the colour blue is only available in large but tha same shirt in red is available in large, medium, and small.

For me, aside from the needed UI/Admiunistration work, this is the final step in making product attributes/options near perfect. The only thing left after this would be to do kits :)

Having said that, I still don't fully understand how products will work in the future but I guess that will come in time.

Posted: Jan 26, 2010

Comments

Ryan Ryan Szrama on January 27, 2010

I need to tidy [node:49] up into a spec. document, but you might review that. The idea is every product will be defined down to the option level... they just won't be nodes. There will be an actual product entity on par with nodes that you can attach fields to. These fields will represent what attributes currently are but work more like CCK fields, so when you add a product to the catalog, you'll actually define its options there. Then when you display a set of products of the same type, we'll automatically figure out the possible combinations and create the add to cart form accordingly.

It's going to take a little bit of magic, for sure, and dependent attributes will be a necessity. It should be fun to program. : D

Dashton (not verified) on September 4, 2010

Have you thought of doing attributes like cck field groups, where one product [node-like container] could have groups of attributes? It seems like that is what you're saying in the linked post above.

My thoughts:
Within each field group, the SKU, stock, product images/ colorways, could be represented. That way, if you have a product with distinctly different styles, it would be easier to manage adding attributes/ subtracting attributes on a per product type basis.

My understanding right now is that Ubercart puts together the SKU + attributes as it completes an order, so there's no fixed SKU for multiple attributes.

I'm thinking a field group might be easier for linking different fields, say, if you have a color swatch, product hero shot, and a drop down menu with the colors- all of those fields could be related and would be make for easier themeing. It would also be easier to add new fields like color swatch images if the product required it.

An aside:
I'd like to see image fields back in the normal type [field display] Drupal system instead of, like Ubercart now, there being themeing coming through php functions instead of a template.tpl.php file [such as theme_uc_product_image()], but that's mainly a minor preference that I have as a designer.

Thanks!