Voucher
来源:互联网 发布:公务员网络安全管理 编辑:程序博客网 时间:2024/05/11 12:46
D:\website\woowj\app\design\frontend\base\default\layout\customer.xml
<block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action> <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action> <action method="addLink" translate="label" module="customer"><name>account_voucher</name><path>customer/account/voucher/</path><label>Voucher</label></action> <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action> </block>
D:\website\woowj\app\code\core\Mage\Customer\controllers\AccountController.php
public function voucherAction() { $this->loadLayout(); $this->_initLayoutMessages('customer/session'); $this->_initLayoutMessages('catalog/session'); $block = $this->getLayout()->getBlock('customer_edit'); if ($block) { $block->setRefererUrl($this->_getRefererUrl()); } $data = $this->_getSession()->getCustomerFormData(true); $customer = $this->_getSession()->getCustomer(); if (!empty($data)) { $customer->addData($data); } if ($this->getRequest()->getParam('changepass') == 1) { $customer->setChangePassword(1); } $this->getLayout()->getBlock('head')->setTitle($this->__('Account Information')); $this->getLayout()->getBlock('messages')->setEscapeMessageFlag(true); $this->renderLayout(); }
D:\website\woowj\app\design\frontend\base\default\template\customer\form\voucher.phtml
新增插件
D:\website\woowj\app\etc\modules\Voodoo_News.xml
0 0