Attributes as products(nodes)?

Posts: 33
Joined: 01/30/2008

Let's consider a computer store.
products can be sold separatly or as part of a computer package with options and different pricing.

If I understand correctly, attributes in ubercart aren't nodes so I can't do it.
Product kit is predifined without options.

When attributes are products you can track the total number of sold items whether speratly or as a part of a package.

You can also use FiveStars module to let customers rate attributes/products...

In drupal E-commerce module attributes are nodes but I have a payment gateaway that works with ubercart so I'll be more than happy to stick with you guys.

Any ideas for a workaround or a simple custom module?

Thanks

Posts: 489
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

I don't know if it's doable, but it would be a great contribution to consider attributes as node. But I don't like the idea to make it core because it's the way ecommerce choose and I like that ubercart choose another way.

Posts: 33
Joined: 01/30/2008

Do you have to do it the wrong way just to be different?

I consider my case to be trivial.
You want to sell a product seperatly and as an option in a package.

For example a computer with a base price of 1K$ and default parts with options for screen, video card... with custom price.

The administartor must know the number of sold video cards.

Is my case so unique?

Posts: 489
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

I think for your case, the best choice is to use product kit ?

Posts: 33
Joined: 01/30/2008

When you create a product kit you combine several products together but you can't let the user choose between several options.

You can create a computer with screen type A and video card type C.

You can't create a computer with a choice between screen A and B and video card C and D:
Computer
screen A or B
video card C or D

Is there a way to extend the product kit to support it?

Posts: 4747
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

dolittle, I think you raise a fairly common issue for "combination sale" shops, but I don't think the solution is to change the attribute system. By very definition, the word "attribute" seems to describe a particular value or component on the product, not choosing other products from the catalog to add to a product. While attributes can be used to specify component parts of a whole, attributes should not turn into the way to allow customers to build a custom product kit (which is essentially what you're describing). There are other options that make more sense.

The main one is that of a new understanding of product relationships. Products right now may be stand alone or grouped to be sold together together in a kit by the administrator. There is nothing that lets someone piecemeal create a kit and add it to the cart or choose an add-on from the product catalog. We've tossed around the idea of accessories in the past, and that seems to be more like what you're describing. There's one core product (a computer system), and then the customer can choose to add a bunch of related products as accessories (LCD monitor instead of a CRT, wireless keyboard/mouse, etc.). This would have to start as a new module and perhaps build its way into core. It would take some work to figure out the best UI from the admin and customer sides.

Posts: 33
Joined: 01/30/2008

You are right.

I'm strugeling with this one for weeks.

The solution I have in mind is to use the webform module

Posts: 290
Joined: 11/19/2007
Bug FinderGetting busy with the Ubercode.

I played a little with product kits to test out a possible solution for dolittle and came across some oddities.

1. Are product attribute price adjustments not used when products are added to a kit?
2. Is there a reason for not showing product attributes in the cart when the products are a part of a kit?
3. When I do add a kit containing products with attributes to a cart, then go back to that kit and add another one my cart gets mangled.

Are product kits not meant to contain products with attributes, is something botched with my install that is causing this, or is anyone else able to replicate these?

Posts: 2102
Joined: 08/07/2007
AdministratoreLiTe!

Here's how I think of products, attributes, and kits. Products are the actual things that are sold, so those are what you keep track of in inventory with SKU or model numbers. Some products are very similar, but their differences are described with attributes. Each different product has its own SKU. Product kits are simply groups of products. A kit itself won't have an SKU because you're already keeping track of the component products.

That's why I don't really like the idea of putting attributes on product kits. They aren't actual things that you change. The products inside them are. That said, I do like the idea of having one kit page, and having a choice of which products to get in it. It's a good idea, but the code that's already there would make it hard to do. I think.

This might be a good opportunity for a new module.

Posts: 290
Joined: 11/19/2007
Bug FinderGetting busy with the Ubercode.

Dolittle, I could see your Computer example working as follows:


Product Kit: Computer
 Product: Screen (price 0)
   attribute: Screen Type
     option: No Screen
     option: 19 inch (+$250)
     option: 21 inch (+$400)
 Product: Video Card (price 0)
   attribute: Video Card Type
     option: No Video Card
     option: Video Card (+$100)

Not ideal, and like I said...I don't think attribute price adjustments are taken into account in product kits or displayed during checkout or maybe even saved at all, but I think it could work.

Posts: 33
Joined: 01/30/2008

@Cyu I can't use it because I have to keep track of the number of 19 inches screens sold, put FiveStar rating on each screen type... Drupal is built around nodes and when you mix attributes with nodes you loose all the functionality Drupal offers.

@Ryan, @Lyle I like what you are both saying and it'll work great for me.
I need it badly so if you are not going to implement it in the near future I'll step in and contribute.
I need your help. Please tell me where to start. Any input will be appreciated.
What is the function I need to create a product kit dynamically?
How do I populate the cart with this function?

On the development forum I offered using the amazing webform module.

- Create forms which are nodes.
- Create any number of fields with custom markup.
- Extend the module and add custom fields.
- Control the number of times a user can submit the form in a day/week/year.
- Soon you'll be able to populate field options dynamically.
- Add custom validation.
- Redirect the user to a desired page. It could be a page containing php code for processing and dynamically creating product kits and then send the data to the cart.

Imagine you could use taxonomy terms attached to products to populate special catalog pages. You are not just presenting them as in VIEWS you put them in a form which present a new product kit or a menu for a restaurant. The form controls all the logic and price handeling with ubercart hooks. For example:
- Hot week deal - products with a term "hot".
- Deals for poorly sold products - products with a term "lousy".

What do you think?

Posts: 11
Joined: 02/20/2008

Looks like im in the same boat. Im gutted because i like the Ubercart module but ultimately this is what is going to make me switch to ecommerce.

Cant i edit the code so that i can add products (**that carry a value eg product1b=£5, in a drop down box similar to the way attributes are listed**), to another product (**that carries no value eg product1, £0**), then hide the price of any products that carry a value of £0.

Instead of:

PRODUCT 1
Price £0
\attribute 1 - +£5
\attribute 2 - +£10

I would like it to read:

PRODUCT 1

\Product1b - £5
\Product1c - £10

Is this possible?... or even making sense? lol

Posts: 4747
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

mersey, not really sure why you're wanting to do things like that, but why don't you make the product cost £5 and have "attribute 1" by default. Then make "attribute 2" have a + £5 price on it. Then, at /admin/store/settings/attributes make sure you've selected "Display total price."

Posts: 11
Joined: 02/20/2008

I could do that... its just not ideal, im going to stick to creating seperate products i think, thanks though.