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.
こんにちは、デフォルトの SKU 番号の代わりにカタログ番号を取得するにはどうすればよいですか?
$product = Mage::getModel('catalog/product')->loadByAttribute('sku',$str);
上記のコードは SKU 番号でアイテムを取得しますが、カタログ番号に基づいてアイテムを取得するにはどうすればよいですか?
ありがとう
ここで質問する前に、ご自分で色々調べられたようですね…
カタログ番号は entity_id を参照していますか?
もしそうなら、単純に:$product = Mage::getModel('catalog/product')->load($entityId);
$product = Mage::getModel('catalog/product')->load($entityId);