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


PHP Orders::getArray方法代码示例

本文整理汇总了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());
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:17,代码来源:Order.class.php

示例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;
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:29,代码来源:ShopManager.class.php


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