Ciao a tutti,
mi sto servendo delle seguenti istruzioni per inserire un nodo.
codice:$node = new stdClass(); $node->type = 'product'; node_object_prepare($node); // This sets up all the default node fields so we don't accidentally leave something off. // Copy over all the existing settings from Drupal 5. $node->uid = 1; $node->title = $_POST["NomeProdotto"] // Set Ubercart variables $node->model = "sal1010";//$_POST["CodiceArticolo"]; // the SKU is a required field, so I generated a SKU based on the node title $node->sell_price = "5.00" //$_POST["Prezzo"]; $node->default_qty = 1; $node->weight_units = "pz"; // Set taxonomy + menu etc if you need to $node->taxonomy = array(); $node->menu = array(); // Save the node node_save($node); // This will update the $node object with the $node->nid which is important for the next step.
Però ciò che non capisco è come posso associargli la Tassonomia...
devo indicargli l'ID? o forse il vid? Oppure un array di che cosa?
Grazie a tutti!

Rispondi quotando
