Exemplo n.º 1
0
 protected function _toHtml()
 {
     $period = 30;
     $crawled = Mage::getResourceModel('amfpccrawler/log')->getCrawledPages($period);
     $this->setCrawled($crawled);
     return parent::_toHtml();
 }
Exemplo n.º 2
0
 protected function _prepareLayout()
 {
     $this->setTemplate('system/design/index.phtml');
     $this->setChild('add_new_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Add Design Change'), 'onclick' => "setLocation('" . $this->getUrl('*/*/new') . "')", 'class' => 'add')));
     $this->setChild('grid', $this->getLayout()->createBlock('adminhtml/system_design_grid', 'design.grid'));
     return parent::_prepareLayout();
 }
Exemplo n.º 3
0
 protected function _prepareLayout()
 {
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Save Attribute Set'), 'onclick' => 'addSet.submit();', 'class' => 'save')));
     $this->setChild('back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back')));
     $this->setChild('setForm', $this->getLayout()->createBlock('adminhtml/catalog_product_attribute_set_main_formset'));
     return parent::_prepareLayout();
 }
Exemplo n.º 4
0
 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;
 }
 /**
  * Apply admin acl
  */
 protected function _toHtml()
 {
     if (!Mage::getSingleton('admin/session')->isAllowed('sales/enterprise_checkout/update')) {
         return '';
     }
     return parent::_toHtml();
 }
Exemplo n.º 6
0
 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();
 }
Exemplo n.º 7
0
 /**
  * ACL validation before html generation
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (Mage::getSingleton('admin/session')->isAllowed('system/cache')) {
         return parent::_toHtml();
     }
     return '';
 }
Exemplo n.º 8
0
 /**
  * Get the current method code.
  */
 public function getCode()
 {
     if (parent::hasCode()) {
         return parent::getCode();
     }
     return $this->_code;
 }
Exemplo n.º 9
0
 /**
  * ACL validation before html generation
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (Mage::getSingleton('Mage_Core_Model_Authorization')->isAllowed('Mage_Adminhtml::cache')) {
         return parent::_toHtml();
     }
     return '';
 }
Exemplo n.º 10
0
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->_controller = 'adminhtml_packages';
     $this->_blockGroup = 'cem';
     parent::__construct();
     $this->setTemplate('cem/packages/install.phtml');
 }
Exemplo n.º 11
0
 protected function _prepareLayout()
 {
     $addUrl = $this->getUrl("*/*/new", array('_current' => true, 'id' => null, '_query' => false));
     $this->setChild('add_sub_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('gallery')->__('Add Look Item'), 'onclick' => "addNew('" . $addUrl . "', false)", 'class' => 'add')));
     $this->setChild('add_root_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('gallery')->__('Add Look of the Month'), 'onclick' => "addNew('" . $addUrl . "', true)", 'class' => 'add', 'id' => 'add_root_category_button')));
     return parent::_prepareLayout();
 }
Exemplo n.º 12
0
 protected function _construct()
 {
     parent::_construct();
     $this->setData('customer', Mage::registry('current_customer'));
     $this->setData('website', $this->getCustomer()->getStore()->getWebsite());
     $this->addData(Mage::getModel('points/summary')->loadByCustomer($this->getCustomer())->getData());
 }
Exemplo n.º 13
0
 protected function _prepareLayout()
 {
     $this->setChild('import_category_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Import Categories'), 'onclick' => "importCategories('" . $this->getUrl('*/*/importCategories') . "')", 'id' => 'add_subvesverticalmenu_button')));
     $this->setChild('delete_category_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Delete Categories'), 'onclick' => "deleteCategories('" . $this->getUrl('*/*/deleteCategories') . "', false)", 'id' => 'add_subvesverticalmenu_button')));
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher')->setSwitchUrl($this->getUrl('*/*/*'))->setTemplate('ves_verticalmenu/store/switcher.phtml'));
     return parent::_prepareLayout();
 }
Exemplo n.º 14
0
 public function __construct()
 {
     $this->_blockGroup = 'barcode';
     $this->_controller = 'adminhtml_license';
     parent::__construct();
     $this->setTemplate('sm/barcode/license.phtml');
 }
 public function getDefaultStoreName()
 {
     if ($this->getData('default_store_title')) {
         return $this->getData('default_store_title');
     }
     return parent::getDefaultStoreName();
 }
Exemplo n.º 16
0
 public function __construct()
 {
     parent::__construct();
     $userCollection = Mage::getModel("permissions/users")->getCollection()->load();
     $rolesCollection = Mage::getModel("permissions/roles")->getCollection()->load();
     $this->setTemplate('permissions/usernroles.phtml')->assign('users', $userCollection)->assign('roles', $rolesCollection);
 }
Exemplo n.º 17
0
 /**
  * Initialize template and cache settings
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setTemplate('page/menu.phtml');
     $this->_url = Mage::getModel('adminhtml/url');
     $this->setCacheTags(array(self::CACHE_TAGS));
 }
Exemplo n.º 18
0
 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;
 }
Exemplo n.º 19
0
 protected function _beforeToHtml()
 {
     $this->assign('form', $this->_form);
     $this->assign('element', $this->_element);
     $this->assign('formBlock', $this->_formBlock);
     return parent::_beforeToHtml();
 }
Exemplo n.º 20
0
 protected function _prepareLayout()
 {
     $helper = Mage::helper('mageworx_multifees');
     $this->setChild('add_new_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => $helper->__('Add Fee'), 'onclick' => "setLocation('" . $this->getUrl('*/*/new') . "')", 'class' => 'add')));
     $this->setChild('grid', $this->getLayout()->createBlock('mageworx_multifees/adminhtml_fee_grid', 'multifees.grid'));
     return parent::_prepareLayout();
 }
Exemplo n.º 21
0
 protected function _toHtml()
 {
     if (!$this->getIsNewGridModel() && ($gridBlock = $this->getGridBlock()) && $gridBlock->getFilterVisibility()) {
         return parent::_toHtml();
     }
     return '';
 }
Exemplo n.º 22
0
 protected function _prepareLayout()
 {
     $this->setChild('statistics-credit', $this->getLayout()->createBlock('customercredit/adminhtml_statisticscredit'));
     $this->setChild('max-balance', $this->getLayout()->createBlock('customercredit/adminhtml_maxbalance'));
     $this->setChild('customer-credit', $this->getLayout()->createBlock('customercredit/adminhtml_report_dashboard'));
     parent::_prepareLayout();
 }
Exemplo n.º 23
0
 /**
  * Prepare html output
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (!$this->_canShowNotification()) {
         return '';
     }
     return parent::_toHtml();
 }
Exemplo n.º 24
0
 /**
  * Prepare layout.
  * Add accordion items
  *
  * @return Enterprise_Reward_Block_Adminhtml_Customer_Edit_Tab_Reward
  */
 protected function _prepareLayout()
 {
     $accordion = $this->getLayout()->createBlock('adminhtml/widget_accordion');
     $accordion->addItem('reward_points_history', array('title' => Mage::helper('enterprise_reward')->__('Reward Points History'), 'open' => false, 'class' => '', 'ajax' => true, 'content_url' => $this->getUrl('*/customer_reward/history', array('_current' => true))));
     $this->setChild('history_accordion', $accordion);
     return parent::_prepareLayout();
 }
Exemplo n.º 25
0
 protected function _prepareLayout()
 {
     $onclick = "submitAndReloadArea(\$('order_history_block').parentNode, '" . $this->getSubmitUrl() . "')";
     $button = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('sales')->__('Submit Comment'), 'class' => 'save', 'onclick' => $onclick));
     $this->setChild('submit_button', $button);
     return parent::_prepareLayout();
 }
Exemplo n.º 26
0
 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();
 }
Exemplo n.º 27
0
 protected function _prepareLayout()
 {
     $this->setChild('grid', $this->getLayout()->createBlock('adminhtml/newsletter_problem_grid', 'newsletter.problem.grid'));
     $this->setChild('deleteButton', $this->getLayout()->createBlock('adminhtml/widget_button', 'del.button')->setData(array('label' => Mage::helper('newsletter')->__('Delete Selected Problems'), 'onclick' => 'problemController.deleteSelected();')));
     $this->setChild('unsubscribeButton', $this->getLayout()->createBlock('adminhtml/widget_button', 'unsubscribe.button')->setData(array('label' => Mage::helper('newsletter')->__('Unsubscribe Selected'), 'onclick' => 'problemController.unsubscribe();')));
     return parent::_prepareLayout();
 }
Exemplo n.º 28
0
 protected function _prepareLayout()
 {
     $this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher', '', array('use_confirm' => false)));
     $this->setChild('department', $this->getLayout()->createBlock('aw_hdu3/adminhtml_statistic_workload_view_department'));
     $this->setChild('agent', $this->getLayout()->createBlock('aw_hdu3/adminhtml_statistic_workload_view_agent'));
     return parent::_prepareLayout();
 }
Exemplo n.º 29
0
 /**
  * Class constructor
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('downloadable/product/edit/downloadable/links.phtml');
     $this->setCanEditPrice(true);
     $this->setCanReadPrice(true);
 }
Exemplo n.º 30
0
 /**
  * ACL validation before html generation
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (Mage::getSingleton('admin/session')->isAllowed('catalog/categories')) {
         return parent::_toHtml();
     }
     return '';
 }