Skip to content

Remove the from_store link when changing store views/languages in Magento

August 31, 2011

By default, on the store views list (usually for languages), Magento creates links to the different views but it also adds the “from_store” parameter. It seems that SEO guys don’t like this too much.

If you need to remove it, search on your theme templates for the “select_language” string. Usually, this is on the header.phtml, but depending on the theme, it can be placed in other places. So you can look for it using grep:

cd var/app/design/frontend #go to the theme folder

grep -r “select_language” ./

You’ll find you phtml with this string. Close to that string you’ll find the function: $_lang->getCurrentUrl(), change it to: $_lang->getCurrentUrl(false).

Note: Indeed, you can look for this function direcly, but try to not modify core files (including core themes).

That’s all!

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: