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


PHP OrderItem::getReturnQuantity方法代码示例

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


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

示例1: loadItems

 private function loadItems($reload = false)
 {
     if ($this->items_total == 0 || $reload == true) {
         $this->items = array();
         $this->items_canceled = array();
         $this->items_notcanceled = array();
         $this->items_total_qty = 0;
         $this->items_canceled_total_qty = 0;
         $this->items_notcanceled_total_qty = 0;
         $this->items_returned = array();
         $this->items_returned_total_qty = 0;
         if ($this->isOrderFromSalesPartner()) {
             $table = OrderItem::TABLENAME_SP;
             $colname_order_id = self::COLNAME_ID_SP;
             $colname_item_id = OrderItem::COLNAME_ID_SP;
         } elseif ($this->isOrderFromJulieGrace()) {
             $table = OrderItem::TABLENAME_JG;
             $colname_order_id = self::COLNAME_ID_JG;
             $colname_item_id = OrderItem::COLNAME_ID_JG;
         }
         $q = "SELECT {$colname_item_id} FROM {$table} WHERE {$colname_order_id}" . " = '" . $this->order_id . "'";
         $r = tep_db_query($q);
         while ($row = tep_db_fetch_array($r)) {
             $item_id = $row[$colname_item_id];
             $i = new OrderItem($this, $item_id);
             $this->items[$item_id] = $i;
             $this->items_total_qty += $i->ordered_quantity;
             if (statusIsCancelled($i->status)) {
                 $this->items_canceled[$item_id] = $i;
                 $this->items_canceled_total_qty += $i->ordered_quantity;
             } else {
                 $this->items_notcanceled[$item_id] = $i;
                 $this->items_notcanceled_total_qty += $i->ordered_quantity;
             }
             $return_qty = $i->getReturnQuantity();
             if ($return_qty > 0) {
                 $this->items_returned[$item_id] = $i;
                 $this->items_returned_total_qty += $return_qty;
             }
         }
         $this->items_total = count($this->items);
         $this->items_canceled_total = count($this->items_canceled);
         $this->items_notcanceled_total = count($this->items_notcanceled);
         $this->items_returned_total = count($this->items_returned);
     }
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:46,代码来源:Order.php


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