/** * Remove some grid columns for product grid in popup * * @return void */ public function _prepareColumns() { parent::_prepareColumns(); $this->removeColumn('action'); $this->removeColumn('status'); $this->removeColumn('visibility'); }
/** * @return $this */ protected function _prepareCollection() { parent::_prepareCollection(); if (null !== $this->getRequest()->getParam('current_product_id')) { $this->getCollection()->getSelect()->where('e.entity_id != ?', $this->getRequest()->getParam('current_product_id')); } $this->getCollection()->getSelect()->distinct()->join(['opt' => $this->getCollection()->getTable('catalog_product_option')], 'opt.product_id = e.entity_id', null); return $this; }
/** * Initialize review * * @return void */ protected function _construct() { parent::_construct(); $this->setRowClickCallback('review.gridRowClick'); $this->setUseAjax(true); }
/** * @return $this */ protected function _prepareCollection() { parent::_prepareCollection(); $this->getCollection()->addFieldToFilter('has_options', 1); return $this; }