本文整理汇总了PHP中OrderItem::updateOrderItemWithProductAnswers方法的典型用法代码示例。如果您正苦于以下问题:PHP OrderItem::updateOrderItemWithProductAnswers方法的具体用法?PHP OrderItem::updateOrderItemWithProductAnswers怎么用?PHP OrderItem::updateOrderItemWithProductAnswers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderItem
的用法示例。
在下文中一共展示了OrderItem::updateOrderItemWithProductAnswers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addproductquestionsanswer
/**
* processes a form and
* adds product question answer(s) to order item.
* The answers are added as HTML and JSON
* and redirects back to the previous page or a set BackURL
* (set in the form data)
* @param Array $data - form data
* @param Form form - data from the form
*/
function addproductquestionsanswer($data, $form)
{
$this->getProductQuestionOrderItem();
$data = Convert::raw2sql($data);
if ($this->productQuestionOrderItem) {
$this->productQuestionOrderItem->updateOrderItemWithProductAnswers($answers = $data["ProductQuestions"], $write = true);
}
if (isset($data["BackURL"])) {
$this->owner->redirect($data["BackURL"]);
} else {
$this->owner->redirectBack();
}
}
开发者ID:helpfulrobot,项目名称:sunnysideup-ecommerce-product-questions,代码行数:22,代码来源:ProductQuestion_ProductControllerDecorator.php