在前面讲magento的多店配置的时候,简单讲了下websitename,store和store view的区别.
后面就有朋友问我如何获取当前界面的值.下面是代码:
获取store的id:

< ?php echo Mage::app()->getStore()->getId(); ?> 

知道了第一个,其他也就简单了.下面是获取当前store view name的值:

< ?php echo  Mage::app()->getStore()->getName(); ?> 

->getGroup()->getName()不多说:

< ?php echo  Mage::app()->getStore()->getGroup()->getName(); ?> 

获取网站名:

< ?php echo  Mage::app()->getWebsite()->getName(); ?> 

关于作者

专注于电商,magentochina站长
shuai.zend一共有82篇博文

1 Comment

  • shi 说:

    你说的好像都只能获取store的信息,而不能获取store view的信息。能不能获取在后台产品编辑时的当前store view

发表评论

电子邮件地址不会被公开。 必填项已被标记为 *

*

TOP Online Store
1.Girls' Generation, a Fantasy Jewelry online Store. Nobody Can Keep Away From the Beauty:tiffany ca 2.China Wholesale Electronics:China Wholesale Electronics 3.The android phone is best:Android sale.The Android Ice cream sandwich well be best Android OS. 4.R4 3DS for sale:R4 ds shops,and support Japanese R4:R4 販売. 5.fashion bag:armani watches and MBT shoes.
R4 V1.4.2 and your R4i Gold 1.4.2 and R4i GOLD 3DS card V1.4.2 can not work on it.
Please update your R4i Gold 1.4.2 and R4i GOLD 3DS card V1.4.2 card with this patch. Please read readme.txt attached firstly.Just do as the procedures listed in readme.