예제 #1
0
 protected function _beforeToHtml()
 {
     // ---------------------------------------
     if ($this->isTabAllowed('general')) {
         $block = $this->createBlock('Ebay\\Listing\\Edit\\Tabs\\General', '', array('policy_localization' => $this->getData('policy_localization')));
         $this->addTab('general', array('label' => $this->__('Payment and Shipping'), 'title' => $this->__('Payment and Shipping'), 'content' => $block->toHtml()));
     }
     // ---------------------------------------
     // ---------------------------------------
     if ($this->isTabAllowed('selling')) {
         $block = $this->createBlock('Ebay\\Listing\\Edit\\Tabs\\Selling');
         $this->addTab('selling', array('label' => $this->__('Selling'), 'title' => $this->__('Selling'), 'content' => $block->toHtml()));
     }
     // ---------------------------------------
     // ---------------------------------------
     if ($this->isTabAllowed('synchronization')) {
         $block = $this->createBlock('Ebay\\Listing\\Edit\\Tabs\\Synchronization');
         $this->addTab('synchronization', array('label' => $this->__('Synchronization'), 'title' => $this->__('Synchronization'), 'content' => $block->toHtml()));
     }
     // ---------------------------------------
     // ---------------------------------------
     $this->setActiveTab($this->getRequest()->getParam('tab', 'general'));
     // ---------------------------------------
     return parent::_beforeToHtml();
 }
예제 #2
0
 protected function _beforeToHtml()
 {
     $this->addTab(self::TAB_ID_LISTING, $this->prepareTabListing());
     $this->addTab(self::TAB_ID_LISTING_OTHER, $this->prepareTabListingOther());
     $this->setActiveTab($this->getData('active_tab'));
     return parent::_beforeToHtml();
 }
예제 #3
0
    protected function _beforeToHtml()
    {
        $this->addTab('variations', array('label' => $this->__('Child Products'), 'title' => $this->__('Child Products'), 'content' => $this->createBlock('Amazon\\Listing\\Product\\Variation\\Manage\\Tabs\\Variations')->setListingProduct($this->getListingProduct())->toHtml()));
        $settingsBlock = $this->createBlock('Amazon\\Listing\\Product\\Variation\\Manage\\Tabs\\Settings\\Form')->setListingProduct($this->getListingProduct());
        $settingsBlock->calculateWarnings();
        $settingsBlockLabel = $this->__('Settings');
        $settingsBlockTitle = $this->__('Settings');
        $iconPath = $this->getViewFileUrl('Ess_M2ePro::images/' . $settingsBlock->getMessagesType() . '.png');
        $iconTitle = $this->__('Action required.');
        $iconStyle = 'vertical-align: middle;';
        if (count($settingsBlock->getMessages()) == 0) {
            $iconStyle .= 'display:none;';
        }
        $problemIcon = <<<HTML
<img style="{$iconStyle}" src="{$iconPath}" title="{$iconTitle}" alt="" width="16" height="15">&nbsp;
HTML;
        $this->addTab('settings', array('label' => $problemIcon . $settingsBlockLabel, 'title' => $settingsBlockTitle, 'content' => $settingsBlock->toHtml()));
        //        $this->addTab('vocabulary', array(
        //            'label'   => $this->__('Advanced'),
        //            'title'   => $this->__('Advanced'),
        //            'content' => $this->getLayout()
        //                ->createBlock('M2ePro/adminhtml_common_amazon_listing_variation_product_manage_tabs_vocabulary')
        //                ->setListingProductId($this->getListingProductId())
        //                ->toHtml()
        //        ));
        //
        $generalId = $this->getListingProduct()->getChildObject()->getGeneralId();
        if (empty($generalId) && $this->getListingProduct()->getChildObject()->isGeneralIdOwner()) {
            $this->setActiveTab('settings');
        } else {
            $this->setActiveTab('variations');
        }
        $this->setActiveTab('variations');
        return parent::_beforeToHtml();
    }
예제 #4
0
 protected function _beforeToHtml()
 {
     if (!$this->isListingOtherTabShouldBeShown() && $this->getData('active_tab') == self::TAB_ID_LISTING_OTHER) {
         $this->setData('active_tab', self::TAB_ID_LISTING);
     }
     $this->addTab(self::TAB_ID_LISTING, $this->prepareTabListing());
     $this->addTab(self::TAB_ID_LISTING_OTHER, $this->prepareTabListingOther());
     $this->setActiveTab($this->getData('active_tab'));
     return parent::_beforeToHtml();
 }
예제 #5
0
 protected function _beforeToHtml()
 {
     // ---------------------------------------
     $block = $this->createBlock('Amazon\\Listing\\Create\\Selling\\Form');
     $block->setUseFormContainer(false);
     $this->addTab('selling', array('label' => $this->__('Selling Settings'), 'title' => $this->__('Selling Settings'), 'content' => $block->toHtml()));
     // ---------------------------------------
     // ---------------------------------------
     $block = $this->createBlock('Amazon\\Listing\\Create\\Search\\Form');
     $block->setUseFormContainer(false);
     $this->addTab('search', array('label' => $this->__('Search Settings'), 'title' => $this->__('Search Settings'), 'content' => $block->toHtml()));
     // ---------------------------------------
     $this->setActiveTab($this->getRequest()->getParam('tab', 'selling'));
     return parent::_beforeToHtml();
 }