Magento安装流程概述
来源:互联网 发布:费曼 知乎 编辑:程序博客网 时间:2024/04/29 04:04
Magento安装流程概述
安装包括License、时区设置、数据库设置、管理员设置、完成页面。安装的步骤在app\code\core\Mage\Install\etc\install.xml当中,需要增加一个步骤,首先在该文件中添加一个节点。
1.License对应于app\code\core\Mage\Install\controllers \WizardController.php中beginAction函数,对应Block/Begin.php和app\design\install \default\default\template\install\begin.phtml文件。读取更目录下的LICENSE.html中的文件内容。
2.时区和上面的情况类似,通过Zend Locale获取数据,在用户选择后,在Session中进行保存。
Mage::getSingleton(‘install/session’)->setContactData($data);
3.数据库配置Block和模板文件和上面类似。提交之后,会执行 Mage_Core_Model_Resource_Setup::applyAllUpdates();要求每个模块安装数据库,同时进行数据库的更新操作。最后将第二步的时区信息更新到core_config_data表中。
4.设置管理员相关性信息提交后,密码c12dac875064706cd59ff78ee4ee6b24:KI,表示最后两个字符KI和密码连接,然后再进行md5,最终得到前面32个字符。
5.最后一步的Block和模板文件和上面类似。
1.如果需要新增加一个步骤,那么先在install.xml中增加一个步骤,安装程序根据先后顺序一步一步执行的。
2.然后在WizardController.php中增加对应的相应处理函数,可以仿照其他函数的写法。不带任何处理方法,只显示前台的函数如下:
public function contactAction(){ $this->_checkIfInstalled(); $this->setFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT, true); $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); $this->_prepareLayout(); $this->_initLayoutMessages('install/session'); $this->getLayout()->getBlock('content')->append( $this->getLayout()->createBlock('install/contact', 'install.contact') ); $this->renderLayout();}
3.这个时候前台显示有左边栏目,但是没有右边的内容,需要新建对应的block。如上代码新建app\code\core\Mage\Install\Block\Contact.php文件,基本内容可以如下:
class Mage_Install_Block_Contact extends Mage_Install_Block_Abstract{ public function __construct() { parent::__construct(); $this->setTemplate('install/contact.phtml'); } public function getPostUrl() { return $this->getCurrentStep()->getNextUrl(); }}
4.前台仍然没有内容,因为没有对应的模板文件。新建E:\xampp\htdocs\shop\magento1401mod\app\design \install\default\default\template\install\contact.phtml,内容可以参考其他目录下的相同文件。
5.提交之后会自动跳转到下一步,但是在跳转之前,需要在下一步的处理函数中增加对应的处理语句。
如时区信息首先存储在Session信息中,在数据库新建之后才手动插入到数据库中。
if ($data = $this->getRequest()->getQuery('config')) { Mage::getSingleton('install/session')->setLocaleData($data);}
- Magento安装流程概述
- Magento概述
- magento 安装
- Magento订单流程小记
- 详解Magento执行流程
- Magento的MVC流程
- magento 流程 手稿
- magento执行流程
- 流程概述
- magento - 安装新的支付模块却导致onepage支付流程无法使用
- Magento 模块加载流程--重要
- Magento 程序架构与流程
- 本地安装Magento教程
- 手工安装magento
- magento下载安装
- Magento安装总结
- magento的模板安装
- Magento安装心得
- ubuntu 删除unity
- 【计算几何】信号覆盖
- 将Asp.netMVC3网站通过iis6.0发布到window server 2003中
- android后台进程
- 安卓源码
- Magento安装流程概述
- ios5 目录1-15
- java环境变量配置
- 【资源推荐】Computer Vision 引文列表
- 用 prototype 定义自己的方法
- 素数环 dfs
- Linux下minicom的配置和使用方法
- [转]openwrt makefile
- poj 1011 sticks