rss
twitter
    Find out what I'm doing, Follow Me :)

Tuesday, March 17, 2009

Pin It

Widgets

How to Rename The Top Links in Magento

Many times you found some demand or requirement from the client to change the top links of magento.

Yes, I am talking about top links.



You can rename this by two way

1) Searching this string in Magento's Core File (Never follow this)

Or

2) Magento has provide very good features of language management. you can rename any text by adding it's replacement text in translate.csv file

You will get this file in /app/design/frontend/default/[theme_name]/locale/en_US/ folder. You have to enter all substitute of text in every new line. In csv file, first mention the text that you want to change and after putting comma(,) mention it's replacement text.

for example,

To change "My Cart" to "My Bag", you have to insert line as

"My Cart","My Bag"

I am here mentioning some advance language replacement for you.

1) When you add any product in cart, top link will display like "My Cart (1 item)". now if you want to change this string to like "My Cart (1 item)" then you can do it by writing below code in csv file

"My Cart (%s item)","My Cart <b class='redfont'>(%s item)</b>"

2) When you add any product in wishlist, top link will display like "My Wishlist (1 item)". now if you want to change this string to like "My Wishlist (1 item)" then you can do it by writing below code in csv file

"My Wishlist (%d item)","My Wishlist <b class='redfont'>(%d item)</b>"

Hope, this will help to someone like me

thanks

11 comments:

  1. Thankyou! Could not find this in Magentos forum anywhere.

    ReplyDelete
  2. Fantastic!

    Do you happen to know if there's also a way to change the order of the top links?

    ReplyDelete
  3. My log in link and wishlist are not working in fact the log in link has dissappeared all together any ideas, I cannot find anythingn in the magento forums??

    www.premiertablelinens.com

    ReplyDelete
  4. How can I change the css for selected top menu(Active menu). e.g. If My Wishlist is selected then "My Wishlist" should be in different color or style.

    ReplyDelete
  5. Any idea on how to change the Shopping cart link at the top of magento?

    ReplyDelete
  6. This didn't work for me... no change at all to the 'My Cart' text in the top links.

    ReplyDelete
  7. Thanks!!
    very helpful!:)

    you can check this site too for more useful info :)

    http://www.magento-developer.net/

    ReplyDelete
  8. Thanks for this, I never realised you could change so many bits of text through the language management in Magento. The first thing I did was to remove all the My's from all over the place!

    ReplyDelete
  9. thank you so much . this article is rare in the net

    ReplyDelete
  10. It's worth mentioning that Magento won't recognize the CSV line unless there's a newline character at the end. For once trailing whitespace is your friend!

    ReplyDelete