예제 #1
0
 public function _toHtml()
 {
     $listingData = Mage::registry('M2ePro_data');
     $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listings_products_help');
     $startHtmlDivGrid = '<div id="listingsProductsGrid' . (isset($listingData['id']) ? $listingData['id'] : '') . '">';
     return str_replace($startHtmlDivGrid, $helpBlock->toHtml() . $startHtmlDivGrid, parent::_toHtml());
 }
 /**
  * Don't show if no website is selected
  * @return string
  */
 protected function _toHtml()
 {
     if (!Mage::app()->getRequest()->getParam('website')) {
         return '';
     } else {
         return parent::_toHtml();
     }
 }
예제 #3
0
 public function _toHtml()
 {
     $html = parent::_toHtml();
     $switcher = $this->getLayout()->createBlock('adminhtml/store_switcher');
     $switcher->setDefaultStoreName(Mage::helper('searchindex')->__('Select store'));
     $switcher->setUseConfirm(false)->setSwitchUrl($this->getUrl('*/*/*/', array('store' => null, '_current' => true)));
     $html = $switcher->toHtml() . $html;
     return $html;
 }
예제 #4
0
 public function _toHtml()
 {
     $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_feedbacks_help');
     $filtersBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_accounts_switcher');
     $filtersBlock->setUseConfirm(false);
     $formBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_feedbacks_form');
     $startHtmlDivGrid = '<div id="' . $this->getId() . 'Grid">';
     return str_replace($startHtmlDivGrid, $helpBlock->toHtml() . $filtersBlock->toHtml() . $formBlock->toHtml() . $startHtmlDivGrid, parent::_toHtml());
 }
예제 #5
0
    protected function _toHtml()
    {
        $parentHtml = parent::_toHtml();
        $popupsHtml = $this->getPopupsHtml();
        return <<<HTML
<div id="products_progress_bar"></div>
<div id="products_container">{$parentHtml}</div>
<div style="display: none">{$popupsHtml}</div>
HTML;
    }
예제 #6
0
    public function _toHtml()
    {
        $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listings_items_help');
        $tempDropDownHtml = Mage::helper('M2ePro')->escapeJs($this->getGotoTemplatesDropDownHtml());
        $javascriptsMain = <<<JAVASCRIPT
<script type="text/javascript">

    Event.observe(window, 'load', function() {
        \$\$('.goto_templates_drop_down')[0].innerHTML += '{$tempDropDownHtml}';
        DropDownObj = new DropDown();
        DropDownObj.prepare(\$\$('.goto_templates_drop_down')[0]);
    });

</script>
JAVASCRIPT;
        $startHtmlDivGrid = '<div id="' . $this->getId() . 'Grid">';
        return $javascriptsMain . str_replace($startHtmlDivGrid, $helpBlock->toHtml() . $startHtmlDivGrid, parent::_toHtml());
    }
예제 #7
0
    protected function _toHtml()
    {
        $translations = json_encode(array('Description' => Mage::helper('M2ePro')->__('Description')));
        $javascript = <<<JAVASCIRPT

<script type="text/javascript">

    M2ePro.translator.add({$translations});

    Event.observe(window, 'load', function() {
        LogHandlerObj = new LogHandler();
    });

</script>

JAVASCIRPT;
        return $javascript . parent::_toHtml();
    }
예제 #8
0
    public function _toHtml()
    {
        $orderLogConstants = Mage::helper('M2ePro')->getClassConstantAsJson('Model_Orders_OrderLog');
        $orderViewUrl = $this->getUrl('*/adminhtml_orders/view', array('back' => Mage::helper('M2ePro')->makeBackUrlParam('*/adminhtml_orders/index')));
        $viewAllOrderLogsMessage = Mage::helper('M2ePro')->__('View All Order Logs.');
        $successWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Success'));
        $warningWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Warning'));
        $errorWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Error'));
        $closeWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Close'));
        $javascriptsMain = <<<JAVASCRIPT
<script type="text/javascript">

    if (typeof M2ePro == 'undefined') {
\t\tM2ePro = {};
\t\tM2ePro.url = {};
\t\tM2ePro.formData = {};
\t\tM2ePro.customData = {};
\t\tM2ePro.text = {};
\t}

\tM2ePro.url.orderViewUrl = '{$orderViewUrl}';

\tM2ePro.text.view_all_order_logs_message = '{$viewAllOrderLogsMessage}';

\tM2ePro.text.success_word = '{$successWord}';
\tM2ePro.text.warning_word = '{$warningWord}';
\tM2ePro.text.error_word = '{$errorWord}';
\tM2ePro.text.close_word = '{$closeWord}';

    Event.observe(window, 'load', function() {
        OrdersHandlersObj = new OrdersHandlers('{$this->getId()}Grid');
        OrdersHandlersObj.setConstants('{$orderLogConstants}');
    });

</script>
JAVASCRIPT;
        $filtersBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_accounts_switcher');
        $filtersBlock->setUseConfirm(false);
        $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_orders_help');
        $helpHtml = $helpBlock->toHtml() . $filtersBlock->toHtml();
        $startHtmlDivGrid = '<div id="' . $this->getId() . 'Grid">';
        return str_replace($startHtmlDivGrid, $javascriptsMain . $helpHtml . $startHtmlDivGrid, parent::_toHtml());
    }
예제 #9
0
파일: Table.php 프로젝트: xiaoguizhidao/bb
    protected function _toHtml()
    {
        $gridJsObj = 'developmentTable' . Mage::helper('M2ePro/Data_Global')->getValue('data_model') . 'GridJsObject';
        $javascript = <<<JAVASCRIPT
<script type="text/javascript">

    //-----------------------------

    function deleteTableRow(url)
    {
        if (!confirm('Are you sure?')) {
            return;
        }

        new Ajax.Request(url ,
        {
            method:'get',
            onSuccess: function(transport)
            {
                {$gridJsObj}.reload();
            }
        });
    }

    //-----------------------------

    function mouseOverCell(cell_id)
    {
        if (\$(cell_id + '_save_link').getStyle('display') != 'none') {
            return;
        }

        \$(cell_id + '_edit_link').show();
        \$(cell_id + '_view_link').hide();
        \$(cell_id + '_save_link').hide();
    }

    function mouseOutCell(cell_id)
    {
        if (\$(cell_id + '_save_link').getStyle('display') != 'none') {
            return;
        }

        \$(cell_id + '_edit_link').hide();
        \$(cell_id + '_view_link').hide();
        \$(cell_id + '_save_link').hide();
    }

    //-----------------------------

    function saveCell(cell_id,url)
    {
        new Ajax.Request( url ,
        {
            method: 'post',
            asynchronous : false,
            parameters : {
                value : \$(cell_id + '_edit_input').value
            },
            onSuccess: function(transport)
            {
            console.log({$gridJsObj});
                switchCellToView(cell_id);
                {$gridJsObj}.reload();
            }
        });
    }

    function switchCellToView(cell_id)
    {
        \$(cell_id + '_edit_link').show();
        \$(cell_id + '_view_link').hide();
        \$(cell_id + '_save_link').hide();

        \$(cell_id + '_edit_container').hide();
        \$(cell_id + '_view_container').show();
    }

    function switchCellToEdit(cell_id)
    {
        \$(cell_id + '_edit_link').hide();
        \$(cell_id + '_view_link').show();
        \$(cell_id + '_save_link').show();

        \$(cell_id + '_edit_container').show();
        \$(cell_id + '_view_container').hide();
    }

    //-----------------------------

</script>
JAVASCRIPT;
        return $javascript . parent::_toHtml();
    }
