public function getGridHtml() { // --------------------------------------- $editItemBlock = $this->createBlock('Order\\Item\\Edit'); // --------------------------------------- return $editItemBlock->toHtml() . parent::getGridHtml(); }
public function getGridHtml() { $this->js->add(<<<JS require([ 'M2ePro/Amazon/Listing/Product/Variation/Manage/Tabs/Variations/Grid', 'M2ePro/Amazon/Listing/AfnQty' ], function(){ ListingProductVariationManageVariationsGridObj = new AmazonListingProductVariationManageTabsVariationsGrid( '{$this->getChildBlock('grid')->getId()}', {$this->getListingProduct()->getListingId()} ); ListingProductVariationManageVariationsGridObj.actionHandler .setProgressBar('listing_product_variation_progress_bar'); ListingProductVariationManageVariationsGridObj.actionHandler .setGridWrapper('listing_product_variation_content_container'); ListingProductVariationManageVariationsGridObj.actionHandler .setErrorsSummaryContainer('listing_product_variation_errors_summary_container'); ListingProductVariationManageVariationsGridObj.actionHandler .setActionMessagesContainer('listing_product_variation_action_messages_container'); // TODO // AmazonListingAfnQtyObj = new AmazonListingAfnQty(); }); JS ); return parent::getGridHtml(); }
public function getGridHtml() { // --------------------------------------- $listing = $this->getHelper('Data\\GlobalData')->getValue('listing_for_products_category_settings'); $viewHeaderBlock = $this->createBlock('Listing\\View\\Header', '', ['data' => ['listing' => $listing]]); // --------------------------------------- return $viewHeaderBlock->toHtml() . parent::getGridHtml(); }
public function getGridHtml() { $accountId = $this->getRequest()->getParam('account'); $marketplaceId = $this->getRequest()->getParam('marketplace'); // --------------------------------------- $viewHeaderBlock = $this->createBlock('Listing\\Other\\View\\Header', '', ['data' => ['account' => $this->ebayFactory->getCachedObjectLoaded('Account', $accountId), 'marketplace' => $this->ebayFactory->getCachedObjectLoaded('Marketplace', $marketplaceId)]]); // --------------------------------------- return $viewHeaderBlock->toHtml() . parent::getGridHtml(); }
public function getGridHtml() { $listing = $this->getHelper('Data\\GlobalData')->getValue('listing_for_products_add'); $viewHeaderBlock = $this->createBlock('Listing\\View\\Header', '', ['data' => ['listing' => $listing]]); $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\AutoAction', array('id' => $this->getRequest()->getParam('id')))); $this->jsTranslator->addTranslations(['Remove Category' => $this->__('Remove Category'), 'Add New Group' => $this->__('Add New Group'), 'Add/Edit Categories Rule' => $this->__('Add/Edit Categories Rule'), 'Auto Add/Remove Rules' => $this->__('Auto Add/Remove Rules'), 'Based on Magento Categories' => $this->__('Based on Magento Categories'), 'You must select at least 1 Category.' => $this->__('You must select at least 1 Category.'), 'Rule with the same Title already exists.' => $this->__('Rule with the same Title already exists.')]); $this->js->addOnReadyJs(<<<JS require([ 'M2ePro/Amazon/Listing/AutoAction' ], function(){ window.ListingAutoActionObj = new AmazonListingAutoAction(); }); JS ); return $viewHeaderBlock->toHtml() . parent::getGridHtml(); }
public function getGridHtml() { $viewHeaderBlock = $this->createBlock('Listing\\View\\Header', '', ['data' => ['listing' => $this->getHelper('Data\\GlobalData')->getValue('listing_for_products_add')]]); return $viewHeaderBlock->toHtml() . parent::getGridHtml(); }
public function getGridHtml() { if ($this->getRequest()->isXmlHttpRequest()) { return parent::getGridHtml(); } $html = ''; // TODO NOT SUPPORTED FEATURES "Listing header selector" // --------------------------------------- $viewHeaderBlock = $this->createBlock('Listing\\View\\Header', '', ['data' => ['listing' => $this->listing]]); $viewHeaderBlock->setListingViewMode(true); // --------------------------------------- /** @var $helper \Ess\M2ePro\Helper\Data */ $helper = $this->getHelper('Data'); // --------------------------------------- // TODO NOT SUPPORTED FEATURES $this->jsUrl->addUrls(array_merge(array(), $helper->getControllerActions('Ebay\\Listing', array('_current' => true)), $helper->getControllerActions('Ebay\\Listing\\AutoAction', array('id' => $this->getRequest()->getParam('id'))), array('variationProductManage' => $this->getUrl('*/ebay_listing_variation_product_manage/index')))); // --------------------------------------- // --------------------------------------- $this->jsTranslator->addTranslations(array('Remove Category' => $this->__('Remove Category'), 'Add New Group' => $this->__('Add New Group'), 'Add/Edit Categories Rule' => $this->__('Add/Edit Categories Rule'), 'Auto Add/Remove Rules' => $this->__('Auto Add/Remove Rules'), 'Based on Magento Categories' => $this->__('Based on Magento Categories'), 'You must select at least 1 Category.' => $this->__('You must select at least 1 Category.'), 'Rule with the same Title already exists.' => $this->__('Rule with the same Title already exists.'), 'Compatibility Attribute' => $this->__('Compatibility Attribute'), 'Sell on Another Marketplace' => $this->__('Sell on Another Marketplace'), 'Product' => $this->__('Product'), 'Translation Service' => $this->__('Translation Service'), 'You must select at least 1 Listing.' => $this->__('You must select at least 1 Listing.'), 'Data migration.' => $this->__('Data migration...'), 'Creating Policies in process. Please wait...' => $this->__('Creating Policies in process. Please wait...'), 'Creating Translation Account in process. Please wait...' => $this->__('Creating Translation Account in process. Please wait...'), 'Creating Listing in process. Please wait...' => $this->__('Creating Listing in process. Please wait...'), 'Adding Products in process. Please wait...' => $this->__('Adding Products in process. Please wait...'), 'Products failed to add' => $this->__('Failed Products'), 'Migration success.' => $this->__('The Products have been successfully added into Destination Listing.'), 'Migration error.' => $this->__('The Products have not been added into Destination Listing' . ' because Products with the same Magento Product IDs already exist there.'), 'Some Products Categories Settings are not set or Attributes for Title or Description are empty.' => $this->__('Some Products Categories Settings are not set' . ' or Attributes for Title or Description are empty.'), 'Another Synchronization Is Already Running.' => $this->__('Another Synchronization Is Already Running.'), 'Getting information. Please wait ...' => $this->__('Getting information. Please wait ...'), 'Preparing to start. Please wait ...' => $this->__('Preparing to start. Please wait ...'), 'Synchronization has successfully ended.' => $this->__('Synchronization has successfully ended.'), 'Synchronization ended with warnings. <a target="_blank" href="%url%">View Log</a> for details.' => $this->__('Synchronization ended with warnings. <a target="_blank" href="%url%">View Log</a> for details.'), 'Synchronization ended with errors. <a target="_blank" href="%url%">View Log</a> for details.' => $this->__('Synchronization ended with errors. <a target="_blank" href="%url%">View Log</a> for details.'))); // --------------------------------------- if (!$this->getRequest()->isXmlHttpRequest()) { $this->js->add(<<<JS define('EbayListingAutoActionInstantiation', [ 'M2ePro/Ebay/Listing/AutoAction', 'extjs/ext-tree-checkbox' ], function(){ window.ListingAutoActionObj = new EbayListingAutoAction(); }); JS ); } // --------------------------------------- return $viewHeaderBlock->toHtml() . parent::getGridHtml(); }
public function getGridHtml() { if ($this->getRequest()->isXmlHttpRequest()) { return parent::getGridHtml(); } $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Model\\Listing')); $showAutoAction = json_encode((bool) $this->getRequest()->getParam('auto_actions')); // --------------------------------------- $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\AutoAction', array('id' => $this->getRequest()->getParam('id')))); $path = 'amazon_listing_product_log/index'; $this->jsUrl->add($this->getUrl('*/' . $path, array('back' => $this->getHelper('Data')->makeBackUrlParam('*/amazon_listing/view', array('id' => $this->listing['id'])))), $path); $path = 'amazon_listing/duplicateProducts'; $this->jsUrl->add($this->getUrl('*/' . $path), $path); $this->jsUrl->add($this->getUrl('*/amazon_listing_log/index', array('id' => $this->listing['id'], 'back' => $this->getHelper('Data')->makeBackUrlParam('*/amazon_listing/view', ['id' => $this->listing['id']]))), 'logViewUrl'); $this->jsUrl->add($this->getUrl('*/listing/getErrorsSummary'), 'getErrorsSummary'); $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing')); $this->jsUrl->addUrls(['runListProducts' => $this->getUrl('*/amazon_listing/runListProducts'), 'runRelistProducts' => $this->getUrl('*/amazon_listing/runRelistProducts'), 'runReviseProducts' => $this->getUrl('*/amazon_listing/runReviseProducts'), 'runStopProducts' => $this->getUrl('*/amazon_listing/runStopProducts'), 'runStopAndRemoveProducts' => $this->getUrl('*/amazon_listing/runStopAndRemoveProducts'), 'runDeleteAndRemoveProducts' => $this->getUrl('*/amazon_listing/runDeleteAndRemoveProducts'), 'runRemoveProducts' => $this->getUrl('*/amazon_listing/runRemoveProducts')]); $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product')); $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Fulfillment')); $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Search')); $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Template\\Description')); $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Variation')); $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Variation\\Manage')); $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Amazon\\Listing\\Product\\Variation\\Individual')); $this->jsUrl->add($this->getUrl('*/amazon_listing_view_settings_moving/moveToListingGrid', ['listing_view' => true]), 'moveToListingGridHtml'); $this->jsUrl->add($this->getUrl('*/listing_moving/prepareMoveToListing'), 'prepareData'); $this->jsUrl->add($this->getUrl('*/listing_moving/getFailedProductsGrid'), 'getFailedProductsGridHtml'); $this->jsUrl->add($this->getUrl('*/listing_moving/tryToMoveToListing'), 'tryToMoveToListing'); $this->jsUrl->add($this->getUrl('*/listing_moving/moveToListing'), 'moveToListing'); $this->jsUrl->add($this->getUrl('*/amazon_marketplace/index'), 'marketplaceSynchUrl'); $this->jsUrl->add($this->getUrl('*/listing/saveListingAdditionalData', ['id' => $this->listing['id']]), 'saveListingAdditionalData'); // TODO // $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions( // 'amazon_listing_repricing', // array( // 'id' => $this->listing['id'], // 'account_id' => $this->listing['account_id'] // ) // )); // --------------------------------------- $component = \Ess\M2ePro\Helper\Component\Amazon::NICK; $gridId = $this->getChildBlock('grid')->getId(); $ignoreListings = json_encode(array($this->listing['id'])); $marketplace = json_encode(array_merge($this->listing->getMarketplace()->getData(), $this->listing->getMarketplace()->getChildObject()->getData())); $isNewAsinAvailable = json_encode($this->listing->getMarketplace()->getChildObject()->isNewAsinAvailable()); $temp = $this->getHelper('Data\\Session')->getValue('products_ids_for_list', true); $productsIdsForList = empty($temp) ? '' : $temp; // TODO // $getUpdatedRepricingPriceBySkus = $this->getUrl( // '*/amazon_listing_repricing/getUpdatedPriceBySkus' // ); $templateDescriptionPopupTitle = $this->__('Assign Description Policy'); $popupTitle = $this->__('Moving Amazon Items'); $popupTitleSingle = $this->__('Moving Amazon Item'); $failedProductsPopupTitle = $this->__('Products failed to move'); $taskCompletedMessage = $this->__('Task completed. Please wait ...'); $taskCompletedSuccessMessage = $this->__('"%task_title%" Task has successfully submitted to be processed.'); $taskCompletedWarningMessage = $this->__('"%task_title%" Task has completed with warnings. <a target="_blank" href="%url%">View Log</a> for details.'); $taskCompletedErrorMessage = $this->__('"%task_title%" Task has completed with errors. <a target="_blank" href="%url%">View Log</a> for details.'); $lockedObjNoticeMessage = $this->__('Some Amazon request(s) are being processed now.'); $sendingDataToAmazonMessage = $this->__('Sending %product_title% Product(s) data on Amazon.'); $viewAllProductLogMessage = $this->__('View Full Product Log'); $listingLockedMessage = $this->__('The Listing was locked by another process. Please try again later.'); $listingEmptyMessage = $this->__('Listing is empty.'); $listingAllItemsMessage = $this->__('Listing All Items On Amazon'); $listingSelectedItemsMessage = $this->__('Listing Selected Items On Amazon'); $revisingSelectedItemsMessage = $this->__('Revising Selected Items On Amazon'); $relistingSelectedItemsMessage = $this->__('Relisting Selected Items On Amazon'); $stoppingSelectedItemsMessage = $this->__('Stopping Selected Items On Amazon'); $stoppingAndRemovingSelectedItemsMessage = $this->__('Stopping On Amazon And Removing From Listing Selected Items'); $deletingAndRemovingSelectedItemsMessage = $this->__('Removing From Amazon And Listing Selected Items'); $removingSelectedItemsMessage = $this->__('Removing From Listing Selected Items'); $successfullyMovedMessage = $this->__('Product(s) was successfully Moved.'); $productsWereNotMovedMessage = $this->__('Product(s) was not Moved. <a target="_blank" href="%url%">View Log</a> for details.'); $someProductsWereNotMovedMessage = $this->__('Some Product(s) was not Moved. <a target="_blank" href="%url%">View Log</a> for details.'); $selectItemsMessage = $this->__('Please select the Products you want to perform the Action on.'); $selectActionMessage = $this->__('Please select Action.'); $assignString = $this->__('Assign'); $templateShippingOverridePopupTitle = $this->__('Assign Shipping Override Policy'); $enterProductSearchQueryMessage = $this->__('Please enter Product Title or ASIN/ISBN/UPC/EAN.'); $autoMapAsinSearchProducts = $this->__('Search %product_title% Product(s) on Amazon.'); $autoMapAsinProgressTitle = $this->__('Automatic Assigning ASIN/ISBN to Item(s)'); $autoMapAsinErrorMessage = $this->__('Server is currently unavailable. Please try again later.'); $newAsinNotAvailable = $this->__('The new ASIN/ISBN creation functionality is not available in %code% Marketplace yet.'); $notSynchronizedMarketplace = $this->__('In order to use New ASIN/ISBN functionality, please re-synchronize Marketplace data.') . ' ' . $this->__('Press "Save And Update" Button after redirect on Marketplace Page.'); $noVariationsLeftText = $this->__('All variations are already added.'); $notSet = $this->__('Not Set'); $setAttributes = $this->__('Set Attributes'); $variationManageMatchedAttributesError = $this->__('Please choose valid Attributes.'); $variationManageMatchedAttributesErrorDuplicateSelection = $this->__('You can not choose the same Attribute twice.'); $variationManageSkuPopUpTitle = $this->__('Enter Amazon Parent Product SKU'); $switchToIndividualModePopUpTitle = $this->__('Change "Manage Variations" Mode'); $switchToParentModePopUpTitle = $this->__('Change "Manage Variations" Mode'); $emptySkuError = $this->__('Please enter Amazon Parent Product SKU.'); $this->jsTranslator->addTranslations(['Remove Category' => $this->__('Remove Category'), 'Add New Group' => $this->__('Add New Group'), 'Add/Edit Categories Rule' => $this->__('Add/Edit Categories Rule'), 'Auto Add/Remove Rules' => $this->__('Auto Add/Remove Rules'), 'Based on Magento Categories' => $this->__('Based on Magento Categories'), 'You must select at least 1 Category.' => $this->__('You must select at least 1 Category.'), 'Rule with the same Title already exists.' => $this->__('Rule with the same Title already exists.'), 'Clear Search Results' => $this->__('Clear Search Results'), 'popup_title' => $popupTitle, 'popup_title_single' => $popupTitleSingle, 'failed_products_popup_title' => $failedProductsPopupTitle, 'task_completed_message' => $taskCompletedMessage, 'task_completed_success_message' => $taskCompletedSuccessMessage, 'task_completed_warning_message' => $taskCompletedWarningMessage, 'task_completed_error_message' => $taskCompletedErrorMessage, 'locked_obj_notice' => $lockedObjNoticeMessage, 'sending_data_message' => $sendingDataToAmazonMessage, 'view_all_product_log_message' => $viewAllProductLogMessage, 'listing_locked_message' => $listingLockedMessage, 'listing_empty_message' => $listingEmptyMessage, 'listing_all_items_message' => $listingAllItemsMessage, 'listing_selected_items_message' => $listingSelectedItemsMessage, 'revising_selected_items_message' => $revisingSelectedItemsMessage, 'relisting_selected_items_message' => $relistingSelectedItemsMessage, 'stopping_selected_items_message' => $stoppingSelectedItemsMessage, 'stopping_and_removing_selected_items_message' => $stoppingAndRemovingSelectedItemsMessage, 'deleting_and_removing_selected_items_message' => $deletingAndRemovingSelectedItemsMessage, 'removing_selected_items_message' => $removingSelectedItemsMessage, 'successfully_moved' => $successfullyMovedMessage, 'products_were_not_moved' => $productsWereNotMovedMessage, 'some_products_were_not_moved' => $someProductsWereNotMovedMessage, 'select_items_message' => $selectItemsMessage, 'select_action_message' => $selectActionMessage, 'templateDescriptionPopupTitle' => $templateDescriptionPopupTitle, 'templateShippingOverridePopupTitle' => $templateShippingOverridePopupTitle, 'assign' => $assignString, 'enter_productSearch_query' => $enterProductSearchQueryMessage, 'automap_asin_search_products' => $autoMapAsinSearchProducts, 'automap_asin_progress_title' => $autoMapAsinProgressTitle, 'automap_error_message' => $autoMapAsinErrorMessage, 'new_asin_not_available' => $newAsinNotAvailable, 'not_synchronized_marketplace' => $notSynchronizedMarketplace, 'no_variations_left' => $noVariationsLeftText, 'not_set' => $notSet, 'set_attributes' => $setAttributes, 'variation_manage_matched_attributes_error' => $variationManageMatchedAttributesError, 'variation_manage_matched_attributes_error_duplicate' => $variationManageMatchedAttributesErrorDuplicateSelection, 'error_changing_product_options' => $this->__('Please Select Product Options.'), 'variation_manage_matched_sku_popup_title' => $variationManageSkuPopUpTitle, 'empty_sku_error' => $emptySkuError, 'switch_to_individual_mode_popup_title' => $switchToIndividualModePopUpTitle, 'switch_to_parent_mode_popup_title' => $switchToParentModePopUpTitle, 'Add New Description Policy' => $this->__('Add New Description Policy'), 'Add New Child Product' => $this->__('Add New Child Product')]); $this->js->addOnReadyJs(<<<JS require([ 'M2ePro/Amazon/Listing/View/Grid', 'M2ePro/Amazon/Listing/AfnQty', 'M2ePro/Amazon/Listing/AutoAction', 'M2ePro/Amazon/Listing/Product/Variation' ], function(){ M2ePro.productsIdsForList = '{$productsIdsForList}'; M2ePro.customData.componentMode = '{$component}'; M2ePro.customData.gridId = '{$gridId}'; M2ePro.customData.ignoreListings = '{$ignoreListings}'; M2ePro.customData.marketplace = {$marketplace}; M2ePro.customData.isNewAsinAvailable = {$isNewAsinAvailable}; ListingGridHandlerObj = new AmazonListingViewGrid( '{$gridId}', {$this->listing['id']} ); ListingGridHandlerObj.afterInitPage(); ListingGridHandlerObj.movingHandler.setOptions(M2ePro); ListingGridHandlerObj.actionHandler.setProgressBar('listing_view_progress_bar'); ListingGridHandlerObj.actionHandler.setGridWrapper('listing_view_content_container'); AmazonListingProductVariationObj = new AmazonListingProductVariation(ListingGridHandlerObj); if (M2ePro.productsIdsForList) { ListingGridHandlerObj.getGridMassActionObj().checkedString = M2ePro.productsIdsForList; ListingGridHandlerObj.actionHandler.listAction(); } window.ListingAutoActionObj = new AmazonListingAutoAction(); if ({$showAutoAction}) { ListingAutoActionObj.loadAutoActionHtml(); } AmazonListingAfnQtyObj = new AmazonListingAfnQty(); // TODO // CommonAmazonListingRepricingPriceHandlerObj = new CommonAmazonListingRepricingPriceHandler(); }); JS ); $productSearchBlock = $this->createBlock('Amazon\\Listing\\Product\\Search\\Main'); // TODO NOT SUPPORTED FEATURES "Listing header selector" // // --------------------------------------- // $listingSwitcher = $this->getLayout()->createBlock( // 'M2ePro/adminhtml_common_amazon_listing_view_listingSwitcher' // ); // // --------------------------------------- // --------------------------------------- $viewHeaderBlock = $this->createBlock('Listing\\View\\Header', '', ['data' => ['listing' => $this->listing]]); // --------------------------------------- // // --------------------------------------- // $switchToIndividualPopup = $this->getLayout()->createBlock( // 'M2ePro/adminhtml_common_amazon_listing_variation_product_switchToIndividualPopup'); // // --------------------------------------- // // // --------------------------------------- // $switchToParentPopup = $this->getLayout()->createBlock( // 'M2ePro/adminhtml_common_amazon_listing_variation_product_switchToParentPopup'); // // --------------------------------------- return $viewHeaderBlock->toHtml() . $productSearchBlock->toHtml() . parent::getGridHtml(); }
public function getGridHtml() { $viewHeaderBlock = $this->createBlock('Listing\\View\\Header', '', ['data' => ['listing' => $this->listing]]); $productSearchBlock = $this->createBlock('Amazon\\Listing\\Product\\Search\\Main'); return $viewHeaderBlock->toHtml() . $productSearchBlock->toHtml() . parent::getGridHtml(); }