protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     $listing = Mage::helper('M2ePro/Component_Ebay')->getCachedObject('Listing', $this->getRequest()->getParam('listing_id'));
     $viewHeaderBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listing_view_header', '', array('listing' => $listing));
     $this->setChild('view_header', $viewHeaderBlock);
     // ---------------------------------------
     // ---------------------------------------
     $listingData = Mage::helper('M2ePro/Data_Global')->getValue('temp_data');
     $categoryMode = $this->getData('category_mode');
     $categoryValue = $this->getData('category_value');
     $internalData = $this->getData('internal_data');
     $specifics = $this->getData('specifics');
     $specificBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_category_specific');
     $specificBlock->setMarketplaceId($listingData['marketplace_id']);
     $specificBlock->setCategoryMode($categoryMode);
     $specificBlock->setCategoryValue($categoryValue);
     if (!empty($internalData)) {
         $specificBlock->setInternalData($internalData);
     }
     if (!empty($specifics)) {
         $specificBlock->setSelectedSpecifics($specifics);
     }
     $this->setChild('category_specific', $specificBlock);
     // ---------------------------------------
     // ---------------------------------------
     if ($categoryMode == Ess_M2ePro_Model_Ebay_Template_Category::CATEGORY_MODE_EBAY) {
         $this->_selectedCategoryPath = Mage::helper('M2ePro/Component_Ebay_Category_Ebay')->getPath($categoryValue, $listingData['marketplace_id']);
     } else {
         $attributeLabel = Mage::helper('M2ePro/Magento_Attribute')->getAttributeLabel($categoryValue);
         $this->_selectedCategoryPath = Mage::helper('M2ePro')->__('Magento Attribute') . ' > ' . $attributeLabel;
     }
     // ---------------------------------------
 }