예제 #10
0
 /**
  * Prepare output HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     Mage::dispatchEvent('api_user_html_before', array('block' => $this));
     return parent::_toHtml();
 }
 /**
  * {@inheritdoc}
  */
 protected function _toHtml()
 {
     $this->_headerText = __('Schedule');
     return parent::_toHtml();
 }
예제 #12
0
    public function _toHtml()
    {
        if (!empty($_SESSION['products_ids_for_list'])) {
            $productsIdsForList = $_SESSION['products_ids_for_list'];
            $_SESSION['products_ids_for_list'] = '';
        } else {
            $productsIdsForList = '';
        }
        $listingData = Mage::registry('M2ePro_data');
        $logViewUrl = $this->getUrl('*/adminhtml_logs/listings', array('id' => $listingData['id'], 'back' => Mage::helper('M2ePro')->makeBackUrlParam('*/adminhtml_listings/view', array('id' => $listingData['id']))));
        $checkLockListing = $this->getUrl('*/adminhtml_listings/checkLockListing');
        $lockListingNow = $this->getUrl('*/adminhtml_listings/lockListingNow');
        $unlockListingNow = $this->getUrl('*/adminhtml_listings/unlockListingNow');
        $getErrorsSummary = $this->getUrl('*/adminhtml_listings/getErrorsSummary');
        $runListProducts = $this->getUrl('*/adminhtml_listings/runListProducts');
        $runReviseProducts = $this->getUrl('*/adminhtml_listings/runReviseProducts');
        $runRelistProducts = $this->getUrl('*/adminhtml_listings/runRelistProducts');
        $runStopProducts = $this->getUrl('*/adminhtml_listings/runStopProducts');
        $runStopAndRemoveProducts = $this->getUrl('*/adminhtml_listings/runStopAndRemoveProducts');
        $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listings_view_help');
        $tempDropDownHtml = Mage::helper('M2ePro')->escapeJs($this->getEditTemplateDropDownHtml());
        $taskCompletedMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Task completed. Please wait ...'));
        $taskCompletedSuccessMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('"%title%" task has successfully completed.'));
        $taskCompletedWarningMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('"%title%" task has completed with warnings. <a href="%url%">View log</a> for details.'));
        $taskCompletedErrorMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('"%title%" task has completed with errors. <a href="%url%">View log</a> for details.'));
        $sendingDataToEbayMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Sending %execute% product(s) data on eBay.'));
        $viewAllProductLogMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('View All Product Log.'));
        $listingLockedMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('The listing was locked by another process. Please try again later.'));
        $listingEmptyMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing is empty.'));
        $listingAllItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing All Items On eBay'));
        $listingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing Selected Items On eBay'));
        $revisingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Revising Selected Items On eBay'));
        $relistingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Relisting Selected Items On eBay'));
        $stoppingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Stopping Selected Items On eBay'));
        $stoppingAndRemovingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Stopping And Removing Selected Items On eBay'));
        $selectItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Please select items.'));
        $selectActionMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Please select action.'));
        $successWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Success'));
        $noticeWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Notice'));
        $warningWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Warning'));
        $errorWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Error'));
        $closeWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Close'));
        $javascriptsMain = <<<JAVASCRIPT
<script type="text/javascript">

    if (typeof M2ePro == 'undefined') {
\t\tM2ePro = {};
\t\tM2ePro.url = {};
\t\tM2ePro.formData = {};
\t\tM2ePro.customData = {};
\t\tM2ePro.text = {};
\t}

    M2ePro.productsIdsForList = '{$productsIdsForList}';

\tM2ePro.url.logViewUrl = '{$logViewUrl}';
\tM2ePro.url.checkLockListing = '{$checkLockListing}';
\tM2ePro.url.lockListingNow = '{$lockListingNow}';
\tM2ePro.url.unlockListingNow = '{$unlockListingNow}';
\tM2ePro.url.getErrorsSummary = '{$getErrorsSummary}';

\tM2ePro.url.runListProducts = '{$runListProducts}';
\tM2ePro.url.runReviseProducts = '{$runReviseProducts}';
\tM2ePro.url.runRelistProducts = '{$runRelistProducts}';
\tM2ePro.url.runStopProducts = '{$runStopProducts}';
\tM2ePro.url.runStopAndRemoveProducts = '{$runStopAndRemoveProducts}';

    M2ePro.text.task_completed_message = '{$taskCompletedMessage}';
\tM2ePro.text.task_completed_success_message = '{$taskCompletedSuccessMessage}';
\tM2ePro.text.task_completed_warning_message = '{$taskCompletedWarningMessage}';
\tM2ePro.text.task_completed_error_message = '{$taskCompletedErrorMessage}';

\tM2ePro.text.sending_data_message = '{$sendingDataToEbayMessage}';
\tM2ePro.text.view_all_product_log_message = '{$viewAllProductLogMessage}';

\tM2ePro.text.listing_locked_message = '{$listingLockedMessage}';
\tM2ePro.text.listing_empty_message = '{$listingEmptyMessage}';

\tM2ePro.text.listing_all_items_message = '{$listingAllItemsMessage}';
\tM2ePro.text.listing_selected_items_message = '{$listingSelectedItemsMessage}';
\tM2ePro.text.revising_selected_items_message = '{$revisingSelectedItemsMessage}';
\tM2ePro.text.relisting_selected_items_message = '{$relistingSelectedItemsMessage}';
\tM2ePro.text.stopping_selected_items_message = '{$stoppingSelectedItemsMessage}';
\tM2ePro.text.stopping_and_removing_selected_items_message = '{$stoppingAndRemovingSelectedItemsMessage}';

\tM2ePro.text.select_items_message = '{$selectItemsMessage}';
\tM2ePro.text.select_action_message = '{$selectActionMessage}';

\tM2ePro.text.success_word = '{$successWord}';
\tM2ePro.text.notice_word = '{$noticeWord}';
\tM2ePro.text.warning_word = '{$warningWord}';
\tM2ePro.text.error_word = '{$errorWord}';
\tM2ePro.text.close_word = '{$closeWord}';

    Event.observe(window, 'load', function() {
        EbayItemsGridHandlersObj = new EbayItemsGridHandlers('listingsViewGrid{$listingData['id']}',1,2);
        EbayActionsHandlersObj = new EbayActionsHandlers({$listingData['id']});
        ListingProgressBarObj = new ProgressBar('listing_view_progress_bar');
        GridWrapperObj = new AreaWrapper('listing_view_content_container');

        \$\$('.edit_template_drop_down')[0].innerHTML += '{$tempDropDownHtml}';
        
        DropDownObj = new DropDown();
        DropDownObj.prepare(\$\$('.edit_template_drop_down')[0]);

        if (M2ePro.productsIdsForList) {
            eval(EbayItemsGridHandlersObj.gridId+'_massactionJsObject.checkedString = M2ePro.productsIdsForList;');
            \$\$('select#'+EbayItemsGridHandlersObj.gridId+'_massaction-select option')[1].selected = 'selected';
            EbayItemsGridHandlersObj.massactionSubmitClick(true);
        }
    });

