Hello!
I need to fill a sku field (node type product, sku field added by ubercart) with value computting from another field.
I try to use this code:
if (!$node->nid) node_save($node);
$node->model=$my_computted_value;
But the value is not saved when i saving node for first time. And i have to resave it to save this value.
What could be wrong?
P.S. Sorry about my English)
Comments
Comment #1
cj-a-min commentedI created a Computed Field unique id,( field_uniqueid ), which I grabbed from the sku I use in ubercart. This in-turn exposed the sku in cck field. So I can use it for other modules which are not aware of ubercart, i.e. "unique_field module". Or I can simply use it any node.tpl.php, etc..
I used the following field_uniqueid, and stored it.
Computed Code:
Display Format:
Hope that helps.
Comment #2
dqdDue to the Drupal core life cycle policy and security support advisery, Drupal 6 is no longer supported. So issues for Drupal 6 cannot be longer maintained. The project maintainer has asked for closing all D6 issues to clean up the issue queue. Feel free to reopen the issue if required or set it to "needs to be ported" and latest D8 dev version, if the issue discusses a still missing feature which can be implemented in the D8 version.
BTW: This is not critical ...
Comment #3
dqd