Php 在客户帐户中添加激活的我的订单链接
现在在默认的magento中,当客户登录到他/她的帐户时,显示给客户的活动菜单是帐户仪表板 我想在客户登录帐户时显示我的订单。 我使用了这种代码的和平Php 在客户帐户中添加激活的我的订单链接,php,magento,magento-1.9.1,Php,Magento,Magento 1.9.1,现在在默认的magento中,当客户登录到他/她的帐户时,显示给客户的活动菜单是帐户仪表板 我想在客户登录帐户时显示我的订单。 我使用了这种代码的和平 <customer_account> <reference name="customer_account_navigation"> <action method="setActive"><name>orders</name><path>sales/or
<customer_account>
<reference name="customer_account_navigation">
<action method="setActive"><name>orders</name><path>sales/order/history/</path></action>
</reference>
</customer_account>
订单销售/订单/历史记录/
但它不起作用。请给我建议任何解决方案或给我一个替代方案 您可以在控制器中尝试以下代码
$this->loadLayout();
// add layout handle so that we will have the customer navigation on the right hand side
$layout = $this->getLayout();
$update = $layout->getUpdate();
$this->addActionLayoutHandles();
$update->addHandle('customer_account'); // add the customer navigation bar on the side
$this->loadLayoutUpdates();
$this->generateLayoutXml();
$this->generateLayoutBlocks();
$navigationBlock = $layout->getBlock('customer_account_navigation');
// make sure we have an instantiation
if ($navigationBlock) {
$navigationBlock->setActive('path/to/highlight'); // example: 'customer/address'
}
$this->_isLayoutLoaded = true;
// render the layout
$this->renderLayout();
所以,请尝试一下,如果有任何疑问,请告诉我
谢谢打开
app\code\core\Mage\Customer\controllers\AccountController.php
在public functionloginpostation()
中找到code$this->\u loginPostRedirect()
,然后
替换为
$this->_重定向('sales/order/history/')代码>哪个控制器?我没有使用自定义模块的第三方和第三方。因此,我是否应该通过编写来更改核心控制器,如果是,请告诉我控制器名称