Last active
August 29, 2015 14:07
-
-
Save Tramp1357/4513865895f198aad588 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $r - объект категории | |
$res=$r->getMany('Goods'); //получаем товары категории | |
foreach($res as $r){ | |
$options=[ | |
'class_key'=>'ShopmodxResourceProduct', | |
'parent'=>$n, | |
'pagetitle'=>$r->get('name'), | |
'published'=>1, | |
'template'=>3, | |
'content'=>$content, | |
'sm_currency'=>79, | |
'sm_price'=>$r->get('price'), | |
'tv7'=>$r->get('image'), | |
]; | |
$modx->runProcessor('resource/create', $options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment