質問

私はクライアントに従って検索製品グリッドをカスタマイズしました販売順序の

私は "順序付けられた" ブロックの後に正常に新しいグリッドを作成しました。

カスタムグリッドの「商品の追加」をクリックした場合、カスタムグリッドのボタンをクリックすると、その選択された製品の製品IDと数量をカスタムコントローラファイルに入手しました。

私はそれらの製品を引用するために追加しようとしました、何も変わっていません。私はDunno、 "項目" ブロックの下で私のカスタムグリッドからこれらの選択された製品を追加する方法。

引用を追加するためのコードを次のコードを試してみました。

 $customer_id = 26; // set this to the ID of the customer.
 $customerObj = Mage::getModel('customer/customer')->load($customer_id);
 $quoteObj=Mage::getModel('sales/quote')->assignCustomer($customerObj);
 $quoteObj = $quoteObj->setStoreId(Mage::app()->getStore()->getId());
 $productModel=Mage::getModel('catalog/product');
 $productObj = $productModel->load($_id);
 $quoteItem = Mage::getModel('sales/quote_item')->setProduct($productObj);
 $quoteItem->setQty($qty);
 $quoteObj->addItem($quoteItem);
 $quoteObj->collectTotals();
 $quoteObj->save();
.

はわからない、そのブロックは引用済み製品を含む、または

選択された製品を "ブロックに選択された製品を追加する方法。

あなたの回答を熱心に待っています!

役に立ちましたか?

解決

私はロングハントの後に解を発見しました。

ProductGridAdDSelected()メソッドにProductGridAddSelected()メソッドを下のに渡した

order.productGridAddSelected(products);

製品配列はのようにする必要があります

製品[Product_ID]=数量;

ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top