</script>
JAVASCRIPT;
        $startHtmlDivGrid = '<div id="' . $this->getId() . 'Grid' . $listingData['id'] . '">';
        $tempHtml = str_replace($startHtmlDivGrid, $helpBlock->toHtml() . $startHtmlDivGrid, parent::_toHtml());
        return $javascriptsMain . '<div id="listing_view_progress_bar"></div>' . '<div id="listing_view_errors_summary" class="errors_summary" style="display: none;"></div>' . '<div id="listing_view_content_container">' . $tempHtml . '</div>';
    }
예제 #13
0
 protected function _toHtml()
 {
     $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_other_help');
     return $helpBlock->toHtml() . parent::_toHtml();
 }
예제 #14
0
 protected function _toHtml()
 {
     return '<div id="add_products_progress_bar"></div>' . '<div id="add_products_container">' . parent::_toHtml() . '</div>' . $this->getVideoTutorialHtml() . $this->getAutoactionPopupHtml() . $this->getSettingsPopupHtml();
 }
예제 #15
0
 protected function _toHtml()
 {
     return '<div id="add_products_progress_bar"></div>' . '<div id="add_products_container">' . parent::_toHtml() . '</div>';
 }
예제 #16
0
    protected function _toHtml()
    {
        $helper = Mage::helper('M2ePro');
        // TEXT
        $templateDescriptionPopupTitle = $helper->escapeJs($helper->__('Assign Description Policy'));
        $setDescriptionPolicy = $helper->escapeJs($helper->__('Set Description Policy.'));
        // ---------------------------------------
        // URL
        $mapToTemplateDescription = $this->getUrl('*/adminhtml_common_amazon_listing/mapToTemplateDescription');
        $unmapFromTemplateDescription = $this->getUrl('*/adminhtml_common_amazon_listing/unmapFromTemplateDescription');
        $validateProductsForTemplateDescriptionAssign = $this->getUrl('*/adminhtml_common_amazon_listing/validateProductsForTemplateDescriptionAssign');
        $viewTemplateDescriptionsGrid = $this->getUrl('*/*/viewTemplateDescriptionsGrid');
        $mapToNewAsin = $this->getUrl('*/adminhtml_common_amazon_listing/mapToNewAsin');
        $unmapFromNewAsin = $this->getUrl('*/adminhtml_common_amazon_listing/unmapFromAsin');
        $checkNewAsinManualProducts = $this->getUrl('*/*/checkNewAsinManualProducts', array('_current' => true));
        // ---------------------------------------
        $javascript = <<<HTML
<script type="text/javascript">
    selectTemplateDescription = function (el, templateId, mapToGeneralId)
    {
        ListingGridHandlerObj.mapToTemplateDescription(el, templateId, mapToGeneralId);
    };

    if (typeof M2ePro == 'undefined') {
        M2ePro = {};
        M2ePro.url = {};
        M2ePro.formData = {};
        M2ePro.customData = {};
        M2ePro.text = {};
    }

    M2ePro.text.templateDescriptionPopupTitle = '{$templateDescriptionPopupTitle}';
    M2ePro.text.setDescriptionPolicy = '{$setDescriptionPolicy}';

    M2ePro.url.mapToTemplateDescription = '{$mapToTemplateDescription}';
    M2ePro.url.unmapFromTemplateDescription = '{$unmapFromTemplateDescription}';
    M2ePro.url.validateProductsForTemplateDescriptionAssign = '{$validateProductsForTemplateDescriptionAssign}';
    M2ePro.url.viewTemplateDescriptionsGrid = '{$viewTemplateDescriptionsGrid}';

    M2ePro.url.mapToNewAsin = '{$mapToNewAsin}';
    M2ePro.url.unmapFromNewAsin = '{$unmapFromNewAsin}';

    M2ePro.url.checkNewAsinManualProducts = '{$checkNewAsinManualProducts}';

    Event.observe(window, 'load', function() {

        CommonHandler.prototype.scroll_page_to_top = function() { return; }

        ListingGridHandlerObj = new CommonAmazonListingNewAsinTemplateDescriptionGridHandler(
            '{$this->getChild('grid')->getId()}',
            {$this->getListing()->getId()}
        );

        ListingGridHandlerObj.actionHandler.setOptions(M2ePro);
        ListingGridHandlerObj.templateDescriptionHandler.setOptions(M2ePro);
    });

</script>
HTML;
        return $javascript . '<div id="search_asin_products_container">' . parent::_toHtml() . '</div>';
    }
 public function _toHtml()
 {
     $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_logs_synchronizations_help');
     $startHtmlDivGrid = '<div id="' . $this->getId() . 'Grid">';
     return str_replace($startHtmlDivGrid, $helpBlock->toHtml() . $startHtmlDivGrid, parent::_toHtml());
 }
예제 #18
0
 public function _toHtml()
 {
     return $this->getAddButtonJavascript() . parent::_toHtml();
 }
 /**
  * {@inheritdoc}
  */
 protected function _toHtml()
 {
     $this->_headerText = Mage::helper('realtimedespatch')->__($this->getEntityType() . ' Imports');
     $this->getChild('grid')->setOperationType($this->getOperationType())->setEntityType($this->getEntityType())->setReferenceLabel($this->getReferenceLabel());
     return parent::_toHtml();
 }
예제 #20
0
    protected function _toHtml()
    {
        $helper = Mage::helper('M2ePro');
        // --------TEXT------------------
        $createEmptyListingMessage = $helper->escapeJs($helper->__('Are you sure you want to create empty Listing?'));
        $taskCompletedMessage = $helper->escapeJs($helper->__('Task completed. Please wait ...'));
        $taskCompletedSuccessMessage = $helper->escapeJs($helper->__('"%task_title%" Task has successfully submitted to be processed.'));
        $taskCompletedWarningMessage = $helper->escapeJs($helper->__('"%task_title%" Task has completed with warnings. <a target="_blank" href="%url%">View Log</a> for details.'));
        $taskCompletedErrorMessage = $helper->escapeJs($helper->__('"%task_title%" Task has completed with errors. <a target="_blank" href="%url%">View Log</a> for details.'));
        $sendingDataToAmazonMessage = $helper->escapeJs($helper->__('Sending %product_title% Product(s) data on Amazon.'));
        $selectItemsMessage = $helper->escapeJs($helper->__('Please select the Products you want to perform the Action on.'));
        $assignString = Mage::helper('M2ePro')->__('Assign');
        $textConfirm = $helper->escapeJs($helper->__('Are you sure?'));
        $enterProductSearchQueryMessage = $helper->escapeJs($helper->__('Please enter Product Title or ASIN/ISBN/UPC/EAN.'));
        $autoMapAsinSearchProducts = $helper->escapeJs($helper->__('Search %product_title% Product(s) on Amazon.'));
        $autoMapAsinProgressTitle = $helper->escapeJs($helper->__('Automatic Assigning ASIN/ISBN to Item(s)'));
        $autoMapAsinErrorMessage = $helper->escapeJs($helper->__('Server is currently unavailable. Please try again later.'));
        $newAsinNotAvailable = $helper->escapeJs($helper->__('The new ASIN/ISBN creation functionality is not available in %code% Marketplace yet.'));
        $notSynchronizedMarketplace = $helper->escapeJs($helper->__('In order to use New ASIN/ISBN functionality, please re-synchronize Marketplace data.') . ' ' . $helper->__('Press "Save And Update" Button after redirect on Marketplace Page.'));
        $newAsinPopupTitle = $helper->escapeJs($helper->__('New ASIN/ISBN creation'));
        $notCompletedPopupTitle = $helper->escapeJs($helper->__('Adding of New Products to the Listing was not competed'));
        // -------------------------------
        // ---------URL-------------------
        $searchAsinManual = $this->getUrl('*/adminhtml_common_amazon_listing/searchAsinManual');
        $getSearchAsinMenu = $this->getUrl('*/adminhtml_common_amazon_listing/getSearchAsinMenu');
        $suggestedAsinGridHmtl = $this->getUrl('*/adminhtml_common_amazon_listing/getSuggestedAsinGrid');
        $getCategoriesByAsin = $this->getUrl('*/adminhtml_common_amazon_listing/getCategoriesByAsin');
        $searchAsinAuto = $this->getUrl('*/adminhtml_common_amazon_listing/searchAsinAuto');
        $getProductsSearchStatus = $this->getUrl('*/adminhtml_common_amazon_listing/getProductsSearchStatus');
        $mapToAsin = $this->getUrl('*/adminhtml_common_amazon_listing/mapToAsin');
        $unmapFromAsin = $this->getUrl('*/adminhtml_common_amazon_listing/unmapFromAsin');
        $mapToNewAsin = $this->getUrl('*/adminhtml_common_amazon_listing/mapToNewAsin');
        $viewSearchSettings = $this->getUrl('*/adminhtml_common_amazon_listing_productAdd/viewSearchSettings');
        $saveSearchSettings = $this->getUrl('*/adminhtml_common_amazon_listing_productAdd/saveSearchSettings');
        $checkSearchResults = $this->getUrl('*/adminhtml_common_amazon_listing_productAdd/checkSearchResults', array('id' => $this->getListing()->getId()));
        $showNewAsinStep = $this->getUrl('*/adminhtml_common_amazon_listing_productAdd/showNewAsinStep', array('id' => $this->getListing()->getId()));
        $getProductsUrl = $this->getUrl('*/adminhtml_common_' . $this->getData('component') . '_listing/getProductsFromCategories');
        $addProductsUrl = $this->getUrl('*/adminhtml_common_listing_productAdd/addProducts', array('component' => $this->getData('component')));
        $backUrl = $this->getUrl('*/*/index');
        // -------------------------------
        $showNotCompletedPopup = '';
        if ($this->getRequest()->getParam('not_completed', false)) {
            $showNotCompletedPopup = 'ListingGridHandlerObj.showNotCompletedPopup();';
        }
        $javascript = <<<JAVASCRIPT
<script type="text/javascript">
    if (typeof M2ePro == 'undefined') {
        M2ePro = {};
        M2ePro.url = {};
        M2ePro.formData = {};
        M2ePro.customData = {};
        M2ePro.text = {};
    }

    M2ePro.text.select_items_message = '{$selectItemsMessage}';
    M2ePro.text.create_empty_listing_message = '{$createEmptyListingMessage}';

    M2ePro.text.sending_data_message = '{$sendingDataToAmazonMessage}';

    M2ePro.text.new_asin_not_available = '{$newAsinNotAvailable}';
    M2ePro.text.not_synchronized_marketplace = '{$notSynchronizedMarketplace}';

    M2ePro.text.enter_productSearch_query = '{$enterProductSearchQueryMessage}';
    M2ePro.text.automap_asin_search_products = '{$autoMapAsinSearchProducts}';
    M2ePro.text.automap_asin_progress_title = '{$autoMapAsinProgressTitle}';
    M2ePro.text.automap_error_message = '{$autoMapAsinErrorMessage}';

    M2ePro.text.task_completed_message = '{$taskCompletedMessage}';
    M2ePro.text.task_completed_success_message = '{$taskCompletedSuccessMessage}';
    M2ePro.text.task_completed_warning_message = '{$taskCompletedWarningMessage}';
    M2ePro.text.task_completed_error_message = '{$taskCompletedErrorMessage}';

    M2ePro.text.assign = '{$assignString}';
    M2ePro.text.confirm = '{$textConfirm}';

    M2ePro.text.new_asin_popup_title = '{$newAsinPopupTitle}';
    M2ePro.text.not_completed_popup_title = '{$notCompletedPopupTitle}';

    M2ePro.url.get_products_from_categories = '{$getProductsUrl}';
    M2ePro.url.add_products = '{$addProductsUrl}';
    M2ePro.url.back = '{$backUrl}';

    M2ePro.url.searchAsinManual = '{$searchAsinManual}';
    M2ePro.url.getSearchAsinMenu = '{$getSearchAsinMenu}';
    M2ePro.url.searchAsinAuto = '{$searchAsinAuto}';
    M2ePro.url.getProductsSearchStatus = '{$getProductsSearchStatus}';
    M2ePro.url.suggestedAsinGrid = '{$suggestedAsinGridHmtl}';
    M2ePro.url.getCategoriesByAsin = '{$getCategoriesByAsin}';
    M2ePro.url.mapToAsin = '{$mapToAsin}';
    M2ePro.url.unmapFromAsin = '{$unmapFromAsin}';
    M2ePro.url.mapToNewAsin = '{$mapToNewAsin}';

    M2ePro.url.viewSearchSettings = '{$viewSearchSettings}';
    M2ePro.url.saveSearchSettings = '{$saveSearchSettings}';

    M2ePro.url.checkSearchResults = '{$checkSearchResults}';
    M2ePro.url.showNewAsinStep = '{$showNewAsinStep}';

    Event.observe(window, 'load', function() {

        CommonHandler.prototype.scroll_page_to_top = function() { return; }

        ListingGridHandlerObj = new SearchAsinGridHandler(
            '{$this->getChild('grid')->getId()}',
            {$this->getListing()->getId()}
        );

        // todo next (temp solution)
        ListingGridHandlerObj.actionHandler.setOptions(M2ePro);
        ListingGridHandlerObj.productSearchHandler.setOptions(M2ePro);

        ListingProgressBarObj = new ProgressBar('search_asin_progress_bar');
        GridWrapperObj = new AreaWrapper('search_asin_products_container');

        {$showNotCompletedPopup}
    });

</script>
JAVASCRIPT;
        //------------------------------
        $notCompletedPopup = $this->getLayout()->createBlock('M2ePro/adminhtml_common_amazon_listing_add_searchAsin_notCompleted');
        //------------------------------
        return $notCompletedPopup->toHtml() . $javascript . '<div id="search_asin_progress_bar"></div>' . '<div id="search_asin_products_container">' . parent::_toHtml() . '</div>';
    }
