<?php
$packagepath = $modx->getOption('core_path') . 'components/goods/';
$modelpath = $packagepath.'model/';
$modx->addPackage('goods',$modelpath);
$c = $modx->newQuery('custom_addgoods');
$c->select('name', 'artikul');
$c->where(array(
'kamp' => 0,
'createdby' => 1,
));
$c->sortby('id','ASC');
$c->limit(10);
$res = $modx->getCollection('custom_addgoods',$c);
foreach ($res as $good)
{
echo $good->name;
}
?>This discussion is closed to further replies. Keep calm and carry on.