public function getSwitchUrl()
 {
     if ($name = Mage::registry('aw_advancedreports_additional_name')) {
         return $this->getUrl('*/*/*', array('_current' => true, 'store' => null, 'website' => null, 'group' => null, 'name' => $name));
     }
     return parent::getSwitchUrl();
 }
Example #2
0
 /**
  * Add website filter
  */
 public function __construct()
 {
     parent::__construct();
     $this->setUseConfirm(false);
     if ($this->_getCustomer()->getSharingConfig()->isWebsiteScope()) {
         $this->setWebsiteIds($this->_getCustomer()->getSharedWebsiteIds());
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('downloads/switcher_store.phtml');
     $this->setUseConfirm(true);
     $this->setUseAjax(true);
     $this->setDefaultStoreName(Mage::helper('downloads')->__('All Store Views'));
 }
Example #4
0
 /**
  * Set overriden params
  */
 public function __construct()
 {
     parent::__construct();
     $this->setUseConfirm(false)->setSwitchUrl($this->getUrl('*/*/*', array('store' => null)));
 }
Example #5
0
 /**
  * Prepare sales data collection
  *
  * @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_SalesInfo
  */
 protected function _prepareLayout()
 {
     $this->registerStoreSwitcher();
     return parent::_prepareLayout();
 }
 protected function _toHtml()
 {
     if (strpos(Mage::app()->getRequest()->getControllerName(), 'report') !== false) {
         // ... and 1.3 (other) versions
         return $this->_toHtmlReports();
     }
     // the next code will work for all store selectors except reports
     $sHtml = parent::_toHtml();
     $role = Mage::getSingleton('aitpermissions/role');
     if ($role->isPermissionsEnabled()) {
         $AllowedStoreviews = $role->getAllowedStoreviewIds();
         if (!empty($AllowedStoreviews)) {
             if (!in_array(Mage::app()->getRequest()->getParam('store'), $AllowedStoreviews)) {
                 $url = Mage::getModel('adminhtml/url');
                 Mage::app()->getResponse()->setRedirect($url->getUrl('*/*/*', array('_current' => true, 'store' => $AllowedStoreviews[0])));
             }
         }
         // removing <option value="">All Store Views</option> option if have limited access
         $sHtml = preg_replace('@<option value="">(.*)</option>@', '', $sHtml);
     }
     // enhanced switcher is used on categories page
     if (preg_match('@varienStoreSwitcher@', $sHtml)) {
         $sHtml .= '
         <script type="text/javascript">
         try
         {
             Event.observe(window, "load", varienStoreSwitcher.optionOnChange);
         } catch (err) {}
         </script>
         ';
     }
     return $sHtml;
 }
Example #7
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('catalog/product/edit/websites.phtml');
 }
Example #8
0
 public function __construct()
 {
     parent::__construct();
     $this->setId('sc_store_select');
 }
 public function __construct()
 {
     parent::__construct();
     $this->setDefaultStoreName($this->__('Default Store (%s)', AO::app()->getDefaultStoreView()->getName()))->setUseConfirm(false)->setSwitchUrl($this->getUrl('*/*/*', array('store' => null)));
 }
Example #10
0
 public function getStoreSwitcherHtml()
 {
     if ($this->_storeSwitcher) {
         return $this->_storeSwitcher->toHtml();
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->setId('sc_store_select');
     $this->setTemplate('sales/order/create/store/select.phtml');
 }
Example #12
0
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('styla/connect/adminhtml/hint/summary.phtml');
 }
Example #13
0
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('advancedreports/store/switcher.phtml');
 }
Example #14
0
 /**
  * Set overriden params
  */
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('hideprice/store/switcher.phtml');
     $this->setUseConfirm(false);
 }