By tomsm on
I have a content type called product.
This product has a multivalue node reference field called: standard accessories.
These accessories are also of the content type products.
How can I add the number of each accessory, for example:
2 x accessory 1
5 x accessory 2
1 x accessory 3
Accessory 1, 2 and 3 are node references and 2, 5 and 1 is the number (a numeric CCK field?) of each accessory.
For each node reference, a number must be entered, 1 or higher.
How can I do this?
Comments
Are you using Ubercart? if
Are you using Ubercart? if so, there are "attribute" filters which might do what you want.
If you're dealing with numeric CCK fields, then http://drupal.org/project/views_calc might help.
No, I am not using Ubercart
No, I am not using Ubercart because it does not support prices per role.
I made a custom content type "products".
A node reference is not a numeric field, so views_calc won't work and I do not need to make a calculation.
I can create a multivalue node reference field and a multivalue numeric field.
But how can I link these field so that value 1 of field 1 is linked to value 1 of field 2, etc.?
I also would like to do
I also would like to do something like this. Anyone know how?
Mine is not a product, so I also don't have Ubercart.
Thanks,
TJ
Bump. Having the same issue
Bump. Having the same issue w/ CCK. Want to specify the quantity of a referenced node.
Seems there should be a generic way to add fields to the reference between the two nodes but I can't see to find it.
Of the top of my head I'd
Of the top of my head I'd recommend this:
Limit # of noderefs & integer fields to 10 or some number. (If that's acceptable in your case)
Theme the node input form so that the display of the fields alternates:
int field 1 noderef 1
int field 2 noderef 2
Etc.
With a bit of jquery magic you could even have the list grow visually as required, not showing more than one empty field at a time.
I'm trying to do exactly the
I'm trying to do exactly the same thing.
Is anyone found a solution ?
http://kiliweb.fr/
Who can do this? please help
Who can do this? please help :) or suggest other solutions...
You can do that with the dev
You can do that with the dev version of CCK 3, by using multigroup.
http://kiliweb.fr/
Creating your own custom CCK field by creating a module.
Here are the contents of the .module file from a quick module I put together (D6.22 installation using View 6.2x and CCK 6.2x). I used the Node Reference module and an article by Jennifer Hodgdon as a great starting point: