本文整理汇总了PHP中OrderSlip::addPartialSlipDetail方法的典型用法代码示例。如果您正苦于以下问题:PHP OrderSlip::addPartialSlipDetail方法的具体用法?PHP OrderSlip::addPartialSlipDetail怎么用?PHP OrderSlip::addPartialSlipDetail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderSlip
的用法示例。
在下文中一共展示了OrderSlip::addPartialSlipDetail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createPartialOrderSlip
public static function createPartialOrderSlip($order, $amount, $shipping_cost_amount, $order_detail_list)
{
$currency = new Currency($order->id_currency);
$orderSlip = new OrderSlip();
$orderSlip->id_customer = (int) $order->id_customer;
$orderSlip->id_order = (int) $order->id;
$orderSlip->amount = (double) $amount;
$orderSlip->shipping_cost = false;
$orderSlip->shipping_cost_amount = (double) $shipping_cost_amount;
$orderSlip->conversion_rate = $currency->conversion_rate;
$orderSlip->partial = 1;
if (!$orderSlip->add()) {
return false;
}
$orderSlip->addPartialSlipDetail($order_detail_list);
return true;
}