Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
現在アクティブなストア ID を確認し、ストア ID がたとえば 1 であることを示したい
私が今持っているコードはこれです:
<?php if (Mage::getModel('core/store')->load($storeId) == 9): ?> //code here <?php endif; ?>
ただし、ストア ID に関係なく、常に if コードを返します。問題は「==」チェックにあると思います。誰かが正しい構文を教えてもらえますか?
現在の店舗情報を取得するには
Mage::app()->getStore()->getStoreId();
これはもっと説明します
Magentoでストア情報を取得する方法は?
<?php if (Mage::app()->getStore()->getStoreId() == 9): ?>
あなたの場合