如何以编程方式创建订单时保存自定义选项字段值?

时间:2014-05-28 08:37:00

标签: php magento

我一直在尝试以编程方式创建订单,除了自定义选项外,它运行良好。

我有一个自定义选项,其引用ID为 435 。我尝试了以下内容。但它似乎无法正常工作

$order->setData(array(
'options' => array(
     435 => $customvalue,

     )

));

我从here

得到了上述建议

如何以编程方式创建订单时保存自定义选项字段值?

1 个答案:

答案 0 :(得分:0)

我从here

得到了我的问题的答案

它的工作摇滚

$existentOptions['additional_options'][] = array(
'label' => $optiontitle, // Title of custom option field
'value' => $customvalue,  // Value of custom option field
);

有关详细信息,请查看my blog here

相关问题