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


PHP OrderInvoice::getCarrierId方法代码示例

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


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

示例1: getCarrier

 /**
  * @since 1.5
  * @param $id_order_invoice
  */
 public static function getCarrier($id_order_invoice)
 {
     $carrier = false;
     if ($id_carrier = OrderInvoice::getCarrierId($id_order_invoice)) {
         $carrier = new Carrier((int) $id_carrier);
     }
     return $carrier;
 }
开发者ID:jpodracky,项目名称:dogs,代码行数:12,代码来源:OrderInvoice.php

示例2: hookDisplayPDFInvoice

 /**
  * Displays the delivery dates on the invoice
  *
  * @param $params contains an instance of OrderInvoice
  * @return string
  *
  */
 public function hookDisplayPDFInvoice($params)
 {
     $order_invoice = $params['object'];
     if (!$order_invoice instanceof OrderInvoice) {
         return;
     }
     $order = new Order((int) $order_invoice->id_order);
     $oos = false;
     // For out of stock management
     foreach ($order->getProducts() as $product) {
         if ($product['product_quantity_in_stock'] < 1) {
             $oos = true;
         }
     }
     $id_carrier = (int) OrderInvoice::getCarrierId($order_invoice->id);
     $return = '';
     if ($datesDelivery = $this->_getDatesOfDelivery($id_carrier, $oos, $order_invoice->date_add)) {
         $return = sprintf($this->l('Approximate date of delivery is between %1$s and %2$s'), $datesDelivery[0], $datesDelivery[1]);
     }
     return $return;
 }
开发者ID:FAVHYAN,项目名称:a3workout,代码行数:28,代码来源:dateofdelivery.php


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