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


PHP Order::getStatus方法代码示例

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


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

示例1: testOrder

 /**
  * Test "Order"
  */
 public function testOrder()
 {
     // initialize the API client
     $order = new Order();
     $order->setStatus("placed");
     $this->assertSame("placed", $order->getStatus());
 }
开发者ID:mateuszmackowiak,项目名称:swagger-codegen,代码行数:10,代码来源:OrderTest.php

示例2: handleOrder

 /**
  * @param Order $order
  * @return string
  */
 public function handleOrder(Order $order)
 {
     if ($order->getStatus() === $this->orderStatus) {
         return $this->sendNotification($order);
     } elseif (!is_null($this->followingOrderNotification)) {
         return $this->followingOrderNotification->handleOrder($order);
     }
     return '';
 }
开发者ID:Vincebml,项目名称:PHPatterns,代码行数:13,代码来源:AbstractOrderNotification.php

示例3: createOrder

 public function createOrder(Order $order)
 {
     $order->setId(null);
     $order->setStatus(Order::PENDING);
     $sql = '
         INSERT INTO orders_tb(id,user_id,business_id,order_date,status,order_details)
             VALUES (:id,:user_id,:business_id,:order_date,:status,:order_details)';
     $params = array(':id' => $order->getId(), ':user_id' => $_SESSION['user_id'], ':business_id' => $_POST['business']['id'], ':order_date' => self::formatDateTime($order->getDate()), 'status' => $order->getStatus(), 'order_details' => $order->getOrderDetails());
     return $this->execute($sql, $order, $params);
 }
开发者ID:beshad,项目名称:dropoff_1_DEC,代码行数:10,代码来源:OrderDao.php

示例4: canEditOrder

 public static function canEditOrder(Order $order, Role $role)
 {
     $canAcessOrderByStatus = in_array($order->getStatus()->getId(), self::canAccessOrderStatusIds($role));
     switch ($role->getId()) {
         case Role::ID_STORE_MANAGER:
         case Role::ID_SYSTEM_ADMIN:
         case Role::ID_PURCHASING:
         case Role::ID_SALES:
             return $canAcessOrderByStatus;
         case Role::ID_ACCOUNTING:
             return $canAcessOrderByStatus && !$order->getPassPaymentCheck();
         case Role::ID_WAREHOUSE:
             return $canAcessOrderByStatus && $order->getPassPaymentCheck();
     }
 }
开发者ID:larryu,项目名称:magento-b2b,代码行数:15,代码来源:AccessControl.php

示例5:

	<tr>
		<td><?php 
        echo $order['id'];
        ?>
</td>
		<td><?php 
        echo Helper::setDate(1, $order['date']);
        ?>
</td>
		<td class="ta_r">&pound;<?php 
        echo number_format($order['total'], 2);
        ?>
