protected function _toHtml()
 {
     if (is_null($this->getPageHelpLink())) {
         return '';
     }
     return parent::_toHtml();
 }
    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();
    }
Exemple #3
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;
    }
    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();
    }
 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();
 }
    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();
    }
Exemple #7
0
 protected function _toHtml()
 {
     return parent::_toHtml() . $this->getChildHtml('help') . $this->getChildHtml('selling_format') . $this->getChildHtml('description');
 }
Exemple #8
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();
    }
Exemple #9
0
 protected function _toHtml()
 {
     if (count($this->rows) == 0) {
         return '';
     }
     return parent::_toHtml();
 }
Exemple #10
0
 protected function _toHtml()
 {
     $breadcrumb = $this->createBlock('Ebay\\Listing\\View\\Settings\\Category\\Breadcrumb');
     $breadcrumb->setSelectedStep(1);
     return $breadcrumb->toHtml() . parent::_toHtml();
 }
Exemple #11
0
 protected function _toHtml()
 {
     return parent::_toHtml() . $this->getChildHtml('help') . $this->getChildHtml('payment') . $this->getChildHtml('shipping') . $this->getChildHtml('return');
 }
Exemple #12
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();
    }
Exemple #13
0
    protected function _toHtml()
    {
        $this->jsTranslator->add('The Category <b>%cat%</b> doesn\'t have Item Specific', $this->__('The Category <b>%cat%</b> doesn\'t have Item Specific.'));
        $this->jsUrl->addUrls($this->getHelper('Data')->getControllerActions('Ebay\\Category'));
        $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Helper\\View\\Ebay'));
        $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Helper\\Component\\Ebay'));
        $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Model\\Ebay\\Template\\Category'));
        $this->jsPhp->addConstants($this->getHelper('Data')->getClassConstants('\\Ess\\M2ePro\\Model\\Ebay\\Template\\Category\\Specific'));
        $uniqueId = $this->getUniqueId();
        $attributes = json_encode($this->getAttributes());
        $dictionarySpecifics = json_encode($this->getDictionarySpecifics());
        $ebaySelectedSpecifics = json_encode($this->getEbaySelectedSpecifics());
        $customSelectedSpecifics = json_encode($this->getCustomSelectedSpecifics());
        $this->js->add(<<<JS
            
require([
    'jquery',
    'mage/backend/form',
    'mage/backend/validation',
    'M2ePro/Ebay/Listing/Product/Category/Settings/Specific',
    'M2ePro/Plugin/Magento/AttributeCreator'
], function(jQuery){

    jQuery('#{$uniqueId}category_specific_form').form()
        .validation({
            validationUrl: '',
            highlight: function(element) {
                var detailsElement = jQuery(element).closest('details');
                if (detailsElement.length && detailsElement.is('.details')) {
                    var summaryElement = detailsElement.find('summary');
                    if (summaryElement.length && summaryElement.attr('aria-expanded') === "false") {
                        summaryElement.trigger('click');
                    }
                }
                jQuery(element).trigger('highlight.validate');
            }
        });
    
    EbayListingProductCategorySettingsSpecific{$uniqueId}Obj = new EbayListingProductCategorySettingsSpecific(
        '{$this->getMarketplaceId()}',
        '{$this->getCategoryMode()}',
        '{$this->getCategoryValue()}',
        '{$uniqueId}'
    );

    EbayListingProductCategorySettingsSpecific{$uniqueId}Obj
        .setAttributes({$attributes})
        .setDictionarySpecifics({$dictionarySpecifics})
        .setEbaySelectedSpecifics({$ebaySelectedSpecifics})
        .setCustomSelectedSpecifics({$customSelectedSpecifics})
        .renderSpecifics();

});

JS
);
        return parent::_toHtml();
    }
 protected function _toHtml()
 {
     return parent::_toHtml() . $this->getChildHtml('help') . $this->getChildHtml('synchronization');
 }
Exemple #15
0
 protected function _toHtml()
 {
     return $this->getHelpBlock()->toHtml() . '<h3 id="block-title-top">' . $this->getBlockTitle() . '</h3>' . '<div id="block-content-wrapper" style="margin-left: 26px">' . $this->getBlockContent() . '</div>' . parent::_toHtml();
 }