Magento – how to get the store name in CMS page – Magento 1.9

magento-1.9

I have multistore. 1. shoes.com, 2. shirt.com

Both of them have the same content, but the only difference is the name of the store (i.e shoes.com and shirt.com)

I don't want to create the same pages just for multiple store.
Is there a way, we can use the same page and use some code, might be like this {{storename}}, and its render on front-end.

Best Answer

In phtml:

Gets the current store's name

$storeName = Mage::app()->getStore()->getName();

In Cms:

Gets the current store's name

{{config path="general/store_information/name"}}

Nb: dont forget to config the name of your store in : admin->system->configuration, general->store information select the store in top left corner and set the name of your store that you want to show.

Related Topic