Hi all,
I have a cck computed field which has computed the number of days form a to and from date field.
Now I want the quantity field of a product to get the value of this computed field.
This is for a rental company where the quantity field should actually have the number of days rented.
(I created a reservation content type where I added the cck date fields and the computed field and linked that thru node chechout module to a "rental" product type)
I tried adding this with the custom price module.
Here is my code, where fiedl_rentdays is the cck computed field:
$node = node_load($item->nid);
$rentaldays = $node->field_rentdays;
if ($rentaldays > 1){
$item->qty = $rentaldays;
}
Is the field I'm referencing wrong?
Should I just write a module to do this? Can someone please help/advise me on how to proceed (with details).
Please help.
Thanks in advance.