예제 #21
0
 /**
  * Prepare output HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     Mage::dispatchEvent('permissions_block_html_before', array('block' => $this));
     return parent::_toHtml();
 }
예제 #22
0
    public function _toHtml()
    {
        // Filter Blocks
        //------------------------------
        $marketplacesIds = Mage::getModel('M2ePro/EbayListings')->getUsingMarketplacesIds();
        $filtersAccountBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_accounts_switcher');
        $filtersAccountBlock->setUseConfirm(false);
        $filtersMarketplaceBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_marketplaces_switcher');
        $filtersMarketplaceBlock->setUseConfirm(false);
        if (!is_null($marketplacesIds)) {
            $filtersMarketplaceBlock->setMarketplacesIds($marketplacesIds);
        }
        $helpBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listings_ebay_help');
        $filterBlock = "<div class='filter_block'>" . $filtersAccountBlock->toHtml() . $filtersMarketplaceBlock->toHtml() . "</div>";
        $startHtmlDivGrid = '<div id="' . $this->getId() . 'Grid">';
        $gridHtml = str_replace($startHtmlDivGrid, $helpBlock->toHtml() . $filterBlock . $startHtmlDivGrid, parent::_toHtml());
        //------------------------------
        // Grid ebay actions
        //------------------------------
        $logViewUrl = $this->getUrl('*/adminhtml_logs/ebayListings', array('back' => Mage::helper('M2ePro')->makeBackUrlParam('*/adminhtml_ebayListings/index')));
        $checkLockListing = $this->getUrl('*/adminhtml_ebayListings/checkLockListing');
        $lockListingNow = $this->getUrl('*/adminhtml_ebayListings/lockListingNow');
        $unlockListingNow = $this->getUrl('*/adminhtml_ebayListings/unlockListingNow');
        $getErrorsSummary = $this->getUrl('*/adminhtml_ebayListings/getErrorsSummary');
        $runListProducts = $this->getUrl('*/adminhtml_ebayListings/runListProducts');
        $runReviseProducts = $this->getUrl('*/adminhtml_ebayListings/runReviseProducts');
        $runRelistProducts = $this->getUrl('*/adminhtml_ebayListings/runRelistProducts');
        $runStopProducts = $this->getUrl('*/adminhtml_ebayListings/runStopProducts');
        $runStopAndRemoveProducts = $this->getUrl('*/adminhtml_ebayListings/runStopAndRemoveProducts');
        $taskCompletedMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Task completed. Please wait ...'));
        $taskCompletedSuccessMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('"%title%" task has successfully completed.'));
        $taskCompletedWarningMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('"%title%" task has completed with warnings. <a href="%url%">View log</a> for details.'));
        $taskCompletedErrorMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('"%title%" task has completed with errors. <a href="%url%">View log</a> for details.'));
        $sendingDataToEbayMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Sending %execute% product(s) data on eBay.'));
        $viewAllProductLogMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('View All Product Log.'));
        $listingLockedMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('The listing was locked by another process. Please try again later.'));
        $listingEmptyMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing is empty.'));
        $listingAllItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing All Items On eBay'));
        $listingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing Selected Items On eBay'));
        $revisingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Revising Selected Items On eBay'));
        $relistingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Relisting Selected Items On eBay'));
        $stoppingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Stopping Selected Items On eBay'));
        $stoppingAndRemovingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Stopping And Removing Selected Items On eBay'));
        $selectItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Please select items.'));
        $selectActionMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Please select action.'));
        $successWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Success'));
        $noticeWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Notice'));
        $warningWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Warning'));
        $errorWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Error'));
        $closeWord = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Close'));
        $javascriptsMain = <<<JAVASCRIPT
<script type="text/javascript">

    if (typeof M2ePro == 'undefined') {
\t\tM2ePro = {};
\t\tM2ePro.url = {};
\t\tM2ePro.formData = {};
\t\tM2ePro.customData = {};
\t\tM2ePro.text = {};
\t}

\tM2ePro.url.logViewUrl = '{$logViewUrl}';
\tM2ePro.url.checkLockListing = '{$checkLockListing}';
\tM2ePro.url.lockListingNow = '{$lockListingNow}';
\tM2ePro.url.unlockListingNow = '{$unlockListingNow}';
\tM2ePro.url.getErrorsSummary = '{$getErrorsSummary}';

\tM2ePro.url.runListProducts = '{$runListProducts}';
\tM2ePro.url.runReviseProducts = '{$runReviseProducts}';
\tM2ePro.url.runRelistProducts = '{$runRelistProducts}';
\tM2ePro.url.runStopProducts = '{$runStopProducts}';
\tM2ePro.url.runStopAndRemoveProducts = '{$runStopAndRemoveProducts}';

\tM2ePro.text.task_completed_message = '{$taskCompletedMessage}';
\tM2ePro.text.task_completed_success_message = '{$taskCompletedSuccessMessage}';
\tM2ePro.text.task_completed_warning_message = '{$taskCompletedWarningMessage}';
\tM2ePro.text.task_completed_error_message = '{$taskCompletedErrorMessage}';

\tM2ePro.text.sending_data_message = '{$sendingDataToEbayMessage}';
\tM2ePro.text.view_all_product_log_message = '{$viewAllProductLogMessage}';

\tM2ePro.text.listing_locked_message = '{$listingLockedMessage}';
\tM2ePro.text.listing_empty_message = '{$listingEmptyMessage}';

\tM2ePro.text.listing_all_items_message = '{$listingAllItemsMessage}';
\tM2ePro.text.listing_selected_items_message = '{$listingSelectedItemsMessage}';
\tM2ePro.text.revising_selected_items_message = '{$revisingSelectedItemsMessage}';
\tM2ePro.text.relisting_selected_items_message = '{$relistingSelectedItemsMessage}';
\tM2ePro.text.stopping_selected_items_message = '{$stoppingSelectedItemsMessage}';
\tM2ePro.text.stopping_and_removing_selected_items_message = '{$stoppingAndRemovingSelectedItemsMessage}';

\tM2ePro.text.select_items_message = '{$selectItemsMessage}';
\tM2ePro.text.select_action_message = '{$selectActionMessage}';

\tM2ePro.text.success_word = '{$successWord}';
\tM2ePro.text.notice_word = '{$noticeWord}';
\tM2ePro.text.warning_word = '{$warningWord}';
\tM2ePro.text.error_word = '{$errorWord}';
\tM2ePro.text.close_word = '{$closeWord}';

    Event.observe(window, 'load', function() {
        EbayItemsGridHandlersObj = new EbayItemsGridHandlers('listingsEbayGrid',2,1);
        EbayActionsHandlersObj = new EbayActionsHandlers('listingsEbay');
        ListingProgressBarObj = new ProgressBar('listing_view_progress_bar');
        GridWrapperObj = new AreaWrapper('listing_view_content_container');
    });

</script>
JAVASCRIPT;
        //------------------------------
        return $javascriptsMain . '<div id="listing_view_progress_bar"></div>' . '<div id="listing_view_errors_summary" class="errors_summary" style="display: none;"></div>' . '<div id="listing_view_content_container">' . $gridHtml . '</div>';
    }
예제 #23
0
파일: Search.php 프로젝트: ppkowalski/M2E
 protected function _toHtml()
 {
     return $this->getTemplatesButtonJavascript() . parent::_toHtml();
 }
예제 #24
0
 protected function _toHtml()
 {
     return $this->getLayout()->createBlock('xtento_orderexport/adminhtml_widget_menu')->toHtml() . parent::_toHtml();
 }
