krot

MODX msVendor

May 24th, 2019
112
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  if (!$vendor = $this->modx->getObject('msVendor', array('name' =>  ($row['brand'])))) {
  2.                 $vendor = $this->modx->newObject('msVendor', array('name' =>  ($row['brand'])));
  3.                 $vendor->save();
  4.                 $vendorId=$vendor->get('id');
  5.             }
RAW Paste Data