Closed (won't fix)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2008 at 22:37 UTC
Updated:
12 Oct 2010 at 12:25 UTC
It seems like attributes are really just a simplified version of CCK fields that can only be placed on Product nodes.
It seems more Drupalish to be able to mark any content type as a "product" and ditch Attribute module (and possibly Product module as well) in favour of CCK.
This would give a lot more flexibility to add, for example, a node reference field pointing to another related product ("Choose the monitor to come with your computer") or something else I'm not thinking of atm. :P
Comments
Comment #1
Island Usurper commentedMy initial reaction was "No! They're totally different!" But then I got to thinking a bit more about it, and now I'm interested.
The main reason CCK wasn't used in the first place is because adding a product to the cart isn't the same thing as creating a node. You don't usually see the fields' forms when the node is viewed. Also, the add to cart form isn't a node form at all. Putting the widgets in the add to cart form isn't a big deal, but I don't see an obvious way to get CCK to handle the data when there aren't any node hooks involved.
It'd be really cool to see if we could pull it off, though.
Comment #2
rszrama commentedI think the main difference here is that attributes are user selectable and can modify the product price, weight, and SKU. It seems like the meta-issue here is what we should consider a product, and there has been talk about this related to fields getting into core. However, even if we change what constitutes a product, I think attributes will continue to be a special case that might not really fit into CCK.
I'm not really sure how to mark this issue, but I'm going to put it "won't fix" right now since it's a feature request that isn't feasible in itself. We'll revisit what to do about products w/ 3.x.
Comment #3
trungonly commentedBuzz - I facing problem is need of adding attribute options programmatically, instead of adding options manually in admin panel. So I'm thinking of CCK widgets, which allows us to gather data from many sources, like node references or so.
Let's see I need an attribute which lists the DVD nodes as options, and DVD price (CCK field of DVD content type) as adjustment price for option.
This case the DVD nodes should be gathered dynamically from database, instead of manually entered one time in store admin panel.
Do you think I should create a new add-on module for this purpose, based on uc_attribute? Since we see uc_attribute does not provide any other hooking API, however it uses Drupal's hooks like hook_nodeapi, form_alter etc...
Comment #4
tr commented@trungonly: I don 't see how your question is related to this old, closed issue. You should start a discussion on ubercart.org if you want help figuring out how to do what you want.
Comment #5
trungonly commented@TR: Just clarify that I did not ask how to do, but asked should I do an improvement based on uc_attribute for CCK field, that would solve problem of this issue. Actually an attempt made by me, but I will request a CVS project only if it's useful for other people.
Comment #6
trungonly commentedThe module now is here:
http://drupal.org/node/923708
Comment #7
trungonly commentedI made it live here: http://drupal.org/project/uc_attribute_cck