예제 #25
0
    public function _toHtml()
    {
        $javascript = <<<JAVASCRIPT
<script type="text/javascript">

    //-----------------------------

    function deleteDbTableRow(url)
    {
        if (!confirm('Are you sure?')) {
            return;
        }

        new Ajax.Request( url ,
        {
            method:'get',
            onSuccess: function(transport)
            {
                aboutManageDbTableGridJsObject.reload();
            }
        });
    }

    //-----------------------------

    function mouseOverCell(cell_id)
    {
        if (\$(cell_id + '_save_link').getStyle('display') != 'none') {
            return;
        }

        \$(cell_id + '_edit_link').show();
        \$(cell_id + '_view_link').hide();
        \$(cell_id + '_save_link').hide();
    }

    function mouseOutCell(cell_id)
    {
        if (\$(cell_id + '_save_link').getStyle('display') != 'none') {
            return;
        }

        \$(cell_id + '_edit_link').hide();
        \$(cell_id + '_view_link').hide();
        \$(cell_id + '_save_link').hide();
    }

    //-----------------------------

    function saveCell(cell_id,url)
    {
        new Ajax.Request( url ,
        {
            method: 'post',
            asynchronous : false,
            parameters : {
                value : \$(cell_id + '_edit_input').value
            },
            onSuccess: function(transport)
            {
                switchCellToView(cell_id);
                aboutManageDbTableGridJsObject.reload();
            }
        });
    }

    function switchCellToView(cell_id)
    {
        \$(cell_id + '_edit_link').show();
        \$(cell_id + '_view_link').hide();
        \$(cell_id + '_save_link').hide();

        \$(cell_id + '_edit_container').hide();
        \$(cell_id + '_view_container').show();
    }

    function switchCellToEdit(cell_id)
    {
        \$(cell_id + '_edit_link').hide();
        \$(cell_id + '_view_link').show();
        \$(cell_id + '_save_link').show();

        \$(cell_id + '_edit_container').show();
        \$(cell_id + '_view_container').hide();
    }

    //-----------------------------

</script>
JAVASCRIPT;
        return $javascript . parent::_toHtml();
    }
예제 #26
0
    protected function _toHtml()
    {
        /** @var $helper Ess_M2ePro_Helper_Data */
        $helper = Mage::helper('M2ePro');
        $componentMode = Ess_M2ePro_Helper_Component_Buy::NICK;
        $logViewUrl = $this->getUrl('*/adminhtml_common_log/listingOther', array('filter' => base64_encode('component_mode=' . Ess_M2ePro_Helper_Component_Buy::NICK), 'back' => $helper->makeBackUrlParam('*/adminhtml_common_listing_other/index/tab/' . $componentMode)));
        $prepareData = $this->getUrl('*/adminhtml_listing_other_moving/prepareMoveToListing');
        $createDefaultListingUrl = $this->getUrl('*/adminhtml_listing_other_moving/createDefaultListing');
        $getMoveToListingGridHtml = $this->getUrl('*/adminhtml_listing_other_moving/moveToListingGrid');
        $getFailedProductsGridHtml = $this->getUrl('*/adminhtml_listing_other_moving/getFailedProductsGrid');
        $tryToMoveToListing = $this->getUrl('*/adminhtml_listing_other_moving/tryToMoveToListing');
        $moveToListing = $this->getUrl('*/adminhtml_listing_other_moving/moveToListing');
        $mapAutoToProductUrl = $this->getUrl('*/adminhtml_listing_other_mapping/autoMap');
        $removingProductsUrl = $this->getUrl('*/adminhtml_common_listing_other/removing');
        $unmappingProductsUrl = $this->getUrl('*/adminhtml_listing_other_mapping/unmapping');
        $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 = $helper->escapeJs($helper->__($someProductsWereNotMappedMessage));
        $successfullyMappedMessage = $helper->escapeJs($helper->__('Product was successfully Mapped.'));
        $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'));
        $popupTitleSingle = $helper->escapeJs($helper->__('Moving Rakuten.com Item'));
        $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 target="_blank" href="%url%">View Log</a> for details.'));
        $someProductsWereNotMovedMessage = $helper->escapeJs($helper->__('Some of the Products were not Moved. <a target="_blank" href="%url%">View Log</a> for details.'));
        $notEnoughDataMessage = $helper->escapeJs($helper->__('Not enough data.'));
        $successfullyUnmappedMessage = $helper->escapeJs($helper->__('Product(s) was successfully Unmapped.'));
        $successfullyRemovedMessage = $helper->escapeJs($helper->__('Product(s) was successfully Removed.'));
        $viewAllProductLogMessage = $helper->escapeJs($helper->__('View All Product Log.'));
        $selectItemsMessage = $helper->escapeJs($helper->__('Please select the Products you want to perform the Action on.'));
        $selectActionMessage = $helper->escapeJs($helper->__('Please select Action.'));
        $processingDataMessage = $helper->escapeJs($helper->__('Processing %product_title% Product(s).'));
        $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'));
        $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.'));
        $translations = json_encode(array('Mapping Product' => $helper->__('Mapping Product'), 'Product does not exist.' => $helper->__('Product does not exist.'), 'Please enter correct Product ID.' => $helper->__('Please enter correct Product ID.'), 'Product(s) was successfully Mapped.' => $helper->__('Product(s) was successfully Mapped.'), 'Please enter correct Product ID or SKU' => $helper->__('Please enter correct Product ID or SKU'), 'Current version only supports Simple Products. Please, choose Simple Product.' => $helper->__('Current version only supports Simple Products. Please, choose Simple Product.'), 'Item was not Mapped as the chosen %product_id% Simple Product has Custom Options.' => $helper->__('Item was not Mapped as the chosen %product_id% Simple Product has Custom Options.')));
        $urls = json_encode(array('adminhtml_common_log/listingOther' => $this->getUrl('*/adminhtml_common_log/listingOther', array('back' => $helper->makeBackUrlParam('*/adminhtml_common_listing_other/index'))), 'adminhtml_listing_other_mapping/map' => $this->getUrl('*/adminhtml_listing_other_mapping/map')));
        $javascriptsMain = <<<JAVASCRIPT
<script type="text/javascript">

    M2eProBuy = {};
    M2eProBuy.url = {};
    M2eProBuy.formData = {};
    M2eProBuy.customData = {};
    M2eProBuy.text = {};

    M2ePro.url.add({$urls});
    M2ePro.translator.add({$translations});

    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.mapAutoToProduct = '{$mapAutoToProductUrl}';
    M2eProBuy.url.removingProducts = '{$removingProductsUrl}';
    M2eProBuy.url.unmappingProducts = '{$unmappingProductsUrl}';

    M2eProBuy.text.create_listing = '{$createListing}';
    M2eProBuy.text.popup_title = '{$popupTitle}';
    M2eProBuy.text.popup_title_single = '{$popupTitleSingle}';
    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.not_enough_data = '{$notEnoughDataMessage}';
    M2eProBuy.text.successfully_unmapped = '{$successfullyUnmappedMessage}';
    M2eProBuy.text.successfully_removed = '{$successfullyRemovedMessage}';

    M2eProBuy.text.select_items_message = '{$selectItemsMessage}';
    M2eProBuy.text.select_action_message = '{$selectActionMessage}';

    M2eProBuy.text.automap_progress_title = '{$autoMapProgressTitle}';
    M2eProBuy.text.processing_data_message = '{$processingDataMessage}';
    M2eProBuy.text.successfully_mapped = '{$successfullyMappedMessage}';
    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';

    Event.observe(window,'load',function() {
        ListingProgressBarObj = new ProgressBar('listing_other_progress_bar');
        GridWrapperObj = new AreaWrapper('listing_other_content_container');

        BuyListingOtherGridHandlerObj    = new BuyListingOtherGridHandler('buyListingOtherGrid');
        BuyListingOtherMappingHandlerObj = new ListingOtherMappingHandler(
            BuyListingOtherGridHandlerObj,
            'buy'
        );

        // todo next (temp solution)
        BuyListingOtherGridHandlerObj.movingHandler.setOptions(M2eProBuy);
        BuyListingOtherGridHandlerObj.autoMappingHandler.setOptions(M2eProBuy);
        BuyListingOtherGridHandlerObj.removingHandler.setOptions(M2eProBuy);
        BuyListingOtherGridHandlerObj.unmappingHandler.setOptions(M2eProBuy);
    });

</script>
JAVASCRIPT;
        return $javascriptsMain . '<div id="listing_other_progress_bar"></div>' . '<div id="listing_container_errors_summary" class="errors_summary" style="display: none;"></div>' . '<div id="listing_other_content_container">' . parent::_toHtml() . '</div>';
    }