Beispiel #2
0
 protected function _beforeToHtml()
 {
     if (is_null($this->compatibilityType)) {
         throw new LogicException('Compatibility type was not set.');
     }
     return parent::_beforeToHtml();
 }
 protected function _beforeToHtml()
 {
     // ---------------------------------------
     $data = array('id' => 'productSearch_submit_button', 'label' => Mage::helper('M2ePro')->__('Search'), 'class' => 'productSearch_submit_button submit');
     $buttonSubmitBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('productSearch_submit_button', $buttonSubmitBlock);
     // ---------------------------------------
     // ---------------------------------------
     $data = array('id' => 'productSearch_back_button', 'label' => Mage::helper('M2ePro')->__('Back'), 'class' => 'productSearch_back_button');
     $buttonBackBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('productSearch_back_button', $buttonBackBlock);
     // ---------------------------------------
     // ---------------------------------------
     $data = array('id' => 'productSearch_cancel_button', 'label' => Mage::helper('M2ePro')->__('Close'), 'class' => 'productSearch_cancel_button');
     $buttonCancelBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('productSearch_cancel_button', $buttonCancelBlock);
     // ---------------------------------------
     $buttonResetBlock = $this->getChild('productSearch_cleanSuggest_button');
     if (empty($buttonResetBlock)) {
         // ---------------------------------------
         $data = array('id' => 'productSearch_cleanSuggest_button', 'label' => Mage::helper('M2ePro')->__('Clear Search Results'), 'class' => 'productSearch_cleanSuggest_button', 'onclick' => 'ListingGridHandlerObj.productSearchHandler.clearSearchResultsAndOpenSearchMenu()');
         $buttonResetBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
         $this->setChild('productSearch_cleanSuggest_button', $buttonResetBlock);
         // ---------------------------------------
     }
     parent::_beforeToHtml();
 }
 protected function _beforeToHtml()
 {
     if (is_null($this->motorsType)) {
         throw new Ess_M2ePro_Model_Exception_Logic('Compatibility type was not set.');
     }
     //------------------------------
     /** @var Ess_M2ePro_Block_Adminhtml_Ebay_Motor_Add_Tabs $tabsBlock */
     $tabsBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_motor_add_tabs');
     $tabsBlock->setMotorsType($this->getMotorsType());
     $this->setChild('motor_add_tabs', $tabsBlock);
     //------------------------------
     //------------------------------
     $data = array('style' => 'float: right;', 'label' => Mage::helper('M2ePro')->__('Confirm'), 'onclick' => 'EbayMotorsHandlerObj.closeInstruction();');
     $confirmBtn = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('motor_confirm_btn', $confirmBtn);
     //------------------------------
     //------------------------------
     $data = array('style' => 'margin-right: 5px', 'label' => Mage::helper('M2ePro')->__('Add'), 'onclick' => 'EbayMotorsHandlerObj.updateMotorsData(0);');
     $closeBtn = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('motor_add_btn', $closeBtn);
     //------------------------------
     //------------------------------
     $data = array('label' => Mage::helper('M2ePro')->__('Override'), 'onclick' => 'EbayMotorsHandlerObj.updateMotorsData(1);');
     $closeBtn = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('motor_override_btn', $closeBtn);
     //------------------------------
     //------------------------------
     $data = array('style' => 'float: right;', 'label' => Mage::helper('M2ePro')->__('Close'), 'onclick' => 'Windows.getFocusedWindow().close();');
     $closeBtn = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('motor_close_btn', $closeBtn);
     //------------------------------
     return parent::_beforeToHtml();
 }
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     $listing = Mage::helper('M2ePro/Component_Ebay')->getCachedObject('Listing', $this->getRequest()->getParam('listing_id'));
     $viewHeaderBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listing_view_header', '', array('listing' => $listing));
     $this->setChild('view_header', $viewHeaderBlock);
     // ---------------------------------------
     // ---------------------------------------
     $listingData = Mage::helper('M2ePro/Data_Global')->getValue('temp_data');
     $internalData = $this->getData('internal_data');
     $chooserBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_category_chooser');
     $chooserBlock->setMarketplaceId($listingData['marketplace_id']);
     $chooserBlock->setAccountId($listingData['account_id']);
     if (!empty($internalData)) {
         $chooserBlock->setInternalData($internalData);
     }
     $this->setChild('category_chooser', $chooserBlock);
     // ---------------------------------------
     // ---------------------------------------
     $data = array('label' => Mage::helper('adminhtml')->__('Yes'), 'id' => 'existing_templates_confirm_button');
     $this->setChild('existing_templates_confirm_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data));
     // ---------------------------------------
     $data = array('label' => Mage::helper('adminhtml')->__('No'), 'id' => 'existing_templates_cancel_button');
     $this->setChild('existing_templates_cancel_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data));
     // ---------------------------------------
 }
Beispiel #6
0
 protected function _beforeToHtml()
 {
     //------------------------------
     $this->setChild('product_mapping_grid', $this->getLayout()->createBlock('M2ePro/adminhtml_order_item_product_mapping_grid'));
     //------------------------------
     parent::_beforeToHtml();
 }
Beispiel #7
0
 protected function _beforeToHtml()
 {
     // Magento order data
     // ---------------
     $this->realMagentoOrderId = NULL;
     $magentoOrder = $this->order->getMagentoOrder();
     if (!is_null($magentoOrder)) {
         $this->realMagentoOrderId = $magentoOrder->getRealOrderId();
     }
     // ---------------
     // ---------------
     if (!is_null($magentoOrder) && $magentoOrder->hasShipments()) {
         $url = $this->getUrl('*/adminhtml_order/resubmitShippingInfo', array('id' => $this->order->getId()));
         $data = array('class' => '', 'label' => Mage::helper('M2ePro')->__('Resend Shipping Information'), 'onclick' => 'setLocation(\'' . $url . '\');');
         $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
         $this->setChild('resubmit_shipping_info', $buttonBlock);
     }
     // ---------------
     // Shipping data
     // ---------------
     /** @var $shippingAddress Ess_M2ePro_Model_Amazon_Order_ShippingAddress */
     $shippingAddress = $this->order->getShippingAddress();
     $this->shippingAddress = $shippingAddress->getData();
     $this->shippingAddress['country_name'] = $shippingAddress->getCountryName();
     // ---------------
     $this->setChild('item', $this->getLayout()->createBlock('M2ePro/adminhtml_common_amazon_order_view_item'));
     $this->setChild('item_edit', $this->getLayout()->createBlock('M2ePro/adminhtml_order_item_edit'));
     $this->setChild('log', $this->getLayout()->createBlock('M2ePro/adminhtml_order_view_log_grid'));
     return parent::_beforeToHtml();
 }
Beispiel #8
0
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     $listing = Mage::helper('M2ePro/Component_Ebay')->getCachedObject('Listing', $this->getRequest()->getParam('listing_id'));
     $viewHeaderBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listing_view_header', '', array('listing' => $listing));
     $this->setChild('view_header', $viewHeaderBlock);
     // ---------------------------------------
     // ---------------------------------------
     $url = $this->getUrl('*/adminhtml_ebay_listing/view', array('id' => $this->getRequest()->getParam('listing_id')));
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Go To The Listing'), 'onclick' => 'setLocation(\'' . $url . '\');'));
     $this->setChild('review', $buttonBlock);
     // ---------------------------------------
     // ---------------------------------------
     $addedProductsIds = Mage::helper('M2ePro/Data_Session')->getValue('added_products_ids');
     $url = $this->getUrl('*/adminhtml_ebay_listing/previewItems', array('currentProductId' => $addedProductsIds[0], 'productIds' => implode(',', $addedProductsIds)));
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Preview Added Products Now'), 'onclick' => 'window.open(\'' . $url . '\').focus();', 'class' => 'go'));
     $this->setChild('preview', $buttonBlock);
     // ---------------------------------------
     // ---------------------------------------
     $url = $this->getUrl('*/adminhtml_ebay_listing/view', array('id' => $this->getRequest()->getParam('listing_id'), 'do_list' => true));
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('List Added Products Now'), 'onclick' => 'setLocation(\'' . $url . '\');', 'class' => 'save'));
     $this->getRequest()->getParam('disable_list', false) && $buttonBlock->setData('style', 'display: none');
     $this->setChild('save_and_list', $buttonBlock);
     // ---------------------------------------
 }
 protected function _beforeToHtml()
 {
     // ---------------------------------------
     $data = array('id' => 'productSearchMenu_cancel_button', 'label' => Mage::helper('M2ePro')->__('Close'), 'class' => 'productSearchMenu_cancel_button');
     $buttonCancelBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('productSearchMenu_cancel_button', $buttonCancelBlock);
     // ---------------------------------------
     parent::_beforeToHtml();
 }
Beispiel #10
0
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     $listing = Mage::helper('M2ePro/Component_Ebay')->getCachedObject('Listing', $this->getRequest()->getParam('listing_id'));
     $viewHeaderBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listing_view_header', '', array('listing' => $listing));
     $this->setChild('view_header', $viewHeaderBlock);
     // ------------------------------------------------
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Continue'), 'onclick' => ''));
     $this->setChild('mode_same_remember_pop_up_confirm_button', $buttonBlock);
 }
Beispiel #11
0
 protected function _beforeToHtml()
 {
     $additionalTitle = $this->getRequest()->getParam('current_indexed_xpath');
     $additionalTitle = explode('/', ltrim($additionalTitle, '/'));
     array_shift($additionalTitle);
     $additionalTitle = array_map(function ($el) {
         return preg_replace('/-\\d+/', '', $el);
     }, $additionalTitle);
     $this->setData('additional_title', implode(' > ', $additionalTitle));
     return parent::_beforeToHtml();
 }
Beispiel #12
0
 protected function _beforeToHtml()
 {
     //------------------------------
     $data = array('id' => 'mapping_submit_button', 'label' => Mage::helper('M2ePro')->__('Confirm'), 'class' => 'mapping_submit_button submit');
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('mapping_submit_button', $buttonBlock);
     //------------------------------
     //------------------------------
     $this->setChild('mapping_grid', $this->getLayout()->createBlock('M2ePro/adminhtml_listing_other_mapping_grid'));
     //------------------------------
     parent::_beforeToHtml();
 }
Beispiel #13
0
 protected function _beforeToHtml()
 {
     //------------------------------
     $block = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_motor_view_group_grid');
     $block->setListingProductId($this->getListingProductId());
     $block->setMotorsType($this->getMotorsType());
     $this->setChild('view_group_grid', $block);
     //------------------------------
     //------------------------------
     $data = array('style' => 'float: right;', 'label' => Mage::helper('M2ePro')->__('Close'), 'onclick' => 'Windows.getFocusedWindow().close();');
     $closeBtn = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('motor_close_btn', $closeBtn);
     //------------------------------
     return parent::_beforeToHtml();
 }
 protected function _beforeToHtml()
 {
     // ---------------------------------------
     $data = array('id' => 'failedProducts_continue_button', 'label' => Mage::helper('M2ePro')->__('Continue'), 'class' => 'submit');
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('failedProducts_continue_button', $buttonBlock);
     // ---------------------------------------
     // ---------------------------------------
     $data = array('id' => 'failedProducts_back_button', 'label' => Mage::helper('M2ePro')->__('Back'), 'class' => 'scalable back');
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('failedProducts_back_button', $buttonBlock);
     // ---------------------------------------
     // ---------------------------------------
     $this->setChild('failedProducts_grid', $this->getLayout()->createBlock('M2ePro/adminhtml_listing_moving_failedProducts_grid', '', array('grid_url' => $this->getData('grid_url'))));
     // ---------------------------------------
     parent::_beforeToHtml();
 }
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     $listing = Mage::helper('M2ePro/Component')->getCachedUnknownObject('Listing', $this->getRequest()->getParam('id'));
     $viewHeaderBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listing_view_header', '', array('listing' => $listing));
     $this->setChild('view_header', $viewHeaderBlock);
     // ---------------------------------------
     // ---------------------------------------
     $url = $this->getUrl('*/*/viewListing', array('_current' => true, 'id' => $this->getRequest()->getParam('id')));
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Review Your Products'), 'onclick' => 'setLocation(\'' . $url . '\');', 'class' => 'save'));
     $this->setChild('review', $buttonBlock);
     // ---------------------------------------
     // ---------------------------------------
     $url = $this->getUrl('*/*/viewListingAndList', array('_current' => true, 'id' => $this->getRequest()->getParam('id')));
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('List Added Products Now'), 'onclick' => 'setLocation(\'' . $url . '\');', 'class' => 'save'));
     $this->setChild('list', $buttonBlock);
     // ---------------------------------------
 }
Beispiel #16
0
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // --------------------------------------
     $listing = Mage::helper('M2ePro/Component_Ebay')->getCachedObject('Listing', $this->getRequest()->getParam('listing_id'));
     $viewHeaderBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listing_view_header', '', array('listing' => $listing));
     $this->setChild('view_header', $viewHeaderBlock);
     // --------------------------------------
     // --------------------------------------
     $url = $this->getUrl('*/adminhtml_ebay_listing/view', array('id' => $this->getRequest()->getParam('listing_id')));
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Review Your Products'), 'onclick' => 'setLocation(\'' . $url . '\');', 'class' => 'save'));
     $this->setChild('review', $buttonBlock);
     // --------------------------------------
     // --------------------------------------
     $url = $this->getUrl('*/adminhtml_ebay_listing/view', array('id' => $this->getRequest()->getParam('listing_id'), 'do_list' => true));
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('List Added Products Now'), 'onclick' => 'setLocation(\'' . $url . '\');', 'class' => 'save'));
     $this->getRequest()->getParam('disable_list', false) && $buttonBlock->setData('style', 'display: none');
     $this->setChild('save_and_list', $buttonBlock);
     // --------------------------------------
 }
Beispiel #17
0
 protected function _beforeToHtml()
 {
     // Magento order data
     // ---------------------------------------
     $this->realMagentoOrderId = NULL;
     $magentoOrder = $this->order->getMagentoOrder();
     if (!is_null($magentoOrder)) {
         $this->realMagentoOrderId = $magentoOrder->getRealOrderId();
     }
     // ---------------------------------------
     // ---------------------------------------
     if (!is_null($magentoOrder) && $magentoOrder->hasShipments()) {
         $url = $this->getUrl('*/adminhtml_order/resubmitShippingInfo', array('id' => $this->order->getId()));
         $data = array('class' => '', 'label' => Mage::helper('M2ePro')->__('Resend Shipping Information'), 'onclick' => 'setLocation(\'' . $url . '\');');
         $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
         $this->setChild('resubmit_shipping_info', $buttonBlock);
     }
     // ---------------------------------------
     // Shipping data
     // ---------------------------------------
     /** @var $shippingAddress Ess_M2ePro_Model_Ebay_Order_ShippingAddress */
     $shippingAddress = $this->order->getShippingAddress();
     $this->shippingAddress = $shippingAddress->getData();
     $this->shippingAddress['country_name'] = $shippingAddress->getCountryName();
     // ---------------------------------------
     // Global Shipping data
     // ---------------------------------------
     $globalShippingDetails = $this->order->getChildObject()->getGlobalShippingDetails();
     if (!empty($globalShippingDetails)) {
         $this->ebayWarehouseAddress = $globalShippingDetails['warehouse_address'];
         $this->globalShippingServiceDetails = $globalShippingDetails['service_details'];
     }
     // ---------------------------------------
     $this->setChild('item', $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_order_view_item'));
     $this->setChild('item_edit', $this->getLayout()->createBlock('M2ePro/adminhtml_order_item_edit'));
     $this->setChild('log', $this->getLayout()->createBlock('M2ePro/adminhtml_order_view_log_grid'));
     $this->setChild('external_transaction', $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_order_view_externalTransaction'));
     return parent::_beforeToHtml();
 }
 protected function _beforeToHtml()
 {
     // Magento order data
     // ---------------------------------------
     $this->realMagentoOrderId = NULL;
     $magentoOrder = $this->order->getMagentoOrder();
     if (!is_null($magentoOrder)) {
         $this->realMagentoOrderId = $magentoOrder->getRealOrderId();
     }
     // ---------------------------------------
     // ---------------------------------------
     if (!is_null($magentoOrder) && $magentoOrder->hasShipments() && !$this->order->getChildObject()->isPrime()) {
         $url = $this->getUrl('*/adminhtml_order/resubmitShippingInfo', array('id' => $this->order->getId()));
         $data = array('class' => '', 'label' => Mage::helper('M2ePro')->__('Resend Shipping Information'), 'onclick' => 'setLocation(\'' . $url . '\');');
         $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
         $this->setChild('resubmit_shipping_info', $buttonBlock);
     }
     // ---------------------------------------
     // Shipping data
     // ---------------------------------------
     /** @var $shippingAddress Ess_M2ePro_Model_Amazon_Order_ShippingAddress */
     $shippingAddress = $this->order->getShippingAddress();
     $this->shippingAddress = $shippingAddress->getData();
     $this->shippingAddress['country_name'] = $shippingAddress->getCountryName();
     // ---------------------------------------
     // Merchant Fulfillment
     // ---------------------------------------
     if (!$this->order->getChildObject()->isCanceled() && !$this->order->getChildObject()->isPending() && !$this->order->getChildObject()->isFulfilledByAmazon() && $this->order->getMarketplace()->getChildObject()->isMerchantFulfillmentAvailable()) {
         $orderId = $this->order->getId();
         $data = array('class' => '', 'label' => Mage::helper('M2ePro')->__('Use Amazon\'s Shipping Services'), 'onclick' => "OrderMerchantFulfillmentHandlerObj.getPopupAction({$orderId});", 'style' => 'margin-top: 3px; margin-left: 6px;');
         $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
         $this->setChild('use_amazons_shipping_services', $buttonBlock);
     }
     // ---------------------------------------
     $this->setChild('item', $this->getLayout()->createBlock('M2ePro/adminhtml_common_amazon_order_view_item'));
     $this->setChild('item_edit', $this->getLayout()->createBlock('M2ePro/adminhtml_order_item_edit'));
     $this->setChild('log', $this->getLayout()->createBlock('M2ePro/adminhtml_order_view_log_grid'));
     return parent::_beforeToHtml();
 }
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     $listing = Mage::helper('M2ePro/Component_Ebay')->getCachedObject('Listing', $this->getRequest()->getParam('listing_id'));
     $viewHeaderBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listing_view_header', '', array('listing' => $listing));
     $this->setChild('view_header', $viewHeaderBlock);
     // ---------------------------------------
     // ---------------------------------------
     $data = array('id' => 'next_category_button', 'class' => 'next next_category_button specifics_buttons', 'label' => Mage::helper('M2ePro')->__('Next Category'), 'onclick' => 'EbayListingCategorySpecificWrapperHandlerObj.renderNextCategory();');
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('next_category_button', $buttonBlock);
     // ---------------------------------------
     // ---------------------------------------
     $data = array('class' => 'scalable next continue specifics_buttons', 'label' => Mage::helper('M2ePro')->__('Continue'), 'onclick' => 'EbayListingCategorySpecificWrapperHandlerObj.save();');
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('continue', $buttonBlock);
     // ---------------------------------------
     // ---------------------------------------
     $data = array('class' => 'next', 'label' => Mage::helper('M2ePro')->__('Continue'), 'onclick' => 'EbayListingCategorySpecificWrapperHandlerObj.save();');
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('popup_confirm_button', $buttonBlock);
     // ---------------------------------------
 }
 protected function _beforeToHtml()
 {
     $specificsGrid = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_motor_specific_grid');
     $this->setData('specifics_grid_id', $specificsGrid->getId());
     return parent::_beforeToHtml();
 }
 protected function _beforeToHtml()
 {
     // ---------------------------------------
     $channelOptions = array();
     foreach ($this->getOrderItem()->getChildObject()->getVariationChannelOptions() as $attribute => $value) {
         $channelOptions[] = array('label' => $attribute, 'value' => $value);
     }
     $this->setData('channel_options', $channelOptions);
     // ---------------------------------------
     // ---------------------------------------
     $this->magentoProduct = $this->getOrderItem()->getMagentoProduct();
     $magentoOptions = array();
     $magentoVariations = $this->magentoProduct->getVariationInstance()->getVariationsTypeRaw();
     if ($this->magentoProduct->isGroupedType()) {
         $magentoOptionLabel = Mage::helper('M2ePro')->__(Ess_M2ePro_Model_Magento_Product_Variation::GROUPED_PRODUCT_ATTRIBUTE_LABEL);
         $magentoOption = array('option_id' => 0, 'label' => $magentoOptionLabel, 'values' => array());
         foreach ($magentoVariations as $key => $magentoVariation) {
             $magentoOption['values'][] = array('value_id' => $key, 'label' => $magentoVariation->getName(), 'product_ids' => array($magentoVariation->getId()));
         }
         $magentoOptions[] = $magentoOption;
     } else {
         foreach ($magentoVariations as $magentoVariation) {
             $magentoOptionLabel = array_shift($magentoVariation['labels']);
             if (!$magentoOptionLabel) {
                 $magentoOptionLabel = Mage::helper('M2ePro')->__('N/A');
             }
             $magentoOption = array('option_id' => $magentoVariation['option_id'], 'label' => $magentoOptionLabel, 'values' => array());
             foreach ($magentoVariation['values'] as $magentoOptionValue) {
                 $magentoValueLabel = array_shift($magentoOptionValue['labels']);
                 if (!$magentoValueLabel) {
                     $magentoValueLabel = Mage::helper('M2ePro')->__('N/A');
                 }
                 $magentoOption['values'][] = array('value_id' => $magentoOptionValue['value_id'], 'label' => $magentoValueLabel, 'product_ids' => $magentoOptionValue['product_ids']);
             }
             $magentoOptions[] = $magentoOption;
         }
     }
     $this->setData('magento_options', $magentoOptions);
     // ---------------------------------------
     // ---------------------------------------
     $data = array('id' => 'product_options_mapping_submit_button', 'label' => Mage::helper('M2ePro')->__('Confirm'), 'class' => 'product_options_mapping_submit_button submit', 'onclick' => 'OrderEditItemHandlerObj.assignProductDetails();');
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data);
     $this->setChild('product_options_mapping_submit_button', $buttonBlock);
     // ---------------------------------------
     parent::_beforeToHtml();
 }
Beispiel #22
0
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     $this->setChild('help', $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_search_help'));
     $this->setChild('grid', $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_search_grid'));
 }
Beispiel #23
0
 protected function _beforeToHtml()
 {
     $this->calculateWarnings();
     return parent::_beforeToHtml();
 }