public function getBuyTabHtml() { $tutorialShowed = Mage::helper('M2ePro/Module')->getConfig()->getGroupValue('/cache/buy/listing/', 'tutorial_shown'); if (!$tutorialShowed) { return parent::getBuyTabHtml(); } $javascript = ''; if ($this->getRequest()->isXmlHttpRequest()) { $javascript = $this->getBuyTabBlock()->getTemplatesButtonJavascript(); } return $javascript . $this->getLayout()->createBlock('M2ePro/adminhtml_buy_listing_filter')->toHtml() . parent::getBuyTabHtml(); }
public function getBuyTabHtml() { /** @var $helper Ess_M2ePro_Helper_Data */ $helper = Mage::helper('M2ePro'); $componentMode = Ess_M2ePro_Helper_Component_Buy::NICK; $logViewUrl = $this->getUrl('*/adminhtml_log/listingOther', array('filter' => base64_encode('component_mode=' . Ess_M2ePro_Helper_Component_Buy::NICK), 'back' => $helper->makeBackUrlParam('*/adminhtml_listingOther/index/tab/' . $componentMode))); $prepareData = $this->getUrl('*/adminhtml_listingOther/prepareMoveToListing'); $createDefaultListingUrl = $this->getUrl('*/adminhtml_listingOther/createDefaultListing'); $getMoveToListingGridHtml = $this->getUrl('*/adminhtml_listing/moveToListingGrid'); $getFailedProductsGridHtml = $this->getUrl('*/adminhtml_listing/getFailedProductsGrid'); $tryToMoveToListing = $this->getUrl('*/adminhtml_buy_listingOther/tryToMoveToListing'); $moveToListing = $this->getUrl('*/adminhtml_buy_listingOther/moveToListing'); $mapToProductUrl = $this->getUrl('*/adminhtml_buy_listingOther/mapToProduct'); $mapAutoToProductUrl = $this->getUrl('*/adminhtml_buy_listingOther/mapAutoToProduct'); $someProductsWereNotMappedMessage = 'No matches were found. Please change the mapping attributes in <strong>'; $someProductsWereNotMappedMessage .= 'Configuration > Account > 3rd Party Listings</strong> '; $someProductsWereNotMappedMessage .= 'or try to map manually.'; $someProductsWereNotMappedMessage = Mage::helper('M2ePro')->__($someProductsWereNotMappedMessage); $createListing = $helper->escapeJs($helper->__('Listings, which have the same Marketplace and Account were not found.')); $createListing .= $helper->escapeJs($helper->__('Would you like to create one with default settings ?')); $popupTitle = $helper->escapeJs($helper->__('Moving Rakuten.com Items.')); $failedProductsPopupTitle = $helper->escapeJs($helper->__('Products failed to move')); $confirmMessage = $helper->escapeJs($helper->__('Are you sure?')); $successfullyMovedMessage = $helper->escapeJs($helper->__('Product(s) was successfully moved.')); $productsWereNotMovedMessage = $helper->escapeJs($helper->__('Products were not moved. <a href="%s">View log</a> for details.')); $someProductsWereNotMovedMessage = $helper->escapeJs($helper->__('Some of the products were not moved. <a href="%s">View log</a> for details.')); $viewAllProductLogMessage = $helper->escapeJs($helper->__('View All Product Log.')); $selectItemsMessage = $helper->escapeJs($helper->__('Please select items.')); $selectActionMessage = $helper->escapeJs($helper->__('Please select action.')); $processingDataMessage = $helper->escapeJs($helper->__('Processing %s product(s).')); $successfullyMappedMessage = $helper->escapeJs($helper->__('Product(s) was successfully mapped.')); $mappingProductMessage = $helper->escapeJs($helper->__('Mapping Product')); $productDoesNotExistMessage = $helper->escapeJs($helper->__('Product does not exist.')); $successWord = $helper->escapeJs($helper->__('Success')); $noticeWord = $helper->escapeJs($helper->__('Notice')); $warningWord = $helper->escapeJs($helper->__('Warning')); $errorWord = $helper->escapeJs($helper->__('Error')); $closeWord = $helper->escapeJs($helper->__('Close')); $selectWithOutOptions = 'Item was not mapped as the chosen %s Simple Product has Custom Options. '; $selectWithOutOptions .= 'Please, choose another Simple Product.'; $selectWithOutOptions = Mage::helper('M2ePro')->__($selectWithOutOptions); // ->__('Current Rakuten.com version only supports simple products. Please, choose simple product.') $temp = 'Current Rakuten.com version only supports simple products. Please, choose simple product.'; $selectSimpleProductMessage = $helper->escapeJs($helper->__($temp)); $invalidDataMessage = $helper->escapeJs($helper->__('Please enter correct product ID.')); $enterProductOrSkuMessage = $helper->escapeJs($helper->__('Please enter correct product ID or SKU')); $autoMapProgressTitle = $helper->escapeJs($helper->__('Map Item(s) to Products')); $selectOnlyMapped = $helper->escapeJs($helper->__('Only mapped products must be selected.')); $selectTheSameTypeProducts = $helper->escapeJs($helper->__('Selected items must belong to the same Account and Marketplace.')); $javascriptsMain = <<<JAVASCRIPT <script type="text/javascript"> M2eProBuy = {}; M2eProBuy.url = {}; M2eProBuy.formData = {}; M2eProBuy.customData = {}; M2eProBuy.text = {}; M2eProBuy.url.logViewUrl = '{$logViewUrl}'; M2eProBuy.url.prepareData = '{$prepareData}'; M2eProBuy.url.createDefaultListing = '{$createDefaultListingUrl}'; M2eProBuy.url.getGridHtml = '{$getMoveToListingGridHtml}'; M2eProBuy.url.getFailedProductsGridHtml = '{$getFailedProductsGridHtml}'; M2eProBuy.url.tryToMoveToListing = '{$tryToMoveToListing}'; M2eProBuy.url.moveToListing = '{$moveToListing}'; M2eProBuy.url.mapToProduct = '{$mapToProductUrl}'; M2eProBuy.url.mapAutoToProductUrl = '{$mapAutoToProductUrl}'; M2eProBuy.text.create_listing = '{$createListing}'; M2eProBuy.text.popup_title = '{$popupTitle}'; M2eProBuy.text.failed_products_popup_title = '{$failedProductsPopupTitle}'; M2eProBuy.text.confirm = '{$confirmMessage}'; M2eProBuy.text.successfully_moved = '{$successfullyMovedMessage}'; M2eProBuy.text.products_were_not_moved = '{$productsWereNotMovedMessage}'; M2eProBuy.text.some_products_were_not_moved = '{$someProductsWereNotMovedMessage}'; M2eProBuy.text.select_items_message = '{$selectItemsMessage}'; M2eProBuy.text.select_action_message = '{$selectActionMessage}'; M2eProBuy.text.successfully_mapped = '{$successfullyMappedMessage}'; M2eProBuy.text.mapping_product_title = '{$mappingProductMessage}'; M2eProBuy.text.product_does_not_exist = '{$productDoesNotExistMessage}'; M2eProBuy.text.select_simple_product = '{$selectSimpleProductMessage}'; M2eProBuy.text.invalid_data = '{$invalidDataMessage}'; M2eProBuy.text.enter_product_or_sku = '{$enterProductOrSkuMessage}'; M2eProBuy.text.automap_progress_title = '{$autoMapProgressTitle}'; M2eProBuy.text.processing_data_message = '{$processingDataMessage}'; M2eProBuy.text.select_without_options = '{$selectWithOutOptions}'; M2eProBuy.text.failed_mapped = '{$someProductsWereNotMappedMessage}'; M2eProBuy.text.select_only_mapped_products = '{$selectOnlyMapped}'; M2eProBuy.text.select_the_same_type_products = '{$selectTheSameTypeProducts}'; M2eProBuy.text.view_all_product_log_message = '{$viewAllProductLogMessage}'; M2eProBuy.text.success_word = '{$successWord}'; M2eProBuy.text.notice_word = '{$noticeWord}'; M2eProBuy.text.warning_word = '{$warningWord}'; M2eProBuy.text.error_word = '{$errorWord}'; M2eProBuy.text.close_word = '{$closeWord}'; M2eProBuy.customData.componentMode = '{$componentMode}'; M2eProBuy.customData.gridId = 'buyListingOtherGrid'; var init = function () { BuyListingOtherMapToProductHandlerObj = new ListingOtherMapToProductHandler(M2eProBuy); BuyListingActionHandlerObj = new ListingActionHandler(M2eProBuy); BuyListingMoveToListingHandlerObj = new ListingMoveToListingHandler(M2eProBuy); BuyListingOtherAutoMapHandlerObj = new ListingOtherAutoMapHandler(M2eProBuy); BuyListingItemGridHandlerObj = new ListingItemGridHandler( M2eProBuy, 'buyListingOtherGrid', 3, 2, BuyListingActionHandlerObj, BuyListingMoveToListingHandlerObj, undefined, BuyListingOtherAutoMapHandlerObj ); } {$this->isAjax} ? init() : Event.observe(window, 'load', init); </script> JAVASCRIPT; $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_buy_listing_other_help'); $javascriptsMain .= $this->getHelpBlockJavascript($helpBlock->getContainerId()); return $javascriptsMain . $helpBlock->toHtml() . $this->getBuyTabBlockFilterHtml() . parent::getBuyTabHtml(); }
public function getBuyTabHtml() { $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_buy_synchronization_help'); return $helpBlock->toHtml() . parent::getBuyTabHtml(); }
public function getBuyTabHtml() { $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_buy_order_help'); $javascript = $this->getHelpBlockJavascript($helpBlock->getContainerId()); return $javascript . $helpBlock->toHtml() . $this->getBuyTabBlockFilterHtml() . parent::getBuyTabHtml(); }