Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!$tv = $modx->getObject('modTemplateVarResource', array('tmplvarid'=> $tvid, 'contentid'=> $id_product))) {
- $tv = $modx->newObject('modTemplateVarResource', array('tmplvarid'=> $tvid, 'contentid'=> $id_product, 'value' => $params));
- }
- if ($save) {
- $tv->save();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement