© Сделано на LiveStreet
Дизайн - ©2009 MODx RED Group
$imagetv = $modx->getObject('modTemplateVar', array('name'=>'shop.image'));
$its= $imagetv->source;
$mrobj = $modx->getObject('modMediaSource', array('id' => $its));
$mrarr = $mrobj->toArray();
echo $mrarr['properties']['basePath']['value'];
$imagetv = $modx->getObject('modTemplateVar', array('name'=>'shop.image'));
$imagetvvalue = $imagetv->getValue($id);
$its= $imagetv->source;
$mrobj = $modx->getObject('modMediaSource', array('id' => $its));
$mrarr = $mrobj->toArray();
$mrpath = $mrarr['properties']['basePath']['value'];
$imgpath = $mrpath.$imagetvvalue;
if ($msres = $modx->getObject('ModGoods', array('gid' => $id))) {
$msres->set('img', $imgpath);
$msres->save();
}
[2012-05-22 07:51:27] (ERROR @ /connectors/resource/index.php) modMediaSource::load() is not a valid static method.
[2012-05-22 07:51:32] (ERROR @ /connectors/resource/index.php) Could not load class: modMediaSource from mysql.modmediasource.

function getDocuments($ids= array (), $published= 1, $deleted= 0, $fields= "*", $where= '', $sort= "menuindex", $dir= "ASC", $limit= "") {
if (count($ids) == 0) {
return false;
} else {
//вот тут я вставил проверку
/**++**/
foreach ($ids as $id) {
if (intval($id) != 0) $newIds[] = intval($id);
}
$ids = $newIds;
/**++**/
//конец правки
$site_url = $modx->config['site_url'];
session_start();$d_q = 'SELECT * FROM nedv_site_content';
$d_a = $modx->db->query( $d_q );
$count = 1;
while( $d_ar = $modx->db->getRow( $d_a ) ) {
}$snippet=$modx->runSnippet('snippet_name', $params);