Hi,

when I copy a node with that function, so all informations are copied. But not the auction-information. What should I add to my function, to copy the auction-infos, too?

function clone_node($nid)
{
global $user;

$node = node_load($nid);

$node->nid = NULL;
$node->name = $user->name;
$node->created = 0;

node_save($node);

drupal_goto('node/'. $node->nid . '/edit');
}

Comments

winnie80’s picture

Did you try to utilize clone module that you've build yourself?
Why not download and use node_clone module?
It's already support cloning all auction info.
If you use imagefield and uc attributes, there are also a ready modules for them.
Try them first and if you got into problem, let me know if i can help you with.