getUnitConfig()->getTableName(); if ( $this->Application->IsTempMode($this->Prefix) ) { $table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix); } $sql = 'SELECT COUNT(*) FROM ' . $table_name . ' WHERE (ItemType = 0) AND (CouponId = ' . $this->Application->GetVar('coup_id') . ')'; return $this->Conn->GetOne($sql); } function ItemIcon($params) { $object = $this->getObject($params); /* @var $object kDBList */ if ( $object->GetDBField('ItemType') == 2 ) { $cat_object = $this->Application->recallObject('c'); /* @var $cat_object CategoriesItem */ $cat_object->Load($object->GetDBField('CategoryId')); $cat_tag_processor = $this->Application->recallObject('c_TagProcessor'); /* @var $cat_tag_processor CategoriesTagProcessor */ return $cat_tag_processor->ItemIcon($params); } return parent::ItemIcon($params); } }