예제 #27
0
 protected function _toHtml()
 {
     return '<div id="listing_view_progress_bar"></div>' . '<div id="listing_container_errors_summary" class="errors_summary" style="display: none;"></div>' . '<div id="listing_view_content_container">' . parent::_toHtml() . '</div>';
 }
예제 #28
0
    protected function _toHtml()
    {
        /** @var $helper Ess_M2ePro_Helper_Data */
        $helper = Mage::helper('M2ePro');
        $urls = $helper->getControllerActions('adminhtml_listing_other');
        $urls['adminhtml_ebay_log/listingOther'] = $this->getUrl('*/adminhtml_ebay_log/listingOther');
        $urls['adminhtml_listing_other_mapping/map'] = $this->getUrl('*/adminhtml_listing_other_mapping/map');
        $urls = json_encode($urls);
        $translations = json_encode(array('Mapping Product' => $helper->__('Mapping Product'), 'Product does not exist.' => $helper->__('Product does not exist.'), 'Please enter correct product ID.' => $helper->__('Please enter correct product ID.'), 'Product(s) was successfully mapped.' => $helper->__('Product(s) was successfully mapped.'), 'Please enter correct product ID or SKU' => $helper->__('Please enter correct product ID or SKU')));
        // todo next (change)
        $component = Ess_M2ePro_Helper_Component_Ebay::NICK;
        $logViewUrl = $this->getUrl('*/adminhtml_ebay_log/listingOther', array('back' => $helper->makeBackUrlParam('*/adminhtml_listing_other/index')));
        $mapAutoToProductUrl = $this->getUrl('*/adminhtml_listing_other_mapping/autoMap');
        $removingProductsUrl = $this->getUrl('*/adminhtml_ebay_listing_other/removing');
        $unmappingProductsUrl = $this->getUrl('*/adminhtml_listing_other_mapping/unmapping');
        $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 = $helper->escapeJs($helper->__($someProductsWereNotMappedMessage));
        $prepareData = $this->getUrl('*/adminhtml_listing_other_moving/prepareMoveToListing');
        $getMoveToListingGridHtml = $this->getUrl('*/adminhtml_ebay_listing_other_moving/moveToListingGrid');
        $getFailedProductsGridHtml = $this->getUrl('*/adminhtml_listing_other_moving/getFailedProductsGrid');
        $tryToMoveToListing = $this->getUrl('*/adminhtml_listing_other_moving/tryToMoveToListing');
        $moveToListing = $this->getUrl('*/adminhtml_listing_other_moving/moveToListing');
        $popupTitle = $helper->escapeJs($helper->__('Moving eBay Items.'));
        $failedProductsPopupTitle = $helper->escapeJs($helper->__('Products failed to move'));
        $successfullyMovedMessage = $helper->escapeJs($helper->__('Product(s) was successfully moved.'));
        $productsWereNotMovedMessage = $helper->escapeJs($helper->__('Products were not moved. <a target="_blank" href="%url%">View log</a> for details.', $logViewUrl));
        $someProductsWereNotMovedMessage = $helper->escapeJs($helper->__('Some of the products were not moved. <a target="_blank" href="%url%">View log</a> for details.', $logViewUrl));
        $successfullyMappedMessage = $helper->escapeJs($helper->__('Product was successfully mapped.'));
        $mappingProductMessage = $helper->escapeJs($helper->__('Mapping Product'));
        $productDoesNotExistMessage = $helper->escapeJs($helper->__('Product does not exist.'));
        $notEnoughDataMessage = $helper->escapeJs($helper->__('Not enough data.'));
        $successfullyUnmappedMessage = $helper->escapeJs($helper->__('Product(s) was successfully unmapped.'));
        $successfullyRemovedMessage = $helper->escapeJs($helper->__('Product(s) was successfully removed.'));
        // M2ePro_TRANSLATIONS
        // Current eBay version only supports simple products in mapping. Please, choose simple product.
        $temp = 'Current eBay version only supports simple products in mapping. Please, choose simple product.';
        $selectSimpleProductMessage = $helper->escapeJs($helper->__($temp));
        $processingDataMessage = $helper->escapeJs($helper->__('Processing %product_title% product(s).'));
        $checkLockListing = $this->getUrl('*/adminhtml_listing_other/checkLockListing', array('component' => $component));
        $lockListingNow = $this->getUrl('*/adminhtml_listing_other/lockListingNow', array('component' => $component));
        $unlockListingNow = $this->getUrl('*/adminhtml_listing_other/unlockListingNow', array('component' => $component));
        $getErrorsSummary = $this->getUrl('*/adminhtml_listing_other/getErrorsSummary');
        $runReviseProducts = $this->getUrl('*/adminhtml_ebay_listing_other/runReviseProducts');
        $runRelistProducts = $this->getUrl('*/adminhtml_ebay_listing_other/runRelistProducts');
        $runStopProducts = $this->getUrl('*/adminhtml_ebay_listing_other/runStopProducts');
        $taskCompletedMessage = $helper->escapeJs($helper->__('Task completed. Please wait ...'));
        $taskCompletedSuccessMessage = $helper->escapeJs($helper->__('"%task_title%" task has successfully completed.'));
        // M2ePro_TRANSLATIONS
        // "%task_title%" task has completed with warnings. <a target="_blank" href="%url%">View log</a> for details.
        $temp = '"%task_title%" task has completed with warnings. ';
        $temp .= '<a target="_blank" href="%url%">View log</a> for details.';
        $taskCompletedWarningMessage = $helper->escapeJs($helper->__($temp));
        // M2ePro_TRANSLATIONS
        // "%task_title%" task has completed with errors. <a target="_blank" href="%url%">View log</a> for details.
        $temp = '"%task_title%" task has completed with errors. ';
        $temp .= '<a target="_blank" href="%url%">View log</a> for details.';
        $taskCompletedErrorMessage = $helper->escapeJs($helper->__($temp));
        $sendingDataToEbayMessage = $helper->escapeJs($helper->__('Sending %product_title% product(s) data on eBay.'));
        $viewAllProductLogMessage = $helper->escapeJs($helper->__('View All Product Log.'));
        $listingLockedMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('The listing was locked by another process. Please try again later.'));
        $listingEmptyMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing is empty.'));
        $listingAllItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing All Items On eBay'));
        $listingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Listing Selected Items On eBay'));
        $revisingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Revising Selected Items On eBay'));
        $relistingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Relisting Selected Items On eBay'));
        $stoppingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Stopping Selected Items On eBay'));
        $stoppingAndRemovingSelectedItemsMessage = Mage::helper('M2ePro')->escapeJs(Mage::helper('M2ePro')->__('Stopping On eBay And Removing From Listing Selected Items'));
        $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.'));
        $selectItemsMessage = $helper->escapeJs($helper->__('Please select the products you want to perform the action on.'));
        $selectActionMessage = $helper->escapeJs($helper->__('Please select action.'));
        $javascript = <<<JAVASCRIPT
