本文整理汇总了PHP中CSaleOrder::makeOrderArray方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrder::makeOrderArray方法的具体用法?PHP CSaleOrder::makeOrderArray怎么用?PHP CSaleOrder::makeOrderArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleOrder
的用法示例。
在下文中一共展示了CSaleOrder::makeOrderArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$bFirst = false;
}
}
if (IntVal($arUserResult["PAY_SYSTEM_ID"]) > 0 && empty($arResult["PAY_SYSTEM"][$arUserResult["PAY_SYSTEM_ID"]])) {
$bF = true;
foreach ($arResult["PAY_SYSTEM"] as $k => $v) {
if ($bF) {
$arResult["PAY_SYSTEM"][$k]["CHECKED"] = "Y";
$arUserResult["PAY_SYSTEM_ID"] = $arResult["PAY_SYSTEM"][$k]["ID"];
$bF = false;
}
}
}
}
//calculate delivery discount
$deliveryOrderData = CSaleOrder::makeOrderArray(SITE_ID, $USER->GetID(), $arResult["BASKET_ITEMS"]);
$deliveryOrderData = array_merge($deliveryOrderData, $arUserResult);
if (!empty($arResult["DELIVERY"]) && is_array($arResult["DELIVERY"])) {
foreach ($arResult["DELIVERY"] as $deliveryKey => $deliveryData) {
if (!empty($deliveryData['PRICE'])) {
// calculate discount price
$orderDeliveryPriceData = $deliveryOrderData;
$orderDeliveryPriceData['PRICE_DELIVERY'] = $orderDeliveryPriceData['DELIVERY_PRICE'] = $deliveryData["PRICE"];
$orderDeliveryPriceData['DELIVERY_ID'] = $deliveryData['ID'];
CSaleDiscount::DoProcessOrder($orderDeliveryPriceData, array(), $arErrors);
if (floatval($orderDeliveryPriceData['DELIVERY_PRICE']) > 0 && $deliveryData["PRICE"] != $orderDeliveryPriceData['DELIVERY_PRICE']) {
$arResult["DELIVERY"][$deliveryKey]['DELIVERY_DISCOUNT_PRICE'] = $orderDeliveryPriceData['DELIVERY_PRICE'];
$arResult["DELIVERY"][$deliveryKey]["DELIVERY_DISCOUNT_PRICE_FORMATED"] = SaleFormatCurrency($orderDeliveryPriceData['DELIVERY_PRICE'], $arResult["BASE_LANG_CURRENCY"]);
}
}
}