Advertisement
vanchelo

Untitled

Aug 30th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  1. if ($res = $modx->getIterator('ModParams', array('gid' => $good_id))) {
  2.     foreach ($res as $v) {
  3.         $tmp = $modx->newObject('ModParams');
  4.         $tmp->fromArray($v->toArray());
  5.         $tmp->set('id', 0);
  6.         $tmp->set('gid', $id);
  7.         $tmp->save();
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement