protected function _beforeToHtml() { parent::_beforeToHtml(); $data = array('class' => 'close-btn', 'label' => Mage::helper('M2ePro')->__('Close'), 'onclick' => 'Windows.getFocusedWindow().close()'); $this->setChild('close_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data)); return $this; }
public function _beforeToHtml() { $this->_currency = Mage::getModel('directory/currency')->load(Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE)); $this->_collection = Mage::getResourceModel('sales/sale_collection')->setCustomerFilter(Mage::registry('current_customer'))->setOrderStateFilter(Mage_Sales_Model_Order::STATE_CANCELED, true)->load(); $this->_groupedCollection = array(); foreach ($this->_collection as $sale) { if (!is_null($sale->getStoreId())) { $store = Mage::app()->getStore($sale->getStoreId()); $websiteId = $store->getWebsiteId(); $groupId = $store->getGroupId(); $storeId = $store->getId(); $sale->setWebsiteId($store->getWebsiteId()); $sale->setWebsiteName($store->getWebsite()->getName()); $sale->setGroupId($store->getGroupId()); $sale->setGroupName($store->getGroup()->getName()); } else { $websiteId = 0; $groupId = 0; $storeId = 0; $sale->setStoreName(Mage::helper('customer')->__('Deleted Stores')); } $this->_groupedCollection[$websiteId][$groupId][$storeId] = $sale; $this->_websiteCounts[$websiteId] = isset($this->_websiteCounts[$websiteId]) ? $this->_websiteCounts[$websiteId] + 1 : 1; } return parent::_beforeToHtml(); }
protected function _beforeToHtml() { //------------------------------- $defaultStoreId = Mage::helper('M2ePro/Magento_Store')->getDefaultStoreId(); $countries = Mage::getModel('Adminhtml/System_Config_Source_Country')->toOptionArray(); $countries[0] = array('value' => '', 'label' => ''); $this->setData('countries', $countries); $this->setData('country', Mage::getStoreConfig('general/country/default', $defaultStoreId)); //------------------------------- $userId = Mage::getSingleton('admin/session')->getUser()->getId(); $user = Mage::getModel('admin/user')->load($userId)->getData(); $tempPath = defined('Mage_Shipping_Model_Config::XML_PATH_ORIGIN_CITY') ? Mage_Shipping_Model_Config::XML_PATH_ORIGIN_CITY : 'shipping/origin/city'; $user['city'] = Mage::getStoreConfig($tempPath, $defaultStoreId); $tempPath = defined('Mage_Shipping_Model_Config::XML_PATH_ORIGIN_POSTCODE') ? Mage_Shipping_Model_Config::XML_PATH_ORIGIN_POSTCODE : 'shipping/origin/postcode'; $user['postal_code'] = Mage::getStoreConfig($tempPath, $defaultStoreId); $this->addData($user); //------------------------------- //------------------------------- $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Confirm'), 'onclick' => '', 'id' => 'license_popup_confirm_button')); $this->setChild('license_popup_confirm_button', $buttonBlock); //------------------------------- //------------------------------- $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Sign into eBay'), 'onclick' => '', 'id' => 'sign_into_ebay_button')); $this->setChild('sign_into_ebay_button', $buttonBlock); //------------------------------- //------------------------------- $url = 'https://scgi.ebay.com/ws/eBayISAPI.dll?RegisterEnterInfo&bizflow=2'; $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Register for eBay'), 'onclick' => 'window.open(\'' . $url . '\',\'_blank\')', 'id' => 'register_on_ebay_button')); $this->setChild('register_on_ebay_button', $buttonBlock); //------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { $this->assign('form', $this->_form); $this->assign('element', $this->_element); $this->assign('formBlock', $this->_formBlock); return parent::_beforeToHtml(); }
protected function _beforeToHtml() { parent::_beforeToHtml(); $data = array('class' => 'save-btn', 'label' => Mage::helper('M2ePro')->__('Save')); $this->setChild('save_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data)); return $this; }
protected function _beforeToHtml() { parent::_beforeToHtml(); $data = array('class' => 'next', 'label' => Mage::helper('M2ePro')->__('Continue'), 'onclick' => "setLocation(M2ePro.url.get('adminhtml_ebay_listing_categorySettings'));"); $this->setChild('continue_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data)); return $this; }
protected function _beforeToHtml() { if ($this->_getData('select_id') == '') { $this->setData('select_id', $this->getHtmlId() . '-select'); } return parent::_beforeToHtml(); }
protected function _beforeToHtml() { if ($this->isAllowedEdit()) { $this->setChild('rename_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Rename'), 'onclick' => 'window.location.href=\'' . Mage::helper('mzeis_documentation/page')->getRenameUrl($this->getPage()->getName()) . '\'', 'class' => 'edit'))); $this->setChild('edit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Edit'), 'onclick' => 'window.location.href=\'' . Mage::helper('mzeis_documentation/page')->getEditUrl($this->getPage()->getName()) . '\'', 'class' => 'edit'))); } return parent::_beforeToHtml(); }
protected function _beforeToHtml() { $this->setTemplate('newsletter/queue/edit.phtml'); $this->setChild('form', $this->getLayout()->createBlock('adminhtml/newsletter_queue_edit_form', 'form')); $queue = AO::getSingleton('newsletter/queue'); $queue->addTemplateData($queue); return parent::_beforeToHtml(); }
protected function _beforeToHtml() { // --------------------------------------- $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Continue'), 'onclick' => '', 'id' => 'continue_button')); $this->setChild('continue_button', $buttonBlock); // --------------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { parent::_beforeToHtml(); $url = $this->getUrl('*/*/index', array('_current' => true, 'step' => 3)); $data = array('class' => 'next', 'label' => Mage::helper('M2ePro')->__('Continue'), 'onclick' => 'setLocation(\'' . $url . '\')'); $this->setChild('continue_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data)); return $this; }
/** * Retrieve required options from parent */ protected function _beforeToHtml() { if (!$this->getParentBlock()) { Mage::throwException(Mage::helper('adminhtml')->__('Invalid parrent block for this block')); } $this->setPayment($this->getParentBlock()->getOrder()->getPayment()); parent::_beforeToHtml(); }
protected function _beforeToHtml() { parent::_beforeToHtml(); $this->_oldStoreId = Mage::app()->getStore()->getId(); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); Mage::helper('udropship/catalog')->setDesignStore(0, 'adminhtml'); return $this; }
/** * Retrieve required options from parent */ protected function _beforeToHtml() { if (!$this->getParentBlock()) { Mage::throwException(Mage::helper('adminhtml')->__('Invalid parent block for this block.')); } $this->setEntity($this->getParentBlock()->getSource()); parent::_beforeToHtml(); }
protected function _beforeToHtml() { parent::_beforeToHtml(); $data = array('class' => 'switch-to-parent-btn', 'label' => Mage::helper('M2ePro')->__('Yes')); $this->setChild('yes_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data)); $data = array('class' => 'switch-to-parent-popup-close', 'label' => Mage::helper('M2ePro')->__('No')); $this->setChild('no_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data)); return $this; }
protected function _beforeToHtml() { parent::_beforeToHtml(); $data = array('class' => 'switch-to-individual-btn', 'label' => Mage::helper('M2ePro')->__('Yes'), 'onclick' => 'AmazonListingVariationProductManageHandlerObj.addOptionsToVocabulary(true)'); $this->setChild('yes_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data)); $data = array('class' => 'switch-to-individual-popup-close', 'label' => Mage::helper('M2ePro')->__('No'), 'onclick' => 'AmazonListingVariationProductManageHandlerObj.addOptionsToVocabulary(false)'); $this->setChild('no_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data)); return $this; }
protected function _beforeToHtml() { //------------------------------- $url = $this->getUrl('*/adminhtml_marketplace/index', array('hide_upgrade_notification' => 'yes')); $step = 'marketplace'; $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Proceed'), 'onclick' => 'WizardHandlerObj.processStep(\'' . $url . '\',\'' . $step . '\');', 'class' => 'process_marketplace_button')); $this->setChild('process_marketplace_button', $buttonBlock); //------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { //------------------------------- $url = $this->getUrl('*/adminhtml_ebay_listingOtherSynchronization/edit', array('hide_upgrade_notification' => 'yes')); $params = array('\'' . $url . '\'', '\'otherListing\''); $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Proceed'), 'onclick' => 'WizardHandlerObj.processStep(' . implode(',', $params) . ');', 'class' => 'process_otherListing_button')); $this->setChild('process_otherListing_button', $buttonBlock); //------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { //------------------------------- $url = $this->getUrl('*/*/license', array('wizard' => true)); $step = 'license'; $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Proceed'), 'onclick' => 'WizardHandlerObj.processStep(\'' . $url . '\',\'' . $step . '\');', 'class' => 'process_license_button')); $this->setChild('process_license_button', $buttonBlock); //------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { //------------------------------- $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Confirm'), 'onclick' => 'WizardHandlerObj.skipStep(\'cron\');', 'class' => 'skip_cron_button')); $this->setChild('skip_cron_button', $buttonBlock); $this->basePath = Mage::helper('M2ePro/Client')->getBaseDirectory(); $this->baseUrl = Mage::helper('M2ePro/Magento')->getBaseUrl(); //------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { //------------------------------- $params = array('\'' . $this->getUrl('*/adminhtml_settings/index', array('hide_upgrade_notification' => 'yes')) . '\'', '\'settings\'', 'function() { $(\'wizard_main_complete\').show(); }'); $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Proceed'), 'onclick' => 'WizardHandlerObj.processStep(' . implode(',', $params) . ');', 'class' => 'process_settings_button')); $this->setChild('process_settings_button', $buttonBlock); //------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { //------------------------------- $params = array('\'' . $this->getUrl('*/adminhtml_common_synchronization/index', array('wizard' => true)) . '\'', '\'synchronization\''); $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Proceed'), 'onclick' => 'WizardHandlerObj.processStep(' . implode(',', $params) . ');', 'class' => 'process_synchronization_button')); $this->setChild('process_synchronization_button', $buttonBlock); $params = array('\'synchronization\''); $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Skip'), 'onclick' => 'WizardHandlerObj.skipStep(' . implode(',', $params) . ');', 'class' => 'skip_synchronization_button')); $this->setChild('skip_synchronization_button', $buttonBlock); //------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { // --------------------------------------- $callback = 'function() { $(\'wizard_complete\').show() }'; // --------------------------------------- $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Confirm'), 'onclick' => 'WizardHandlerObj.skipStep(\'information\', ' . $callback . ');', 'class' => 'process_information_button')); $this->setChild('process_information_button', $buttonBlock); // --------------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { if ($this->_getData('id') == '') { $this->setData('id', $this->_instanceId); } if ($this->_getData('html_id') == '') { $this->setData('html_id', 'blcgAttributeRendererSelect' . $this->getId()); } if ($this->_getData('select_id') == '') { $this->setData('select_id', $this->getHtmlId() . '-select'); } return parent::_beforeToHtml(); }
protected function _beforeToHtml() { /** @var Ess_M2ePro_Model_Wizard_MigrationNewAmazon $wizardModel */ $wizardModel = Mage::getSingleton('M2ePro/Wizard_MigrationNewAmazon'); $descriptionTemplatesData = $wizardModel->getDataForDescriptionTemplatesStep(); $grid = $this->createMagentoGridFromArray($descriptionTemplatesData); $this->setData('description_templates_grid', $grid->toHtml()); //------------------------------- $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Confirm'), 'onclick' => 'WizardHandlerObj.skipStep(\'descriptionTemplates\');', 'class' => 'process_template_description_button')); $this->setChild('process_description_templates_button', $buttonBlock); //------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { /** @var $marketplace Ess_M2ePro_Model_Marketplace */ $marketplace = Mage::helper('M2ePro/Component_Amazon')->getModel('Marketplace'); $collection = $marketplace->getCollection()->addFieldToFilter('status', Ess_M2ePro_Model_Marketplace::STATUS_ENABLE)->setOrder('group_title', 'ASC')->setOrder('sorder', 'ASC')->setOrder('title', 'ASC'); // --------------------------------------- $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Proceed'), 'onclick' => "MigrationNewAmazonHandlerObj." . "marketplacesSynchronizationAction(this)", 'class' => 'process_marketplaces_button')); $this->setChild('process_marketplaces_synchronization_button', $buttonBlock); // --------------------------------------- $this->setData('enabledMarketplaces', $collection->getData()); // --------------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { if (!$this->getParentBlock()) { Mage::throwException(Mage::helper('adminhtml')->__('Invalid parent block for this block')); } $payment = Mage::helper('emjainteractive_purchaseordermanagement/payment')->getCapturePayment($this->getOrder()); if ($payment->getId()) { $this->setPayment($payment); } else { $this->setData('payment', $payment); } Mage_Adminhtml_Block_Template::_beforeToHtml(); }
protected function _beforeToHtml() { // --------------------------------------- $nextStep = Mage::helper('M2ePro/Module_Wizard')->getWizard($this->getNick())->getNextStep(); $onClick = <<<JS WizardHandlerObj.setStep('{$nextStep}',setLocation.bind(window, location.href)); JS; // --------------------------------------- $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Register and Link to eBay'), 'onclick' => $onClick, 'class' => 'start_wizard_button')); $this->setChild('start_wizard_button', $buttonBlock); // --------------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { // Set data for form // --------------------------------------- $this->addData(array('step' => $this->helper('M2ePro/Module_Wizard')->getStep($this->getNick()), 'steps' => json_encode($this->helper('M2ePro/Module_Wizard')->getWizard($this->getNick())->getSteps()), 'status' => $this->helper('M2ePro/Module_Wizard')->getStatus($this->getNick()))); // --------------------------------------- // Initialization block // --------------------------------------- $this->setId('wizardInitialization'); // --------------------------------------- $this->setTemplate('M2ePro/wizard/initialization.phtml'); // --------------------------------------- return parent::_beforeToHtml(); }
protected function _beforeToHtml() { // --------------------------------------- $this->setData('account_id', Mage::helper('M2ePro/Component_Ebay')->getCollection('Account')->getLastItem()->getId()); // --------------------------------------- // --------------------------------------- $nextStep = Mage::helper('M2ePro/Module_Wizard')->getWizard($this->getNick())->getNextStep(); $onClick = <<<JS WizardHandlerObj.setStep('{$nextStep}',setLocation.bind(window, location.href)); JS; $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Create an M2E Pro Listing'), 'onclick' => $onClick, 'id' => 'create_listing_button')); $this->setChild('create_listing_button', $buttonBlock); // --------------------------------------- return parent::_beforeToHtml(); }