当前位置: 首页>>代码示例>>PHP>>正文


PHP OrderSlip::addSlipDetail方法代码示例

本文整理汇总了PHP中OrderSlip::addSlipDetail方法的典型用法代码示例。如果您正苦于以下问题:PHP OrderSlip::addSlipDetail方法的具体用法?PHP OrderSlip::addSlipDetail怎么用?PHP OrderSlip::addSlipDetail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OrderSlip的用法示例。


在下文中一共展示了OrderSlip::addSlipDetail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createOrderSlip

 public static function createOrderSlip($order, $productList, $qtyList, $shipping_cost = false)
 {
     $currency = new Currency($order->id_currency);
     $orderSlip = new OrderSlip();
     $orderSlip->id_customer = (int) $order->id_customer;
     $orderSlip->id_order = (int) $order->id;
     $orderSlip->shipping_cost = (int) $shipping_cost;
     $orderSlip->conversion_rate = $currency->conversion_rate;
     if (!$orderSlip->add()) {
         return false;
     }
     $orderSlip->addSlipDetail($productList, $qtyList);
     return true;
 }
开发者ID:priyankajsr19,项目名称:indusdiva2,代码行数:14,代码来源:OrderSlip.php

示例2: createOrderSlip

 public static function createOrderSlip($order, $productList, $qtyList, $shipping_cost = false)
 {
     $currency = new Currency($order->id_currency);
     $orderSlip = new OrderSlip();
     $orderSlip->id_customer = (int) $order->id_customer;
     $orderSlip->id_order = (int) $order->id;
     $orderSlip->shipping_cost = (int) $shipping_cost;
     if ($orderSlip->shipping_cost) {
         $orderSlip->shipping_cost_amount = $order->total_shipping_tax_incl;
     }
     $orderSlip->conversion_rate = $currency->conversion_rate;
     $orderSlip->partial = 0;
     $orderSlip->amount = $orderSlip->shipping_cost_amount;
     foreach ($productList as $id_order_detail) {
         $order_detail = new OrderDetail((int) $id_order_detail);
         $orderSlip->amount += $order_detail->unit_price_tax_incl * $qtyList[(int) $id_order_detail];
     }
     if (!$orderSlip->add()) {
         return false;
     }
     $orderSlip->addSlipDetail($productList, $qtyList);
     return true;
 }
开发者ID:FAVHYAN,项目名称:a3workout,代码行数:23,代码来源:OrderSlip.php

示例3: createOrderSlip

 public static function createOrderSlip($order, $productList, $qtyList, $shipping_cost = false)
 {
     // create orderSlip
     $orderSlip = new OrderSlip();
     $orderSlip->id_customer = intval($order->id_customer);
     $orderSlip->id_order = intval($order->id);
     $orderSlip->shipping_cost = intval($shipping_cost);
     if (!$orderSlip->add()) {
         return false;
     }
     // add details
     $orderSlip->addSlipDetail($productList, $qtyList);
     return true;
 }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:14,代码来源:OrderSlip.php


注:本文中的OrderSlip::addSlipDetail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。