Пример #1
0
 /**
  * @param Mage_Adminhtml_Block_Catalog_Product $product
  * @return bool
  */
 protected function _canAddTab($product)
 {
     if ($product->getId()) {
         return true;
     }
     if (!$product->getAttributeSetId()) {
         return false;
     }
     $request = Mage::app()->getRequest();
     if ($request->getParam('type') == 'configurable') {
         if ($request->getParam('attributes')) {
             return true;
         }
     }
     return false;
 }
Пример #2
0
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->_addButton('add_new', array('label' => Mage::helper('catalog')->__('Add Product'), 'onclick' => "setLocation('{$this->getUrl('adminhtml/catalog_product/new')}')", 'class' => 'add'));
     $this->setTemplate('iksanika/productupdater/catalog/product.phtml');
     $this->setChild('grid', $this->getLayout()->createBlock('productupdater/catalog_product_grid', 'product.productupdater'));
 }
Пример #3
0
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->setTemplate('tbt' . DS . 'enhancedgrid' . DS . 'catalog' . DS . 'product.phtml');
     $this->setChild('grid', $this->getLayout()->createBlock('enhancedgrid/catalog_product_grid', 'product.enhancedgrid'));
     //@nelkaake -a 16/11/10:
     $store_switcher = $this->getLayout()->createBlock('adminhtml/store_switcher', 'store_switcher');
     $store_switcher->setUseConfirm(false);
     $this->setChild('store_switcher', $store_switcher);
     $this->setChild('add_new_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add Product'), 'onclick' => "setLocation('" . $this->getUrl('adminhtml/*/new') . "')", 'class' => 'add')));
 }
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->_removeButton('add_new');
     return;
 }
Пример #5
0
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->setTemplate('tbt/enhancedgrid/catalog/product.phtml');
     $this->setChild('grid', $this->getLayout()->createBlock('enhancedgrid/catalog_product_grid', 'product.enhancedgrid'));
 }