【问题标题】:Magento. How to set data for custom options(checkbox) programatically and add simple product in cart?Magento。如何以编程方式为自定义选项(复选框)设置数据并在购物车中添加简单产品?
【发布时间】:2016-02-04 12:05:16
【问题描述】:

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

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

但我收到一个错误

请指定产品所需的选项。

【问题讨论】:

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


    【解决方案1】:

    您需要稍微不同地设置数据: please see explain here.

    and here.

    祝你好运!

    【讨论】:

      猜你喜欢
      • 2016-02-04
      • 2018-06-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-06
      • 1970-01-01
      • 2023-03-09
      相关资源
      最近更新 更多