<script type="text/javascript">

    M2ePro.url.add({$urls});
    M2ePro.translator.add({$translations});

    // todo next (change)

    M2eProEbay = {};
    M2eProEbay.url = {};
    M2eProEbay.formData = {};
    M2eProEbay.customData = {};
    M2eProEbay.text = {};

    M2eProEbay.url.logViewUrl = '{$logViewUrl}';
    M2eProEbay.url.checkLockListing = '{$checkLockListing}';
    M2eProEbay.url.lockListingNow = '{$lockListingNow}';
    M2eProEbay.url.unlockListingNow = '{$unlockListingNow}';
    M2eProEbay.url.getErrorsSummary = '{$getErrorsSummary}';

    M2eProEbay.url.runReviseProducts = '{$runReviseProducts}';
    M2eProEbay.url.runRelistProducts = '{$runRelistProducts}';
    M2eProEbay.url.runStopProducts = '{$runStopProducts}';

    M2eProEbay.url.mapAutoToProduct = '{$mapAutoToProductUrl}';
    M2eProEbay.text.failed_mapped = '{$someProductsWereNotMappedMessage}';

    M2eProEbay.url.prepareData = '{$prepareData}';
    M2eProEbay.url.getGridHtml = '{$getMoveToListingGridHtml}';
    M2eProEbay.url.getFailedProductsGridHtml = '{$getFailedProductsGridHtml}';
    M2eProEbay.url.tryToMoveToListing = '{$tryToMoveToListing}';
    M2eProEbay.url.moveToListing = '{$moveToListing}';

    M2eProEbay.url.removingProducts = '{$removingProductsUrl}';
    M2eProEbay.url.unmappingProducts = '{$unmappingProductsUrl}';

    M2eProEbay.text.successfully_mapped = '{$successfullyMappedMessage}';
    M2eProEbay.text.mapping_product_title = '{$mappingProductMessage}';
    M2eProEbay.text.product_does_not_exist = '{$productDoesNotExistMessage}';
    M2eProEbay.text.select_simple_product = '{$selectSimpleProductMessage}';
    M2eProEbay.text.invalid_data = '{$invalidDataMessage}';
    M2eProEbay.text.enter_product_or_sku = '{$enterProductOrSkuMessage}';
    M2eProEbay.text.automap_progress_title = '{$autoMapProgressTitle}';
    M2eProEbay.text.processing_data_message = '{$processingDataMessage}';

    M2eProEbay.text.popup_title = '{$popupTitle}';
    M2eProEbay.text.failed_products_popup_title = '{$failedProductsPopupTitle}';
    M2eProEbay.text.successfully_moved = '{$successfullyMovedMessage}';
    M2eProEbay.text.products_were_not_moved = '{$productsWereNotMovedMessage}';
    M2eProEbay.text.some_products_were_not_moved = '{$someProductsWereNotMovedMessage}';
    M2eProEbay.text.not_enough_data = '{$notEnoughDataMessage}';
    M2eProEbay.text.successfully_unmapped = '{$successfullyUnmappedMessage}';
    M2eProEbay.text.successfully_removed = '{$successfullyRemovedMessage}';

    M2eProEbay.text.task_completed_message = '{$taskCompletedMessage}';
    M2eProEbay.text.task_completed_success_message = '{$taskCompletedSuccessMessage}';
    M2eProEbay.text.task_completed_warning_message = '{$taskCompletedWarningMessage}';
    M2eProEbay.text.task_completed_error_message = '{$taskCompletedErrorMessage}';

    M2eProEbay.text.sending_data_message = '{$sendingDataToEbayMessage}';
    M2eProEbay.text.view_all_product_log_message = '{$viewAllProductLogMessage}';

    M2eProEbay.text.listing_locked_message = '{$listingLockedMessage}';
    M2eProEbay.text.listing_empty_message = '{$listingEmptyMessage}';

    M2eProEbay.text.listing_all_items_message = '{$listingAllItemsMessage}';
    M2eProEbay.text.listing_selected_items_message = '{$listingSelectedItemsMessage}';
    M2eProEbay.text.revising_selected_items_message = '{$revisingSelectedItemsMessage}';
    M2eProEbay.text.relisting_selected_items_message = '{$relistingSelectedItemsMessage}';
    M2eProEbay.text.stopping_selected_items_message = '{$stoppingSelectedItemsMessage}';
    M2eProEbay.text.stopping_and_removing_selected_items_message = '{$stoppingAndRemovingSelectedItemsMessage}';

    M2eProEbay.text.select_items_message = '{$selectItemsMessage}';
    M2eProEbay.text.select_action_message = '{$selectActionMessage}';

    M2eProEbay.text.select_only_mapped_products = '{$selectOnlyMapped}';
    M2eProEbay.text.select_the_same_type_products = '{$selectTheSameTypeProducts}';

    M2eProEbay.customData.componentMode = '{$component}';
    M2eProEbay.customData.gridId = 'ebayListingOtherGrid';

    //

    Event.observe(window,'load',function() {

        ListingProgressBarObj = new ProgressBar('listing_other_progress_bar');
        GridWrapperObj = new AreaWrapper('listing_other_content_container');

        EbayListingOtherGridHandlerObj = new EbayListingOtherGridHandler('ebayListingOtherViewGrid');
        EbayListingOtherMappingHandlerObj = new ListingOtherMappingHandler(EbayListingOtherGridHandlerObj,'ebay');

        EbayListingOtherGridHandlerObj.movingHandler.setOptions(M2eProEbay);
        EbayListingOtherGridHandlerObj.actionHandler.setOptions(M2eProEbay);
        EbayListingOtherGridHandlerObj.autoMappingHandler.setOptions(M2eProEbay);
        EbayListingOtherGridHandlerObj.removingHandler.setOptions(M2eProEbay);
        EbayListingOtherGridHandlerObj.unmappingHandler.setOptions(M2eProEbay);

    });

</script>
JAVASCRIPT;
        $mapToProductBlock = $this->getLayout()->createBlock('M2ePro/adminhtml_listing_other_mapping');
        return $javascript . $mapToProductBlock->toHtml() . '<div id="listing_other_progress_bar"></div>' . '<div id="listing_container_errors_summary" class="errors_summary" style="display: none;"></div>' . '<div id="listing_other_content_container">' . parent::_toHtml() . '</div>';
    }
예제 #29
0
 protected function _toHtml()
 {
     return $this->getAdditionalActionsButtonHtml() . parent::_toHtml();
 }
예제 #30
0
 /**
  * Prepare html output
  *
  * @return string
  */
 public function _toHtml()
 {
     return parent::_toHtml() . $this->getVersionHtml();
 }