Пример #1
0
 protected function _toHtml()
 {
     if (is_null($this->getPageHelpLink())) {
         return '';
     }
     return parent::_toHtml();
 }
Пример #2
0
    protected function _toHtml()
    {
        $this->addData(array('current_view_mode' => $this->getCurrentViewMode(), 'route' => '*/*/view', 'items' => $this->getMenuItems()));
        $modeChangeLabel = $this->__('View Mode');
        $parentHtml = parent::_toHtml();
        $this->js->add(<<<JS
        
    require([
        'jquery',
        'prototype'
    ],function(jQuery) {
    
        var listingViewModeSwitcher = function() {
            var url = '{$this->getSwitchUrl()}';
            url = url.replace('%view_mode%', this.value);
            setLocation(url);
        };
    
        \$('listing_view_mode_switcher').observe('change', listingViewModeSwitcher);
    });
    
JS
);
        return <<<HTML
<div id="listing_view_mode_switcher_container" 
     style="padding: 5px; position: absolute; left: 130px;">
    <b>{$modeChangeLabel} </b>{$parentHtml}
</div>
HTML;
    }
Пример #3
0
    protected function _toHtml()
    {
        $text = $this->__(<<<HTML
            <p>M2E Pro is developed to work based on standard Magento functionality.
            One of the main aspects of its work is a dynamic event detection of the Product Data
            changes - Price, Quantity, Images, Attributes, etc.</p><br>
            <p>However, if Product Data is changed via Magmi Import Tool, M2E Pro will not catch all of the changes.
            It is related to the fact that Magmi Import Tool (along with many other similar tools) makes 
            changes directly in Magento Database without any Core Magento Functions involved. Inability to track 
            the events of Product Data change leads to inability to deliver these changes to the channels 
            (eBay, Amazon, etc.).</p><br>
            <p>M2E Pro Developers created a solution for such case - Plugin for Magmi Import Tool. 
            Once it is installed into the Magmi Import Tool, it allows identifying which Products were changed 
            and updating these changes on the channels.</p><br>
            <p><strong>Note:</strong> It is strongly recommended to install M2E Pro Plugin for Magmi Import Tool
            to prevent data re-synchronization between eBay/Amazon and Magento values.</p>
            <p>More detailed information about the Plugin, i.e. how to install, update and use it, you can find
            <a href="%url1%" target="_blank">here</a></p><br>
            <p>Please, remember that, along with the Plugin for Magmi Import Tool, the predefined
            <strong>M2E Pro Models</strong> could be used by developers to modify the code in case the 
            Product Changes are implemented directly into the Magento Database via an external script/tool. 
            More detailed information can be found <a href="%url2%" target="_blank">here</a></p>
            
HTML
, $this->getHelper('Module\\Support')->getDocumentationUrl(NULL, NULL, 'x/yIQVAQ'), $this->getHelper('Module\\Support')->getDocumentationUrl(NULL, NULL, 'x/xYQVAQ'));
        return "<div id='text-block'><div>{$text}</div></div>" . parent::_toHtml();
    }
Пример #4
0
 public function _construct()
 {
     parent::_construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('amazonTemplateDescriptionCategoryChooserSearch');
     // ---------------------------------------
 }
Пример #5
0
    protected function _toHtml()
    {
        // ---------------------------------------
        $urls = array();
        // initiate account param
        // ---------------------------------------
        $account = $this->getHelper('Data\\GlobalData')->getValue('ebay_account');
        $params['account_id'] = $account->getId();
        // ---------------------------------------
        // initiate marketplace param
        // ---------------------------------------
        $marketplace = $this->getHelper('Data\\GlobalData')->getValue('ebay_marketplace');
        $params['marketplace_id'] = $marketplace->getId();
        // ---------------------------------------
        // initiate attribute sets param
        // ---------------------------------------
        $attributeSets = $this->getHelper('Data\\GlobalData')->getValue('ebay_attribute_sets');
        $params['attribute_sets'] = implode(',', $attributeSets);
        // ---------------------------------------
        // initiate display use default option param
        // ---------------------------------------
        $displayUseDefaultOption = $this->getHelper('Data\\GlobalData')->getValue('ebay_display_use_default_option');
        $params['display_use_default_option'] = (int) (bool) $displayUseDefaultOption;
        // ---------------------------------------
        $path = 'ebay_template/getTemplateHtml';
        $urls[$path] = $this->getUrl('*/' . $path, $params);
        //------------------------------
        //------------------------------
        $path = 'ebay_template/isTitleUnique';
        $urls[$path] = $this->getUrl('*/' . $path);
        $path = 'ebay_template/newTemplateHtml';
        $urls[$path] = $this->getUrl('*/' . $path);
        $path = 'ebay_template/edit';
        $urls[$path] = $this->getUrl('*/ebay_template/edit', array('wizard' => (bool) $this->getRequest()->getParam('wizard', false)));
        //------------------------------
        $this->jsUrl->addUrls($urls);
        $this->jsUrl->add($this->getUrl('*/template/checkMessages', array('component_mode' => \Ess\M2ePro\Helper\Component\Ebay::NICK)), 'templateCheckMessages');
        $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Model\\Ebay\\Template\\Manager'));
        $this->jsTranslator->addTranslations(['Customized' => $this->__('Customized'), 'Policies' => $this->__('Policies'), 'Policy with the same Title already exists.' => $this->__('Policy with the same Title already exists.'), 'Please specify Policy Title' => $this->__('Please specify Policy Title'), 'Save New Policy' => $this->__('Save New Policy'), 'Save as New Policy' => $this->__('Save as New Policy')]);
        $store = $this->getHelper('Data\\GlobalData')->getValue('ebay_store');
        $marketplace = $this->getHelper('Data\\GlobalData')->getValue('ebay_marketplace');
        $this->js->add(<<<JS
    define('Switcher/Initialization',[
        'M2ePro/Ebay/Listing/Template/Switcher',
        'M2ePro/TemplateHandler'
    ], function(){
        window.TemplateHandlerObj = new TemplateHandler();
    
        window.EbayListingTemplateSwitcherObj = new EbayListingTemplateSwitcher();
        EbayListingTemplateSwitcherObj.storeId = {$store->getId()};
        EbayListingTemplateSwitcherObj.marketplaceId = {$marketplace->getId()};
        EbayListingTemplateSwitcherObj.listingProductIds = '{$this->getRequest()->getParam('ids')}';
        
    });        
JS
);
        return parent::_toHtml();
    }
Пример #6
0
 public function _construct()
 {
     parent::_construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('amazonListingAddNewAsinManualPopup');
     // ---------------------------------------
     $this->setTemplate('amazon/listing/product/variation/switch_to_parent_popup.phtml');
 }
Пример #7
0
 public function _construct()
 {
     parent::_construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('ebayListingCategoryChooserWrapper');
     // ---------------------------------------
     $this->setTemplate('ebay/listing/product/category/settings/chooser/wrapper.phtml');
 }
Пример #8
0
 public function _construct()
 {
     parent::_construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('ebayListingCategoryWarningPopup');
     // ---------------------------------------
     $this->setTemplate('ebay/listing/product/category/settings/mode/product/warning_popup.phtml');
 }
Пример #9
0
 public function _construct()
 {
     parent::_construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('amazonListingAddNewAsinManualPopup');
     // ---------------------------------------
     $this->setTemplate('amazon/listing/product/add/new_asin/manual/skip_popup.phtml');
 }
 public function _construct()
 {
     parent::_construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('amazonListingVocabularyAttributesPopup');
     // ---------------------------------------
     $this->setTemplate('amazon/listing/product/variation/vocabulary_attributes_popup.phtml');
 }
Пример #11
0
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     // ---------------------------------------
     $data = array('class' => 'ok_button', 'label' => $this->__('Confirm'), 'onclick' => 'Dialog.okCallback();');
     $buttonBlock = $this->createBlock('Magento\\Button')->setData($data);
     $this->setChild('ok_button', $buttonBlock);
     // ---------------------------------------
 }
Пример #12
0
 public function _construct()
 {
     parent::_construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('ebayListingCategoryChooser');
     // ---------------------------------------
     $this->_isAjax = $this->getRequest()->isXmlHttpRequest();
 }
