Magento的。如何以编程方式设置自定义选项(复选框)的数据并在购物车中添加简单的产品?

时间:2015-11-04 05:28:21

标签: php magento magento-1.7 magento-1.9 magento-1.8

以下是我为简单产品的自定义选项设置数据的方法

     $arrProducts = array(
        array(
            "product_id" => 8,
            "qty" => 1,
            "options" => array(
                '1' => 'cheese',
                '2' => 'tomato'
                )
            )
        )
    );

但我收到错误

请指定所需的产品选项。

enter image description here

1 个答案:

答案 0 :(得分:0)

您需要将数据设置为略有不同: please see explain here

and here

祝你好运!

相关问题