タグ付けされた質問 「nominal-product」

3
カートに商品を追加すると、「商品の在庫アイテムが無効です」というエラーが発生しますか?
名目上の商品をプログラムでショッピングカートに追加しています。しかし、それは例外をスローします'The stock item for Product is not valid.'。どうすればこれを解決できますか? 注:$productこの関数に正しく渡されています。 私のコードは次のとおりです。 /** * Add air product to the cart. */ public function addSubscriptionToCart($product) { try { // Create cart instance. $cart = Mage::getModel('checkout/cart'); // Initialize the cart. $cart->init(); $cart->addProduct($product, array('product_id' => $product->getId(), 'qty' => 1)); // This line causes the error. …
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.