开发者

What is the correct url helper for my cart in magento top links

开发者 https://www.devze.com 2023-02-28 04:35 出处:网络
I am trying to rearrange the order of the top links using a local.xml file and so far everything is going well, however for the cart I keep getting an non existent url.

I am trying to rearrange the order of the top links using a local.xml file and so far everything is going well, however for the cart I keep getting an non existent url.

At first I just added the block back into the top links in the following manner

<reference name="top.links.custom">
  <action method="addLink" translate="label title" module="customer"><label>Account</label><url helper="customer/getAccountUrl"/><title>Account</title><prepare/><urlParams/><position>130</position></action>

  <action method="addLink" translate="label title" module="customer"><label>Home</label><url helper="core/url/getHomeUrl"/><title>Home</title><prepare/><urlParams/><position>50</position></action>
  <block type="checkout/links" name="check_cart_link_custom">
    <action method="addCartLink"></action>
</block>

which worked by adding in my cart. So then I wanted to position it as the last link so I figured I could use the following snippet

<reference name="top.links.custom">
      <action method="addLink" translate="label title" module="customer">&开发者_开发知识库lt;label>Account</label><url helper="customer/getAccountUrl"/><title>Account</title><prepare/><urlParams/><position>130</position></action>
      <action method="addLink" translate="label title" module="customer"><label>Home</label><url helper="core/url/getHomeUrl"/><title>Home</title><prepare/><urlParams/><position>50</position></action>
      <action method="addLink" translate="label title" module="checkout"><label>Cart</label><url helper="checkout/cart/"/><title>Cart</title><prepare/><urlParams/><position>150</position></action>
</reference>

neither this or using "addCartLink" works.So what is the correct way to do use addLink for my cart in the toplinks?


Try the code below:

<action method="addLink" translate="label title" module="checkout">
    <label>Cart</label>
    <url helper="checkout/url/getCartUrl"/>
    <title>Cart</title>
    <prepare/>
    <urlParams/>
    <position>150</position>
</action>
0

精彩评论

暂无评论...
验证码 换一张
取 消