public function __construct() { parent::__construct(); // Initialization block //------------------------------ $this->setId('marketplace'); $this->_blockGroup = 'M2ePro'; $this->_controller = 'adminhtml_marketplace'; //------------------------------ // Form id of marketplace_general_form //------------------------------ $this->tabsContainerId = 'edit_form'; //------------------------------ // Set header text //------------------------------ $this->_headerText = Mage::helper('M2ePro')->__('Marketplaces'); //------------------------------ /* @var $wizardHelper Ess_M2ePro_Helper_Wizard */ $wizardHelper = Mage::helper('M2ePro/Wizard'); $activeWizard = $wizardHelper->getActiveUpgrade(); if ($activeWizard && $wizardHelper->getStep($wizardHelper->getNick($activeWizard)) == 'marketplace') { $this->setEnabledTab($wizardHelper->getNick($activeWizard)); $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'MarketplaceHandlerObj.reset_click()', 'class' => 'reset')); $this->_addButton('close', array('label' => Mage::helper('M2ePro')->__('Save And Complete This Step'), 'onclick' => 'MarketplaceHandlerObj.completeStep();', 'class' => 'close')); } else { if (Mage::helper('M2ePro/Component_Ebay')->isActive()) { $this->_addButton('goto_general_templates', array('label' => Mage::helper('M2ePro')->__('General Templates'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_template_general/index') . '\')', 'class' => 'button_link')); } $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'MarketplaceHandlerObj.reset_click()', 'class' => 'reset')); $this->_addButton('run_synch_now', array('label' => Mage::helper('M2ePro')->__('Save And Update'), 'onclick' => 'MarketplaceHandlerObj.saveSettings(\'runSynchNow\');', 'class' => 'save save_and_update_marketplaces')); } }
public function __construct() { parent::__construct(); // Set header text //------------------------------ $this->_headerText = Mage::helper('M2ePro')->__('3rd Party Listings'); //------------------------------ // Set buttons actions //------------------------------ $this->removeButton('back'); $this->removeButton('reset'); $this->removeButton('delete'); $this->removeButton('add'); $this->removeButton('save'); $this->removeButton('edit'); if (!is_null($this->getRequest()->getParam('back'))) { $backUrl = Mage::helper('M2ePro')->getBackUrl('*/adminhtml_listing/index'); $this->_addButton('back', array('label' => Mage::helper('M2ePro')->__('Back'), 'onclick' => 'CommonHandlerObj.back_click(\'' . $backUrl . '\')', 'class' => 'back')); } $this->_addButton('goto_listings', array('label' => Mage::helper('M2ePro')->__('Listings'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_listing/index') . '\')', 'class' => 'button_link')); $url = $this->getUrl('*/adminhtml_log/listingOther', array('back' => Mage::helper('M2ePro')->makeBackUrlParam('*/adminhtml_listingOther/index'))); $this->_addButton('view_log', array('label' => Mage::helper('M2ePro')->__('View Log'), 'onclick' => 'setLocation(\'' . $url . '\')', 'class' => 'button_link')); $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'CommonHandlerObj.reset_click()', 'class' => 'reset')); //------------------------------ $this->useAjax = true; $this->tabsAjaxUrls = array(self::TAB_ID_EBAY => $this->getUrl('*/adminhtml_ebay_listingOther/index'), self::TAB_ID_AMAZON => $this->getUrl('*/adminhtml_amazon_listingOther/index'), self::TAB_ID_BUY => $this->getUrl('*/adminhtml_buy_listingOther/index')); $this->isAjax = json_encode($this->getRequest()->isXmlHttpRequest()); }
public function __construct() { parent::__construct(); // Set header text //------------------------------ $this->_headerText = Mage::helper('M2ePro')->__('Orders'); //------------------------------ $this->_addButton('feedbacks', array('label' => Mage::helper('M2ePro')->__('Feedbacks'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_ebay_feedback/index') . '\')', 'class' => 'button_link')); $this->_addButton('accounts', array('label' => Mage::helper('M2ePro')->__('Accounts'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_account/index') . '\')', 'class' => 'button_link')); $this->_addButton('logs', array('label' => Mage::helper('M2ePro')->__('View Logs'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_log/order') . '\')', 'class' => 'button_link')); $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'CommonHandlerObj.reset_click()', 'class' => 'reset')); $this->useAjax = true; $this->tabsAjaxUrls = array(self::TAB_ID_EBAY => $this->getUrl('*/adminhtml_ebay_order/index'), self::TAB_ID_AMAZON => $this->getUrl('*/adminhtml_amazon_order/index'), self::TAB_ID_BUY => $this->getUrl('*/adminhtml_buy_order/index')); }
public function __construct() { parent::__construct(); // Initialization block //------------------------------ $this->setId('synchronization'); $this->_blockGroup = 'M2ePro'; $this->_controller = 'adminhtml_synchronization'; //------------------------------ // Form id of marketplace_general_form //------------------------------ $this->tabsContainerId = 'edit_form'; //------------------------------ // Set header text //------------------------------ $this->_headerText = Mage::helper('M2ePro')->__('Synchronization'); //------------------------------ // Set buttons actions //------------------------------ $this->removeButton('back'); $this->removeButton('reset'); $this->removeButton('delete'); $this->removeButton('add'); $this->removeButton('save'); $this->removeButton('edit'); /* @var $wizardHelper Ess_M2ePro_Helper_Wizard */ $wizardHelper = Mage::helper('M2ePro/Wizard'); /* @var $upgrader Ess_M2ePro_Model_Wizard */ $upgrader = $wizardHelper->getActiveUpgrade(); if (!$upgrader || $wizardHelper->getStep($wizardHelper->getNick($upgrader)) != 'synchronization') { $this->_addButton('goto_accounts', array('label' => Mage::helper('M2ePro')->__('Accounts'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/adminhtml_account/index') . '\')', 'class' => 'button_link')); $tempUrl = $this->getUrl('*/adminhtml_log/synchronization', array('back' => Mage::helper('M2ePro')->makeBackUrlParam('*/adminhtml_synchronization/index'))); $this->_addButton('view_log', array('label' => Mage::helper('M2ePro')->__('View Log'), 'onclick' => 'setLocation(\'' . $tempUrl . '\')', 'class' => 'button_link')); $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'SynchronizationHandlerObj.reset_click()', 'class' => 'reset')); $tempParams = Mage::helper('M2ePro')->escapeHtml(json_encode(Mage::helper('M2ePro/Component')->getActiveComponents())); $this->_addButton('run_all_enabled_now', array('label' => Mage::helper('M2ePro')->__('Run Enabled Now'), 'onclick' => 'SynchronizationHandlerObj.saveSettings(\'runAllEnabledNow\', ' . $tempParams . ');', 'class' => 'save')); $this->_addButton('save', array('label' => Mage::helper('M2ePro')->__('Save Settings'), 'onclick' => 'SynchronizationHandlerObj.saveSettings(\'\', ' . $tempParams . ')', 'class' => 'save')); } else { $this->setEnabledTab($wizardHelper->getNick($upgrader)); $this->_addButton('save', array('label' => Mage::helper('M2ePro')->__('Save Settings'), 'onclick' => 'SynchronizationHandlerObj.saveSettings(\'\',' . $wizardHelper->getNick($upgrader) . ')', 'class' => 'save')); $this->_addButton('close', array('label' => Mage::helper('M2ePro')->__('Complete This Step'), 'onclick' => 'SynchronizationHandlerObj.completeStep();', 'class' => 'close')); } //------------------------------ }
public function __construct() { parent::__construct(); // Set header text //------------------------------ $this->_headerText = Mage::helper('M2ePro')->__('Listings'); //------------------------------ if (!is_null($this->getRequest()->getParam('back'))) { $tempUrl = Mage::helper('M2ePro')->getBackUrl('*/adminhtml_listing/index'); $this->_addButton('back', array('label' => Mage::helper('M2ePro')->__('Back'), 'onclick' => 'CommonHandlerObj.back_click(\'' . $tempUrl . '\')', 'class' => 'back')); } $tempUrl = $this->getUrl('*/adminhtml_log/listing', array('back' => Mage::helper('M2ePro')->makeBackUrlParam('*/adminhtml_listing/index'))); $this->_addButton('general_log', array('label' => Mage::helper('M2ePro')->__('General Log'), 'onclick' => 'setLocation(\'' . $tempUrl . '\')', 'class' => 'button_link')); $tempUrl = $this->getUrl('*/adminhtml_listing/search', array('back' => Mage::helper('M2ePro')->makeBackUrlParam('*/adminhtml_listing/index'))); $this->_addButton('search_products', array('label' => Mage::helper('M2ePro')->__('Search Products'), 'onclick' => 'setLocation(\'' . $tempUrl . '\')', 'class' => 'button_link search')); $this->_addButton('reset', array('label' => Mage::helper('M2ePro')->__('Refresh'), 'onclick' => 'CommonHandlerObj.reset_click()', 'class' => 'reset')); $this->useAjax = true; $this->tabsAjaxUrls = array(self::TAB_ID_EBAY => $this->getUrl('*/adminhtml_ebay_listing/index'), self::TAB_ID_AMAZON => $this->getUrl('*/adminhtml_amazon_listing/index'), self::TAB_ID_BUY => $this->getUrl('*/adminhtml_buy_listing/index')); }