我想检查哪个商店ID当前处于活动状态,并显示商店ID是例如1
我现在的代码是:
<?php if (Mage::getModel('core/store')->load($storeId) == 9): ?>
//code here
<?php endif; ?>
但无论商店ID是什么,它总是返回if代码。我认为问题出在“==”检查中。有人能告诉我正确的语法是什么吗?
答案 0 :(得分:1)
答案 1 :(得分:1)
<?php if (Mage::app()->getStore()->getStoreId() == 9): ?>
在你的情况下