protected function _prepareLayout() { $return = parent::_prepareLayout(); $contents = $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_vaf'); $contents = $contents->toHtml(); $this->addTab('vaf', array('label' => Mage::helper('catalog')->__('Vehicle Fits'), 'content' => $contents)); return $return; }
protected function _prepareLayout() { $this->parent = parent::_prepareLayout(); if (Mage::app()->getRequest()->getParam('id') !== null) { $this->addTab('productvideo', array('label' => Mage::helper('catalog')->__('Product Videos'), 'class' => 'ajax', 'url' => $this->getUrl('iwd_productvideo/adminhtml_productvideo/videogrid', array('_current' => true)))); } return $this->parent; }
protected function _prepareLayout() { parent::_prepareLayout(); $_product = Mage::registry('product'); if ($_product->getId()) { $this->addTab('customerprices', array('label' => Mage::helper('catalog')->__('Prices per Customer'), 'content' => $this->getLayout()->createBlock('customerprices/Adminhtml_Catalog_Product_Tab_CustomerPrices')->toHtml())); } }
protected function _prepareLayout() { parent::_prepareLayout(); $_session = Mage::getSingleton('core/session'); $_session->setIsBlockInserted(false); $_product = Mage::registry('product'); if ($_product->getId() && $_product->getTypeId() == 'giftcards' && $_product->getAttributeText('wts_gc_pregenerate') == 'Yes') { $this->addTab('pregeneratedcards', array('label' => Mage::helper('catalog')->__('Pre-Generated Codes'), 'url' => $this->getUrl('giftcards/adminhtml_product/pregenerated', array('_current' => true)), 'class' => 'ajax')); } }
protected function _prepareLayout() { parent::_prepareLayout(); $this->addTab('commercestack_related', array('label' => Mage::helper('catalog')->__('Related Products (Automated)'), 'url' => $this->getUrl('recommender/product/related', array('_current' => true)), 'class' => 'ajax', 'insertAfter' => 'related')); // Upsell source is based on user-config $upsellSource = Mage::getStoreConfig('recommender/relatedproductsadvanced/upsellsource'); $tabUrls = array('related' => 'recommender/product/related', 'crosssell' => 'recommender/product/crosssell', 'random' => '*/*/upsell'); $this->addTab('commercestack_upsell', array('label' => Mage::helper('catalog')->__('Up-sells (Automated)'), 'url' => $this->getUrl($tabUrls[$upsellSource], array('_current' => true)), 'class' => 'ajax', 'insertAfter' => 'upsell')); $this->addTab('commercestack_crosssell', array('label' => Mage::helper('catalog')->__('Cross-sells (Automated)'), 'url' => $this->getUrl('recommender/product/crosssell', array('_current' => true)), 'class' => 'ajax', 'insertAfter' => 'crosssell')); }
protected function _prepareLayout() { $parent = parent::_prepareLayout(); //if (!Mage::helper('giftcard')->isActive()) // return $parent; $product = $this->getProduct(); if ($product->getTypeId() == MT_Giftcard_Model_Catalog_Product_Type::TYPE_GIFTCARD_PRODUCT) { $this->addTab('giftcard_series_assign', array('label' => Mage::helper('giftcard')->__('Assign Gift Cards Series'), 'url' => $this->getUrl('*/*/giftCardSeries', array('_current' => true)), 'class' => 'ajax')); } return $this; }
/** * override the _prepareLayout() method to include teh accessories tab * @access protected * @return Anais_Accessories_Block_Adminhtml_Catalog_Product_Edit_Tabs * @author Marius Strajeru <*****@*****.**> */ protected function _prepareLayout() { parent::_prepareLayout(); $product = $this->getProduct(); if (!($setId = $product->getAttributeSetId())) { $setId = $this->getRequest()->getParam('set', null); } if ($setId) { $this->addTab('accessories', array('label' => Mage::helper('accessories')->__('Accessories'), 'url' => $this->getUrl('*/*/accessories', array('_current' => true)), 'class' => 'ajax')); } return $this; }
protected function _prepareLayout() { parent::_prepareLayout(); if ($this->getProduct()->getId()) { $TaskCount = 0; $gridBlock = $this->getLayout()->createBlock('Organizer/Task_Grid')->setEntityType('product')->setEntityId($this->getProduct()->getId())->setShowTarget(false)->setShowEntity(false)->setTemplate('Organizer/Task/List.phtml'); $content = $gridBlock->toHtml(); $TaskCount = $gridBlock->getCollection()->getSize(); $this->addTab('product_organizer', array('label' => Mage::helper('Organizer')->__('Organizer') . ' (' . $TaskCount . ')', 'title' => Mage::helper('Organizer')->__('Organizer') . ' (' . $TaskCount . ')', 'content' => $content)); } return $this; }
protected function _prepareLayout() { $product = $this->getProduct(); if (!($setId = $product->getAttributeSetId())) { $return = parent::_prepareLayout(); } if ($setId) { $return = parent::_prepareLayout(); $this->addTab('niveus_youtube_videos', array('label' => Mage::helper('productvideo')->__('Videos'), 'url' => $this->getUrl('productvideo_admin/adminhtml_videos', array('_current' => true)), 'class' => 'ajax', 'after' => 'custom_option')); return $return; } return false; }
/** * Add tab under Product Information section * Tab will not be added of product type is 'Downloadable' * Tab name : 'Product Files' */ protected function _prepareLayout() { parent::_prepareLayout(); if (Mage::registry('current_product')->getTypeID() !== Mage_Downloadable_Model_Product_Type::TYPE_DOWNLOADABLE) { $product = $this->getProduct(); if (!($setId = $product->getAttributeSetId())) { $setId = $this->getRequest()->getParam('set', null); } if ($setId) { $this->addTab('staempfli_productattachment', array('label' => Mage::helper('staempfli_productattachment')->__('Product Files'), 'content' => $this->getLayout()->createBlock('staempfli_productattachment/adminhtml_catalog_product_edit_tab_list')->_toHtml())); } } }
protected function _prepareLayout() { parent::_prepareLayout(); $product = $this->getProduct(); if (!($setId = $product->getAttributeSetId())) { $setId = $this->getRequest()->getParam('set', null); } if ($setId) { //add logic to check if vendor module on and have any vendor information $this->addTab('vendor_information', array('label' => Mage::helper('vendor')->__('Vendor Information'), 'content' => $this->getLayout()->createBlock('vendor/adminhtml_catalog_product_edit_tab_vendor')->toHtml(), 'active' => false)); } //return parent::_prepareLayout(); }
protected function _prepareLayout() { $params = $this->getRequest()->getParams(); if ($params['id']) { $product = false; //Mage::getModel('catalog/product')->load($params['id']); if ($product) { switch ($product->getTypeId()) { case 'simple': case 'virtual': case 'downloadable': break; case 'bundle': $block = $this->getLayout()->createBlock('rewardpoints/adminhtml_sellproducts_edit_tab_grid'); $block->setSingle(true); $block->setProductId($product->getId()); $this->addTabAfter('sell_points', array('label' => Mage::helper('catalog')->__('Sell in Points'), 'content' => $block->toHtml())); case 'grouped': break; } } } parent::_prepareLayout(); }
protected function _prepareLayout() { parent::_prepareLayout(); $this->addTab('bundle_items', array('label' => Mage::helper('bundle')->__('Bundle Items'), 'url' => $this->getUrl('*/*/bundles', array('_current' => true)), 'class' => 'ajax')); $this->bindShadowTabs('bundle_items', 'customer_options'); }
protected function _prepareLayout() { parent::_prepareLayout(); $this->addTab('super', array('label' => Mage::helper('catalog')->__('Associated Products'), 'url' => $this->getUrl('*/*/superGroup', array('_current' => true)), 'class' => 'ajax')); }
protected function _prepareLayout() { $this->parent = parent::_prepareLayout(); $this->addTab('img360', array('label' => Mage::helper('catalog')->__('360º Gallery'), 'content' => $this->_translateHtml($this->getLayout()->createBlock('rotate360/adminhtml_tabs_img360')->toHtml()))); return $this->parent; }
protected function _prepareLayout() { parent::_prepareLayout(); $this->addTab('demo', array('label' => Mage::helper('catalog')->__('Demos'), 'content' => 'aaaaaaaa')); }
protected function _prepareLayout() { //return parent::_prepareLayout(); $l_aAttributesToBeRemoved = array('sku', 'weight', 'tax_class_id', 'url_key', 'visibility', 'news_from_date', 'news_to_date'); $l_aBypassAttributesRemoval = array('status', 'visibility', 'description', 'entry_postage', 'entry_postage2', 'entry_custom_postage', 'entry_work_in_progress', 'entry_batch_id', 'entry_date', 'entry_mapmaker', 'entry_mapmaker_from_year', 'entry_mapmaker_to_year', 'entry_artist', 'entry_artist_from_year', 'entry_artist_to_year', 'entry_author', 'entry_author_from_year', 'entry_author_to_year', 'entry_engraver', 'entry_engraver_from_year', 'entry_engraver_to_year', 'entry_condition', 'entry_technique', 'entry_unmatted', 'entry_matted', 'entry_framed', 'entry_image_size_width', 'entry_image_size_height', 'entry_frame_size_width', 'entry_frame_size_height', 'entry_plate_mark_size_width', 'entry_plate_mark_size_height', 'entry_paper_size_width', 'entry_paper_size_height', 'entry_catalogue_number', 'entry_on_hold', 'entry_on_hold_client_id', 'entry_on_hold_client_details', 'entry_is_sold', 'entry_hide', 'entry_is_featured', 'meta_title', 'meta_description', 'meta_keyword', 'frame_setup', 'short_description', 'printed_feature', 'product_location', 'product_lpk', 'product_cost_code', 'stock_number', 'product_location', 'entry_date2', 'sku', 'width', 'height', 'length', 'weight'); $product = $this->getProduct(); if (!($setId = $product->getAttributeSetId())) { $setId = $this->getRequest()->getParam('set', null); } if ($setId) { $groupCollection = Mage::getResourceModel('eav/entity_attribute_group_collection')->setAttributeSetFilter($setId)->setSortOrder()->load(); foreach ($groupCollection as $group) { if ('General' !== $group->getAttributeGroupName()) { continue; } $attributes = $product->getAttributes($group->getId(), true); // do not add groups without attributes foreach ($attributes as $key => $attribute) { //pr($attribute->getName()); if (!$attribute->getIsVisible()) { unset($attributes[$key]); } if (!$attribute->getIsRequired() && !in_array($attribute->getName(), $l_aBypassAttributesRemoval)) { unset($attributes[$key]); } else { //pr($attribute->getName()); } if (in_array($attribute->getName(), $l_aAttributesToBeRemoved)) { //unset($attributes[$key]); } } //die(); if (count($attributes) == 0) { continue; } //pr($this->getAttributeTabBlock()); $this->addTab('group_' . $group->getId(), array('label' => Mage::helper('catalog')->__($group->getAttributeGroupName()), 'content' => $this->_translateHtml($this->getLayout()->createBlock($this->getAttributeTabBlock(), 'adminhtml.catalog.product.edit.tab.attributes')->setGroup($group)->setGroupAttributes($attributes)->setProduct($product)->setCategories($this->getCategories())->setTemplate('reea_entries/form.phtml')->toHtml()))); /* pr(array_keys($group->getData())); pr($group->getAttributeGroupName()); pr('group_'.$group->getId()); pr(get_class($group)); */ } } //die(); $this->removeTab('categories'); $this->removeTab('related'); $this->removeTab('upsell'); $this->removeTab('crosssell'); if (Mage::helper('core')->isModuleEnabled('Mage_CatalogInventory')) { $this->removeTab('inventory'); } if (!Mage::app()->isSingleStoreMode()) { $this->removeTab('websites'); } if (!$product->isGrouped()) { $this->removeTab('customer_options'); } if ($this->getRequest()->getParam('id', false)) { if (Mage::helper('catalog')->isModuleEnabled('Mage_Review')) { if (Mage::getSingleton('admin/session')->isAllowed('admin/catalog/reviews_ratings')) { $this->removeTab('reviews'); } } if (Mage::helper('catalog')->isModuleEnabled('Mage_Tag')) { if (Mage::getSingleton('admin/session')->isAllowed('admin/catalog/tag')) { $this->removeTab('tags'); $this->removeTab('customers_tags'); } } } return $this; }
protected function _prepareLayout() { //return parent::_prepareLayout(); $l_aAttributesToBeRemoved = array('sku', 'weight', 'tax_class_id', 'url_key', 'visibility', 'news_from_date', 'news_to_date'); $l_aBypassAttributesRemoval = array('status', 'visibility', 'publication_details', 'purchase_product', 'online_catalogue'); $product = $this->getProduct(); if (!($setId = $product->getAttributeSetId())) { $setId = $this->getRequest()->getParam('set', null); } if ($setId) { $groupCollection = Mage::getResourceModel('eav/entity_attribute_group_collection')->setAttributeSetFilter($setId)->setSortOrder()->load(); foreach ($groupCollection as $group) { if ('General' !== $group->getAttributeGroupName()) { continue; } $attributes = $product->getAttributes($group->getId(), true); // do not add groups without attributes foreach ($attributes as $key => $attribute) { //pr($attribute->getName()); if (!$attribute->getIsVisible()) { unset($attributes[$key]); } if (!$attribute->getIsRequired() && !in_array($attribute->getName(), $l_aBypassAttributesRemoval)) { unset($attributes[$key]); } else { //pr($attribute->getName()); } } //die(); //pr(array_keys($attributes));die(); if (count($attributes) == 0) { continue; } //pr($this->getAttributeTabBlock()); $this->addTab('group_' . $group->getId(), array('label' => Mage::helper('catalog')->__($group->getAttributeGroupName()), 'content' => $this->_translateHtml($this->getLayout()->createBlock($this->getAttributeTabBlock(), 'adminhtml.catalog.product.edit.tab.attributes')->setGroup($group)->setGroupAttributes($attributes)->setProduct($product)->setCategories($this->getCategories())->setTemplate('reea_entries/formpdf.phtml')->toHtml()))); /* pr(array_keys($group->getData())); pr($group->getAttributeGroupName()); pr('group_'.$group->getId()); pr(get_class($group)); */ } } //die(); $this->removeTab('categories'); $this->removeTab('related'); $this->removeTab('upsell'); $this->removeTab('crosssell'); if (Mage::helper('core')->isModuleEnabled('Mage_CatalogInventory')) { $this->removeTab('inventory'); } if (!Mage::app()->isSingleStoreMode()) { $this->removeTab('websites'); } if (!$product->isGrouped()) { $this->removeTab('customer_options'); } if ($this->getRequest()->getParam('id', false)) { if (Mage::helper('catalog')->isModuleEnabled('Mage_Review')) { if (Mage::getSingleton('admin/session')->isAllowed('admin/catalog/reviews_ratings')) { $this->removeTab('reviews'); } } if (Mage::helper('catalog')->isModuleEnabled('Mage_Tag')) { if (Mage::getSingleton('admin/session')->isAllowed('admin/catalog/tag')) { $this->removeTab('tags'); $this->removeTab('customers_tags'); } } } return $this; }
protected function _prepareLayout() { $return = parent::_prepareLayout(); $this->addTab('rw_youtube_videos', array('label' => Mage::helper('productvideo')->__('Videos'), 'url' => $this->getUrl('productvideo_admin/adminhtml_videos', array('_current' => true)), 'class' => 'ajax', 'after' => 'inventory')); return $return; }