| Current Path : /var/www/iplanru/data/www/www.i-plan.ru/modules/mod_canonical/ |
| Current File : /var/www/iplanru/data/www/www.i-plan.ru/modules/mod_canonical/helper.php |
<?php
// No direct access
defined( '_JEXEC' ) or die;
/**
* Class Module Helper
* @author
*/
class modCanonicalHelper
{
/**
* getData method
* @param $params
* @return array
*/
static function getItems( $cat )
{
$db = JFactory::getDbo();
$m=array();
$list = $db->setQuery('
SELECT id, name, elements
FROM jos_zoo_item
where type="product" and instr(elements, "\"'.$cat.'\"")<>0')->loadAssocList();
foreach($list as $item)
{
$c=json_decode($item['elements'],true);
if ($c['590dc7f6-a0d8-4062-810a-92d118568f5e']['category']['0']==$cat)
{
$m[$item['id']]=$item['name'];
}
}
return $m;
}
}