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.
私は興味深い問題に悩まされている開発者です。カートに追加された単純な製品の在庫データを取得しようとしています。簡易商品は、構成可能商品の商品ページから追加します。$observer->getEvent()->getProduct() のプロパティを見ると、製品データが単純な製品ではなく構成可能な製品のデータであるかのように見えますが、これは意味がありません。助言がありますか?
これは私の頭の中にあるものですが、もっとエレガントな方法があるかもしれません:
$productId = $configurableProduct->getOptionByCode('simple_product')->getProductId(); $simple = Mage::getModel('catalog/product')->load($productId);