我正在研究 magento 1.7 。我需要在 sales_flat_quote_item_option 表中插入数据。我尝试使用以下代码:-
$customerId= Mage::helper('customer')->getCustomer()->getId();
$product_id = $_REQUEST['id1'];
$model = Mage::getModel('catalog/product');
$_product = $model->load($product_id);
$quoteObj=Mage::getModel('sales/quote')->assignCustomer($customerId);
$option = array('options'=>array(
"option_id1" => 'option_value1',
"option_id2" => 'option_value2'
));
$request = new Varien_Object();
$request->setData($option);
$quoteObj->addProduct($productObj,$request);
但无法在此表中插入数据。实际上此表包含自定义选项值。II 没有自定义选项,因此只需在此表中插入来自另一个表单的另一个值。有人可以帮助我吗?