本文整理汇总了PHP中OrderDetail::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP OrderDetail::getList方法的具体用法?PHP OrderDetail::getList怎么用?PHP OrderDetail::getList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderDetail
的用法示例。
在下文中一共展示了OrderDetail::getList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTableRecentOrders
public function getTableRecentOrders()
{
$header = array(array('title' => $this->l('Customer Name'), 'class' => 'text-left'), array('title' => $this->l('Products'), 'class' => 'text-center'), array('title' => $this->l('Total'), 'class' => 'text-center'), array('title' => $this->l('Date'), 'class' => 'text-center'), array('title' => $this->l('Action'), 'class' => 'text-center'));
$orders = Order::getOrdersWithInformations((int) Configuration::get('DASHPRODUCT_NBR_SHOW_LAST_ORDER', 10));
$body = array();
foreach ($orders as $order) {
$currency = Currency::getCurrency((int) $order['id_currency']);
$tr = array();
$tr[] = array('id' => 'firstname_lastname', 'value' => Tools::htmlentitiesUTF8($order['firstname']) . ' ' . Tools::htmlentitiesUTF8($order['lastname']), 'class' => 'text-left');
$tr[] = array('id' => 'state_name', 'value' => count(OrderDetail::getList((int) $order['id_order'])), 'class' => 'text-center');
$tr[] = array('id' => 'total_paid', 'value' => Tools::displayPrice((double) $order['total_paid'], $currency), 'class' => 'text-center', 'wrapper_start' => '<span class="badge">', 'wrapper_end' => '<span>');
$tr[] = array('id' => 'date_add', 'value' => Tools::displayDate($order['date_add']), 'class' => 'text-center');
$tr[] = array('id' => 'details', 'value' => $this->l('Details'), 'class' => 'text-right', 'wrapper_start' => '<a class="btn btn-default" href="index.php?tab=AdminOrders&id_order=' . (int) $order['id_order'] . '&vieworder&token=' . Tools::getAdminTokenLite('AdminOrders') . '" title="' . $this->l('Details') . '"><i class="icon-search"></i>', 'wrapper_end' => '</a>');
$body[] = $tr;
}
return array('header' => $header, 'body' => $body);
}
示例2: getOrderDetailList
/**
* Get the an order detail list of the current order
* @return array
*/
public function getOrderDetailList()
{
return OrderDetail::getList($this->id);
}
示例3: getOrderReason
public static function getOrderReason($id_order)
{
$reason = '';
$order_details = OrderDetail::getList($id_order);
foreach ($order_details as $order_detail) {
$reason .= $order_detail['product_quantity'] . ' x ' . $order_detail['product_name'] . '; ';
}
return Tools::substr($reason, 0, 250);
}