本文整理汇总了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);
}
}