本文整理汇总了PHP中Orders::getArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Orders::getArray方法的具体用法?PHP Orders::getArray怎么用?PHP Orders::getArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orders
的用法示例。
在下文中一共展示了Orders::getArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFirstOrderTime
/**
* Returns the time() value representing the date and time of the first
* Order present in the database
*
* Returns null if there is no Order, or on error.
* @return integer The first Order time, or null
*/
static function getFirstOrderTime()
{
$count = 0;
$arrOrder = Orders::getArray($count, 'date_time ASC', null, 0, 1);
if (empty($arrOrder)) {
return null;
}
$objOrder = current($arrOrder);
return strtotime($objOrder->date_time());
}
示例2: view_customer_details
/**
* Set up the customer details
*/
function view_customer_details()
{
global $_ARRAYLANG;
self::$objTemplate->loadTemplateFile("module_shop_customer_details.html");
if (isset($_POST['store'])) {
self::storeCustomerFromPost();
}
$customer_id = intval($_REQUEST['customer_id']);
$objCustomer = Customer::getById($customer_id);
if (!$objCustomer) {
return \Message::error($_ARRAYLANG['TXT_SHOP_CUSTOMER_ERROR_NOT_FOUND']);
}
$customer_type = $objCustomer->is_reseller() ? $_ARRAYLANG['TXT_RESELLER'] : $_ARRAYLANG['TXT_CUSTOMER'];
$active = $objCustomer->active() ? $_ARRAYLANG['TXT_ACTIVE'] : $_ARRAYLANG['TXT_INACTIVE'];
self::$objTemplate->setVariable(array('SHOP_CUSTOMERID' => $objCustomer->id(), 'SHOP_GENDER' => $_ARRAYLANG['TXT_SHOP_' . strtoupper($objCustomer->gender())], 'SHOP_LASTNAME' => $objCustomer->lastname(), 'SHOP_FIRSTNAME' => $objCustomer->firstname(), 'SHOP_COMPANY' => $objCustomer->company(), 'SHOP_ADDRESS' => $objCustomer->address(), 'SHOP_CITY' => $objCustomer->city(), 'SHOP_USERNAME' => $objCustomer->username(), 'SHOP_COUNTRY' => \Cx\Core\Country\Controller\Country::getNameById($objCustomer->country_id()), 'SHOP_ZIP' => $objCustomer->zip(), 'SHOP_PHONE' => $objCustomer->phone(), 'SHOP_FAX' => $objCustomer->fax(), 'SHOP_EMAIL' => $objCustomer->email(), 'SHOP_COMPANY_NOTE' => $objCustomer->companynote(), 'SHOP_IS_RESELLER' => $customer_type, 'SHOP_REGISTER_DATE' => date(ASCMS_DATE_FORMAT_DATETIME, $objCustomer->register_date()), 'SHOP_CUSTOMER_STATUS' => $active, 'SHOP_DISCOUNT_GROUP_CUSTOMER' => Discount::getCustomerGroupName($objCustomer->group_id())));
// TODO: TEST
$count = NULL;
$orders = Orders::getArray($count, NULL, array(), \Paging::getPosition(), \Cx\Core\Setting\Controller\Setting::getValue('numof_orders_per_page_backend', 'Shop'));
$i = 1;
foreach ($orders as $order) {
Currency::init($order->currency_id());
self::$objTemplate->setVariable(array('SHOP_ROWCLASS' => 'row' . (++$i % 2 + 1), 'SHOP_ORDER_ID' => $order->id(), 'SHOP_ORDER_ID_CUSTOM' => ShopLibrary::getCustomOrderId($order->id(), $order->date_time()), 'SHOP_ORDER_DATE' => $order->date_time(), 'SHOP_ORDER_STATUS' => $_ARRAYLANG['TXT_SHOP_ORDER_STATUS_' . $order->status()], 'SHOP_ORDER_SUM' => Currency::getDefaultCurrencySymbol() . ' ' . Currency::getDefaultCurrencyPrice($order->sum())));
self::$objTemplate->parse('orderRow');
}
return true;
}