0

sales_flat_quote_item「wiid」というテーブルに新しい列を作成しました。製品フォームのウィッシュリストがカートに追加されたときに、このフィールドにデータを保存したいと考えています。だから、ここに私の MageWishlist_Model_Item があります:

$quote_item  = Mage::getModel('sales/quote_item')->load($cart->getQuote()->getItemByProduct($product)->getId());
//I log() this $quote_item and is returning the correct object
$quote_item_id = $quote_item->getId();
//Is returning the correct quote item id  from database
$wishlist_item_id = $this->getId();
//Is returnig the correct wishlist item id 
$quote_item->setWiid($wishlist_item_id);
$quote_item->save();

問題は上記の最後の 2 行にあります。データベースに保存されていません。

4

2 に答える 2

0

データベースに新しいフィールドを追加するたびに、バックエンドで「キャッシュ ストレージ」をフラッシュする必要があります。

于 2013-01-24T10:25:09.860 に答える