public function __construct()
 {
     $resource = Mage::getSingleton('core/resource');
     parent::__construct();
     $this->_tagTable = $resource->getTableName('tag/tag');
     $this->_tagRelTable = $resource->getTableName('tag/tag_relation');
     //        $this->joinField('tag_total_used', $this->_tagRelTable, 'count(_table_tag_total_used.tag_relations_id)', 'entity_val_id=entity_id', array('entity_id' => '2'));
     //        $this->getSelect()->group('tag_tag_id');
     //        echo $this->getSelect();
     //        $this->_productTable = $resource->getTableName('catalog/product');
     //        $this->_select->from(array('p' => $this->_productTable))
     //            ->join(array('tr' => $this->_tagRelTable), 'tr.entity_val_id=p.product_id and tr.entity_id=1', array('total_used' => 'count(tr.tag_relations_id)'))
     //            ->group('p.product_id', 'tr.tag_id')
     //        ;
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
 }