</td>
		<td class="ta_r">
		<?php 
        $status = $objOrder->getStatus($order['status']);
        echo $status['name'];
        ?>
		</td>
		<td class="ta_r">
		<?php 
        echo $order['payment_status'] != null ? $order['payment_status'] : "Pending";
        ?>
		</td>
		<td class="ta_r">
		<?php 
        if ($order['status'] == 1) {
            ?>
			<a href="/admin/?page=orders&amp;action=remove&amp;id=<?php 
            echo $order['id'];
            ?>
开发者ID:sydorenkovd,项目名称:e-com.loc,代码行数:31,代码来源:list.php

示例6: getParams

 private function getParams(Order $order)
 {
     $params = array(':id' => $order->getId(), ':status' => $order->getStatus(), ':assigned_to' => $order->getAssignedTo());
     return $params;
 }
开发者ID:beshad,项目名称:DROP_OFF_PROJECT_FRI1039,代码行数:5,代码来源:StatusDao.php

示例7: foreach

		<?php 
    foreach ($rows as $row) {
        ?>
			
			<tr>
				<td><?php 
        echo $row['id'];
        ?>
</td>
				<td class="ta_r"><?php 
        echo Helper::setDate(1, $row['date']);
        ?>
</td>
				<td class="ta_r">
					<?php 
        $status = $objOrder->getStatus($row['status']);
        echo $status['name'];
        ?>
				</td>
				<td class="ta_r">
					&pound;<?php 
        echo number_format($row['total'], 2);
        ?>
				</td>
				<td class="ta_r">
					<?php 
        if ($row['pp_status'] == 1) {
            echo '<a href="/?page=invoice&amp;id=';
            echo $row['id'];
            echo '" target="_blank">Invoice</a>';
        } else {
开发者ID:sydorenkovd,项目名称:e-com.loc,代码行数:31,代码来源:orders.php

示例8: changeOrderVolume

 public static function changeOrderVolume(Order $order, $newVolume)
 {
     if ($order->getStatus() != OrderStatus::ACTIVE || $newVolume == $order->getVolume()) {
         return false;
     }
     $deal = new Deal();
     $deal->findActiveDealByOrderId($order->getId());
     $volumeDifference = $order->getVolume() - $newVolume;
     if ($deal->getVolume() < $volumeDifference) {
         return false;
     }
     $rate = new Rate();
     $rate->findById($order->getRateId());
     $purse = new Purse();
     if ($order->getType() == OrderType::BUY) {
         $purseSelect = Purse::findBy(array('UID' => $order->getUserId(), 'CurId' => $rate->getSecondCurrencyId()));
         $purse->findById($purseSelect[0]['id']);
         $difference = $order->getPrice() * $volumeDifference * (1.0 + $rate->getFee());
         $purse->addValue($difference);
     } else {
         $purseSelect = Purse::findBy(array('UID' => $order->getUserId(), 'CurId' => $rate->getFirstCurrencyId()));
         $purse->findById($purseSelect[0]['id']);
         $purse->addValue($volumeDifference);
     }
     if ($purse->getValue() < 0) {
         return false;
     }
     $purse->save();
     $deal->setDate(date("Y-m-d H:i:s"));
     $deal->setVolume($newVolume);
     $deal->save();
     $order->setVolume($newVolume);
     $order->updatePart();
     $order->save();
     return true;
 }
开发者ID:Christian1998,项目名称:php_btc_exchange,代码行数:36,代码来源:OrderModel.php

示例9: create

 /**
  *
  * @param Customer    $customer
  * @param string      $orderNo
  * @param OrderStatus $status
  * @param string      $orderDate
  * @param string      $type
  * @param string      $isFromB2B
  * @param Address     $shipAddr
  * @param Address     $billAddr
  */
 public static function create(Customer $customer, $type = self::TYPE_ORDER, $orderNo = null, $comments = '', OrderStatus $status = null, $orderDate = null, $isFromB2B = false, Address $shipAddr = null, Address $billAddr = null, $passPaymentCheck = false, $poNo = '', Order $cloneFrom = null)
 {
     $order = new Order();
     $order->setOrderNo(trim($orderNo))->setCustomer($customer)->setStatus($status instanceof OrderStatus ? $status : OrderStatus::get(OrderStatus::ID_NEW))->setOrderDate(trim($orderDate) === '' ? trim(new UDate()) : trim($orderDate))->setIsFromB2B($isFromB2B)->setType(trim($type) === '' ? self::TYPE_ORDER : trim($type))->setShippingAddr($shipAddr instanceof Address ? $shipAddr : $customer->getShippingAddress())->setBillingAddr($billAddr instanceof Address ? $billAddr : $customer->getBillingAddress())->setPassPaymentCheck($passPaymentCheck)->setPONo(trim($poNo));
     if ($cloneFrom instanceof Order) {
         $counts = intval(OrderInfo::countByCriteria('value = ? and typeId = ?', array($cloneFrom->getOrderNo(), OrderInfoType::ID_CLONED_FROM_ORDER_NO)));
         $newOrderNo = $cloneFrom->getOrderNo() . '-' . ($counts + 1);
         $order->setOrderNo($newOrderNo);
         $cloneFrom->addComment($msg = 'A new order has been clone from this order:' . $newOrderNo, Comments::TYPE_SYSTEM)->addLog($msg, Log::TYPE_SYSTEM);
     }
     $order->save();
     if ($cloneFrom instanceof Order) {
         $order->addInfo(OrderInfoType::ID_CLONED_FROM_ORDER_NO, $cloneFrom->getOrderNo(), true)->addComment($msg = 'Cloned from Order:' . $cloneFrom->getOrderNo(), Comments::TYPE_SYSTEM)->addLog($msg, Comments::TYPE_SYSTEM);
     }
     $order->addComment($comments, Comments::TYPE_NORMAL)->addInfo(OrderInfoType::ID_CUS_EMAIL, $customer->getEmail())->addInfo(OrderInfoType::ID_CUS_NAME, $customer->getName())->addLog('Order (OrderNo.=' . $order->getOrderNo() . ') created with status: ' . $order->getStatus()->getName(), Log::TYPE_SYSTEM, 'Auto Log', __CLASS__ . '::' . __FUNCTION__);
     return $order;
 }
开发者ID:larryu,项目名称:magento-b2b,代码行数:28,代码来源:Order.php

示例10: update

    public function update(Order $order)
    {
        $id = intval($order->getId());
        $id_delivery = intval($order->getDelivery()->getId());
        $id_billing = intval($order->getBilling()->getId());
        $status = intval($order->getStatus());
        $price = floatval($order->getPrice());
        $date_update = date('Y-m-d H:i:s', strtotime($order->getDateUpdate()));
        $date_pay = date('Y-m-d H:i:s', strtotime($order->getDatePay()));
        $date_send = date('Y-m-d H:i:s', strtotime($order->getDateSend()));
        $date_reception = date('Y-m-d H:i:s', strtotime($order->getDateReception()));
        $query = '	UPDATE order
					SET id_delivery 	= ' . $id_delivery . ',
						id_billing 		= ' . $id_billing . ',
						status 			= ' . $status . ',
						price 			= ' . $price . ',
						date_update 	= ' . $date_update . ',
						date_pay 		= ' . $date_pay . ',
						date_send 		= ' . $date_send . ',
						date_reception 	= ' . $date_reception . '
						WHERE id 		= ' . $id;
        $res = $this->db->exec($query);
        if ($res) {
            return $this->readById($id);
        } else {
            throw new Exception('Internal server error');
        }
    }
开发者ID:dispxxx,项目名称:leshop,代码行数:28,代码来源:OrderManager.class.php


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