Пример #13
0
 protected function _beforeToHtml()
 {
     $helpBlock = $this->createBlock('HelpBlock', '', ['data' => ['content' => $this->__('If you cannot find necessary Category, try to
             <a href="javascript:void(0)"
                onclick="AmazonTemplateDescriptionCategoryChooserObj.refreshAmazonCategories()">
             Update Amazon Marketplaces data</a>.'), 'no_collapse' => true]]);
     $this->setChild('help_block', $helpBlock);
     $this->js->add("AmazonTemplateDescriptionCategoryChooserObj.renderTopLevelCategories('chooser_browser');");
     return parent::_beforeToHtml();
 }
Пример #14
0
    protected function _prepareLayout()
    {
        $this->getLayout()->getBlock('wizard.help.block')->setContent(<<<HTML
The Marketplace Data must be resynchronized to complete M2E Pro migration from Magento v 1.x to Magento v 2.x.<br/><br/>
Below you can find the list of the Marketplaces which were enabled in M2E Pro based on the Magento v 1.x.
They will be automatically resynchronized after pressing <strong>Continue</strong> button.<br/><br/><strong>
Please note</strong> that the process might be rather time- and resource-consuming and may take up to 30 minutes.
HTML
);
        parent::_prepareLayout();
    }
Пример #15
0
 protected function _toHtml()
 {
     // ---------------------------------------
     $marketplaceFilterBlock = $this->createBlock('Marketplace\\Switcher')->setData(array('component_mode' => \Ess\M2ePro\Helper\Component\Amazon::NICK, 'controller_name' => 'amazon_order'));
     $marketplaceFilterBlock->setUseConfirm(false);
     $accountFilterBlock = $this->createBlock('Account\\Switcher')->setData(array('component_mode' => \Ess\M2ePro\Helper\Component\Amazon::NICK, 'controller_name' => 'amazon_order'));
     $accountFilterBlock->setUseConfirm(false);
     $orderStateSwitcherBlock = $this->createBlock('Order\\NotCreatedFilter')->setData(array('component_mode' => \Ess\M2ePro\Helper\Component\Amazon::NICK, 'controller' => 'amazon_order'));
     // ---------------------------------------
     return '<div class="filter_block">' . $marketplaceFilterBlock->toHtml() . $accountFilterBlock->toHtml() . $orderStateSwitcherBlock->toHtml() . '</div>' . parent::_toHtml();
 }
Пример #16
0
 public function _construct()
 {
     parent::_construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('ebayListingCategoryChooserRecent');
     // ---------------------------------------
     // Set template
     // ---------------------------------------
     $this->setTemplate('ebay/listing/product/category/settings/chooser/tabs/recent.phtml');
     // ---------------------------------------
 }
Пример #17
0
 public function _construct()
 {
     parent::_construct();
     // Initialization block
     // ---------------------------------------
     $this->setId('EbayListingProductCategorySettingsChooserTabsBrowse');
     // ---------------------------------------
     // Set template
     // ---------------------------------------
     $this->setTemplate('ebay/listing/product/category/settings/chooser/tabs/browse.phtml');
     // ---------------------------------------
 }
Пример #18
0
    protected function _toHtml()
    {
        $helpBlock = $this->createBlock('HelpBlock', '', ['data' => ['no_collapse' => true, 'no_hide' => true, 'content' => $this->__(<<<HTML
                <p>M2E Pro is one of the multi-functional and complex modules developed for Magento.
            It brings a great number of automatic actions. For example, Quantity change of one Magento Product
            can lead to multiple updates of this value on different channels (eBay/Amazon) and for 
            different copies of the Item (e.g. on different Marketplaces). So, 1 change may trigger 
            several calculations and several actions.</p><br>
            
            <p>Thus, if your Magento Catalog contains a large number of Products and you update a variety 
            of Products on all of the available Platforms (eBay, Amazon, etc.), Performance aspect becomes rather
            important and vital.</p><br>

            <p>M2E Pro drew up a list of points which could help to optimize the Performance. The main of points 
            are the following:</p>

            <ul>
            <li><p><strong>Always keep your M2E Pro updated</strong></p>
            <p>Unlike many other multi-channel providers, we release updates for our software quite regularly and 
            it’s the customer’s responsibility to ensure that their system is up to date. Each updated software 
            version contains various fixes, new features as well as overall system enhancement.</p></li>
            <li><p><strong>Disable options/features that are not in use</strong></p>
            <p>Following the initial configuration, please review your M2E Pro config and disable those options, 
            channels and features which you do not intend to use.</p></li>
            <li><p><strong>Use Conditional Revise Features</strong></p>
            <p>M2E Pro has “Conditional Revise” options implemented for both “Quantity Revise” and “Price Revise” 
            in Synchronization Policy. <br>
            The main purpose of the “Conditional Revise” is to limit a number of the performed “Revise” actions.
            It contributes to M2E Pro Performance improvement.</p></li>
            <li><p><strong>Disable Product Description Information</strong></p>
            <p>In most of the cases there is no need to continuously update description-related details of the 
            Product such as Title, Subtitle, Images or Product Description in real-time mode. 
            To improve system Performance, M2E Pro recommends disabling these options in Synchronization 
            Policy.</p></li>
            <li><p><strong>Duplication of the same Product in M2E Pro Listing</strong></p>
            <p>Some sellers have more than one duplicate of the same Product (from Magento Catalog)
            in M2E Pro Listing as well as listed on the same marketplace. This “bad practice” always results
            in multiple revisions of every Product copy which makes synchronization process 
            very time-consuming.</p></li>
            <li><p><strong>Maintain more than one M2E Pro Listing</strong></p>
            <p>You can create a number of M2E Pro Listings and add Products to them. If you add all your Products 
            to one M2E Pro Listing, this will make your interface work more slowly.</p></li>
            </ul><br>
            
            <p>Full detailed information you can find <a href="%url1%" target="_blank">here</a></p>
HTML
, $this->getHelper('Module\\Support')->getDocumentationUrl(NULL, NULL, 'x/z4QVAQ'))]]);
        return $helpBlock->toHtml() . parent::_toHtml();
    }
Пример #19
0
    protected function _prepareLayout()
    {
        $helpBlock = $this->createBlock('HelpBlock')->setData(['no_collapse' => true, 'no_hide' => true, 'style' => 'margin-bottom: 0px', 'content' => <<<HTML
<h3>{$this->__('Do you want to create New Amazon Products for Magento Products
                which do not have ASIN/ISBN assigned? ')}</h3>
<br/>
<p>{$this->__('Not for all Magento Products ASIN/ISBN was found in Amazon Catalog.
                If you want M2E Pro can create New ASIN(s)/ISBN(s) for such Magento Products. <br/><br/>
                <b>Note:</b> You can use the Search of Amazon Products or the feature of Creation of
                New Amazon Products later in M2E Pro Listing.')}</p>

HTML
]);
        $this->setChild('popup_help_block', $helpBlock);
        return parent::_prepareLayout();
    }
Пример #20
0
    protected function _prepareLayout()
    {
        $this->getHelper('Data\\GlobalData')->setValue('synchronization_form_data', $this->getFormData());
        $this->getHelper('Data\\GlobalData')->setValue('is_custom', $this->getData('is_custom'));
        $this->getHelper('Data\\GlobalData')->setValue('custom_title', $this->getData('custom_title'));
        $this->setChild('tabs', $this->createBlock('Ebay\\Template\\Synchronization\\Edit\\Form\\Tabs'));
        $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Model\\Ebay\\Template\\Synchronization'));
        $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Model\\Template\\Synchronization'));
        $this->jsTranslator->addTranslations(['Wrong value. Only integer numbers.' => $this->__('Wrong value. Only integer numbers.'), 'Must be greater than "Min".' => $this->__('Must be greater than "Min".'), 'Inconsistent Settings in Relist and Stop Rules.' => $this->__('Inconsistent Settings in Relist and Stop Rules.'), 'You need to choose at set at least one time for the schedule to run.' => $this->__('You need to choose at least one Time for the schedule to run.'), 'You should specify time.' => $this->__('You should specify time.'), 'Wrong value.' => $this->__('Wrong value.'), 'Must be greater than "Active From" Date.' => $this->__('Must be greater than "Active From" Date.'), 'Must be greater than "From Time".' => $this->__('Must be greater than "From Time".'), 'Quantity' => $this->__('Quantity'), 'Min Quantity' => $this->__('Min Quantity')]);
        $this->js->add(<<<JS
    require([
        'M2ePro/Ebay/Template/Synchronization',
    ], function(){
        window.EbayTemplateSynchronizationObj = new EbayTemplateSynchronization();
        EbayTemplateSynchronizationObj.initObservers();
    });
JS
);
        return parent::_prepareLayout();
    }
Пример #21
0
 protected function _beforeToHtml()
 {
     $tableName = $this->getData('table_name');
     $actionIdsString = $this->getData('action_ids');
     $countField = 'product_id';
     if ($this->getData('type_log') == 'listing') {
         $countField = 'product_id';
     } else {
         if ($this->getData('type_log') == 'listing_other') {
             $countField = 'listing_other_id';
         }
     }
     $connection = $this->resourceConnection->getConnection();
     $fields = new \Zend_Db_Expr('COUNT(`' . $countField . '`) as `count_products`, `description`');
     $dbSelect = $connection->select()->from($tableName, $fields)->where('`action_id` IN (' . $actionIdsString . ')')->where('`type` = ?', \Ess\M2ePro\Model\Log\AbstractLog::TYPE_ERROR)->group('description')->order(array('count_products DESC'))->limit(100);
     $newErrors = array();
     $tempErrors = $connection->fetchAll($dbSelect);
     foreach ($tempErrors as $row) {
         $row['description'] = $this->getHelper('View')->getModifiedLogMessage($row['description']);
         $newErrors[] = $row;
     }
     $this->errors = $newErrors;
     return parent::_beforeToHtml();
 }
Пример #22
0
 protected function _prepareLayout()
 {
     $this->setChild('tabs', $this->createBlock('Amazon\\Template\\Description\\Edit\\Tabs'));
     return parent::_prepareLayout();
 }
Пример #23
0
 protected function _toHtml()
 {
     return parent::_toHtml() . $this->getChildHtml('help') . $this->getChildHtml('selling_format') . $this->getChildHtml('description');
 }
Пример #24
0
 public function __construct(\Magento\Store\Model\StoreManagerInterface $storeManager, \Ess\M2ePro\Model\ActiveRecord\Component\Parent\Factory $parentFactory, \Ess\M2ePro\Block\Adminhtml\Magento\Context\Template $context, array $data = [])
 {
     $this->storeManager = $storeManager;
     $this->parentFactory = $parentFactory;
     parent::__construct($context, $data);
 }
Пример #25
0
 public function _construct()
 {
     parent::_construct();
     $this->setAddListingUrl('');
     $this->setTemplate('Ess_M2ePro::listing/switcher.phtml');
 }
Пример #26
0
    protected function _toHtml()
    {
        $isTemplateModeTemplate = (int) $this->isTemplateModeTemplate();
        $this->js->add(<<<JS
    require([
        'Switcher/Initialization',
        'M2ePro/Ebay/Listing/Template/Switcher'
    ], function(){
        
        EbayListingTemplateSwitcherObj.updateEditVisibility('{$this->getTemplateNick()}');
        EbayListingTemplateSwitcherObj.updateButtonsVisibility('{$this->getTemplateNick()}');
        EbayListingTemplateSwitcherObj.updateTemplateLabelVisibility('{$this->getTemplateNick()}');

        \$('{$this->getSwitcherId()}').observe('change', EbayListingTemplateSwitcherObj.change);

        if ({$isTemplateModeTemplate}) {
            \$('{$this->getSwitcherId()}').simulate('change');
        }
    });        
JS
);
        return parent::_toHtml() . $this->getFormDataBlockHtml() . $this->getButtonsHtml();
    }
Пример #27
0
 protected function _toHtml()
 {
     return parent::_toHtml() . $this->getChildHtml('help') . $this->getChildHtml('payment') . $this->getChildHtml('shipping') . $this->getChildHtml('return');
 }
Пример #28
0
 protected function _toHtml()
 {
     $breadcrumb = $this->createBlock('Ebay\\Listing\\View\\Settings\\Category\\Breadcrumb');
     $breadcrumb->setSelectedStep(1);
     return $breadcrumb->toHtml() . parent::_toHtml();
 }
Пример #29
0
 protected function _toHtml()
 {
     if (count($this->rows) == 0) {
         return '';
     }
     return parent::_toHtml();
 }
Пример #30
0
    protected function _toHtml()
    {
        $this->addRequireJs(['switcherObj' => 'M2ePro/Ebay/Template/Switcher', '$' => 'jquery', '_' => 'underscore'], <<<JS
        var init = function() {

            switcherObj.updateEditVisibility('{$this->getTemplateNick()}');
            switcherObj.updateButtonsVisibility('{$this->getTemplateNick()}');
            switcherObj.updateTemplateLabelVisibility('{$this->getTemplateNick()}');

            \$('#{$this->getSwitcherId()}').on('change', _.bind(switcherObj.change, switcherObj));

            if ({$this->isTemplateModeTemplate()}) {
                \$('#{$this->getSwitcherId()}').trigger('change');
            }
        };

        if ({$this->getRequest()->isXmlHttpRequest()}) {
            init();
        } else {
            \$(init);
        }
JS
);
        //        $this->initKnockout('M2ePro/Ebay/Template/Switcher');
        return parent::_toHtml() . $this->getFormDataBlockHtml() . $this->getButtonsHtml();
    }