magento - 我的帐户仅在登录后显示

标签 magento

我想更改顶部链接 在默认情况下设置magento显示

我的帐户 |我的愿望 list |我的购物车 |结帐 |登录

我需要更改顶部链接,仅在用户登录后才显示“我的帐户”链接

感谢帮助

最佳答案

在您的主题的 customer.xml 中,它看起来像

 <default>
        <!-- Mage_Customer -->
        <reference name="top.links">
            <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
        </reference>
    </default>
<customer_logged_in>
    <reference name="top.links">
        <action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
    </reference>
</customer_logged_in>

将我的帐户链接从 default 标记删除到 Customer_logged_in

更改它

更改 customer.xml 后

<default>
        <!-- Mage_Customer -->
        <reference name="top.links">

        </reference>
    </default>

<!--
Load this update on every page when customer is logged in
-->

<customer_logged_in>
    <reference name="top.links">
     <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
        <action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
    </reference>
</customer_logged_in>

希望这一定会对您有所帮助。

关于magento - 我的帐户仅在登录后显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18528961/

相关文章:

php - Magento 季节性主题时间表?

php - Magento 编程 : Getting list of all Manufacturers and corresponding Manufacturer ID

model - 无法覆盖 Magento 中的核心模型

magento - Magento 类(class)的长度有限制吗?

magento - 根据使用Varnish和Magento的cookie中存储的变量创建缓存

Magento 不运行 SQL 安装/更新脚本

magento - 获取产品更改

templates - 为什么 Magento 中的局部变量有一个下划线前缀?

php - 如何在 Magento 仪表板图中显示挂单

magento - Magento 中的这两个事件有什么区别?