本文整理汇总了PHP中Mage_Adminhtml_Block_Store_Switcher类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Store_Switcher类的具体用法?PHP Mage_Adminhtml_Block_Store_Switcher怎么用?PHP Mage_Adminhtml_Block_Store_Switcher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_Adminhtml_Block_Store_Switcher类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSwitchUrl
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();
}
示例2: __construct
/**
* Add website filter
*/
public function __construct()
{
parent::__construct();
$this->setUseConfirm(false);
if ($this->_getCustomer()->getSharingConfig()->isWebsiteScope()) {
$this->setWebsiteIds($this->_getCustomer()->getSharedWebsiteIds());
}
}
示例3: __construct
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'));
}
示例4: __construct
/**
* Set overriden params
*/
public function __construct()
{
parent::__construct();
$this->setUseConfirm(false)->setSwitchUrl($this->getUrl('*/*/*', array('store' => null)));
}
示例5: _prepareLayout
/**
* Prepare sales data collection
*
* @return Mage_XmlConnect_Block_Adminhtml_Connect_Dashboard_SalesInfo
*/
protected function _prepareLayout()
{
$this->registerStoreSwitcher();
return parent::_prepareLayout();
}
示例6: _toHtml
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;
}
示例7: __construct
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->setTemplate('catalog/product/edit/websites.phtml');
}
示例8: __construct
public function __construct()
{
parent::__construct();
$this->setId('sc_store_select');
}
示例9: __construct
public function __construct()
{
parent::__construct();
$this->setDefaultStoreName($this->__('Default Store (%s)', AO::app()->getDefaultStoreView()->getName()))->setUseConfirm(false)->setSwitchUrl($this->getUrl('*/*/*', array('store' => null)));
}
示例10: getStoreSwitcherHtml
public function getStoreSwitcherHtml()
{
if ($this->_storeSwitcher) {
return $this->_storeSwitcher->toHtml();
}
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->setId('sc_store_select');
$this->setTemplate('sales/order/create/store/select.phtml');
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->setTemplate('styla/connect/adminhtml/hint/summary.phtml');
}
示例13: __construct
/**
* Set overriden params
*/
public function __construct()
{
parent::__construct();
$this->setTemplate('hideprice/store/switcher.phtml');
$this->setUseConfirm(false);
}