- 浏览: 73583 次
- 性别:
- 来自: 上海
最新评论
In Block class:
In template(phtml):
public function _toHtml(){ Mage::getSingleton('customer/session')->setBeforeAuthUrl($this->getRequest()->getRequestUri()); if (!Mage::getSingleton('customer/session')->isLoggedIn()){ header("Status: 301"); header('Location: '.$this->getUrl('customer/account/login')) ; // send to the login page exit; } }
In template(phtml):
Mage::getSingleton('customer/session')->setBeforeAuthUrl($this->getRequest()->getRequestUri()); if (!Mage::getSingleton('customer/session')->isLoggedIn()){ header("Status: 301"); header('Location: '.$this->getUrl('customer/account/login')) ; // send to the login page exit;
发表评论
-
Magento随机生成sales rule的coupon code
2013-01-02 22:09 2274在Magento中可以使用SalesRule模块下的Mage_ ... -
Magento 后台配置中实现日期选择 (Date picker)
2012-12-28 15:07 2514首先,创建一个新的Form Field 类: <?p ... -
获得指定customer 购买的产品数据
2011-12-10 20:54 1376获得指定customer 购买的产品信息,如果是configu ... -
将缺货产品放在产品列表后面
2011-12-10 20:50 1402Rewrite Mage_Catalog_Model_Laye ... -
Mac Lion上安装配置Nginx PHP PHP-FPM
2011-12-10 16:01 8038<!--?xml version="1.0&q ... -
How to customize Magento as CMS system (1.5.0 CE)
2011-03-06 22:42 1068Before install: 1. Go to app/et ... -
Use call back function to proccess Magento large collection
2011-01-19 12:58 949$orders = Mage::getModel('sal ... -
How to remove unnecessary columns in Magento collection
2011-01-19 12:56 1140$orders = Mage::getModel('sal ... -
How to calculate currency according to reward points rate in Magento
2011-01-13 18:03 1339$rate = Mage::getModel('enter ... -
Magento二次开发的利器:Rewrite
2010-12-08 17:15 2742Magento是一个十分优秀的电子商务系统,但是有时候我们需要 ... -
增加Magento后台管理功能三:在后台设置(System/Configuration)中加入自定义设置
2010-11-30 16:17 1981在模块的etc目录下新建system.xml配置文件,内容如下 ... -
增加Magento后台管理功能二:开发后台Controller
2010-11-30 16:02 2714在模块的controllers目录下创建Adminhtml目录 ... -
增加Magento后台管理功能一:在后台管理界面加入菜单
2010-11-30 15:47 4543在模块的etc目录下增加adminhtml.xml配置文件,用 ... -
Magento在CMS Page中增加用户信息变量
2010-11-26 10:14 2836Magento的cms页面和static block页面中可以 ... -
Magento根据不同的浏览器自动切换package或 theme
2010-11-26 10:05 2077在后台设置中: System > Configurat ... -
Magento让后台数据列表中的action列链接在新窗口打开
2010-11-08 16:56 1169'actions' => array( ... -
Maegen获得后台当前用户的信息
2010-11-08 16:53 930$admin = Mage::getSingleton(' ... -
Magento中用子类替换Block
2010-10-15 10:47 1861Step 1:创建一个新的Module Step 2: 编辑模 ... -
Magento中添加带有选项的属性
2010-10-14 14:49 1459下面的代码为Customer实体添加了性别属性,有两个可选值 ... -
Magento为后台用户保存操作日志(企业版)
2010-09-19 17:00 2770protected function _logAdm ...
相关推荐
How to use epoll A complete example in C How to use epoll A complete example in C How to use epoll A complete example in C How to use epoll A complete example in C
how to work with crystal report in sap business one
The best-selling C++ How to Program is accessible to readers with little or no programming experience, yet comprehensive enough for the professional programmer. The Deitels’ signature live-code ...
You should ensure that the server's public keys are loaded by the client as described in How to use SFTP (with server validation - known hosts), or you may want to switch off server validation to get ...
SMB-HOWTO (12KB) Session Message Block (SMB) protocol Sound-HOWTO (29KB) 在Linux下的关於音效的支援. Sound-Playing-HOWTO (14KB) Linux上播放各式声音格式的应用程式. UPS-HOWTO (12KB) 如何...
Polya reveals how the mathematical method of demonstrating a proof or finding an unknown can be of help in attacking any problem that can be "reasoned" out - from building a bridge to winning a game ...
how-to-c-response, 对"How to C in 2016"的评论 Matt Matt ,Sat,Sat,Sat,updated,updatedMatt ( 据我所知他的网站没有提到他最近的NAME ) 写了一篇文章。 它被链接到来自和黑客新闻的链接;后者是我看到的。...
PDFlib-in-.NET-HowTo pdflibnet
It introduces how to setup for OpenMP in Visual Studio 2005 with Inter Fortran 10.1. With a simple 'Hello world ' example
The best-selling C++ How to Program is accessible to readers with little or no programming experience, yet comprehensive enough for the professional programmer. The Deitels’ signature live-code ...
演示如何在NetBeansIDE5.5连接SQL Server 2000 本文件为flash
Exploiting Software - How to Break Code.rar
Whether at work, at school, or in our personal endeavors, there’s a deepening (and inescapable) need for people to work with and understand information. Information architecture is the way that we ...
paths and layers Build web files Master the basics of Photoshop with the visual examples and easy-to-follow lessons in How to Use Photoshop CS 2. <br> ...
How to Make Your Own Keylogger in C++ Programming Language 英文mobi 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除