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


PHP Order::getId方法代码示例

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


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

示例1: getComments

 public function getComments()
 {
     $html = '';
     $comments = Comments::getAllByCriteria('entityName = ? AND type = ? AND entityId = ?', array('PurchaseOrder', Comments::TYPE_PURCHASING, $this->order->getId()), true, 1, 5, array('comm.id' => 'desc'));
     if (count($comments) === 0) {
         return '';
     }
     foreach ($comments as $comment) {
         $html .= '<div style="max-width: 670px; word-wrap: break-word; font-weight: bold; color: brown;">' . $comment->getComments() . '</div>';
     }
     return $html;
 }
开发者ID:larryu,项目名称:magento-b2b,代码行数:12,代码来源:POPrintController.php

示例2: execute

 private function execute($sql, Order $order, array $params)
 {
     $statement = $this->getDb()->prepare($sql);
     $this->executeStatement($statement, $params);
     if (!$order->getId()) {
         return $this->findById($this->getDb()->lastInsertId());
     }
     if (!$statement->rowCount()) {
         throw new NotFoundException('USER with ID "' . $order->getId() . '" does not exist.');
     }
     return $order;
 }
开发者ID:beshad,项目名称:DROP_OFF_PROJECT_FRI1039,代码行数:12,代码来源:OrderDao.php

示例3: __construct

 /**
  * @param  ItemDao $item_dao
  * @return void
  **/
 public function __construct(ItemDao $item_dao)
 {
     $fp = fopen(ROOT . '/data/AbstractFactory/order.csv', 'r');
     while ($data = fgetcsv($fp, 1000, ',')) {
         $order = new Order();
         $order->setId($data[0]);
         foreach (explode(',', $data[1]) as $item_id) {
             $item = $item_dao->findById($item_id);
             if (!is_null($item)) {
                 $order->addItem($item);
             }
         }
         $this->orders[$order->getId()] = $order;
     }
 }
开发者ID:app2641,项目名称:DesignPatternOnPHP,代码行数:19,代码来源:DbOrderDao.php

示例4: Order

 $orderBookId = $_POST['data']['orders']['Order Book Id'];
 $client = $cdi->getClientById($clientId);
 $order = new Order("");
 $order->setOrderDate($orderDate);
 if (strcmp(strtolower($orderValid), 'true') === 0) {
     $order->setValid(true);
 } else {
     $order->setValid(false);
 }
 $order->setClient($client);
 if (strcmp(strtolower($orderBookId), 'none') !== 0) {
     $ordb = $obi->getOrderBooksById(intval($orderBookId));
     $order->addOrderBook($ordb);
 }
 $entityManager->flush();
 $array['DT_RowId'] = $order->getId();
 $see['Order Date'] = $order->getDate()->format("d-m-Y");
 if ($order->getValid()) {
     $see['Valid'] = 'true';
 } else {
     $see['Valid'] = 'false';
 }
 $see['Client Id'] = "" . $client->getId() . "";
 $see['Order Book Id'] = "" . $orderBookId . "";
 $see['Client Name'] = $client->getName();
 $array['orders'] = $see;
 $seeall['id'] = "" . $orderBookId . "";
 $tmp['id'] = "" . $clientId . "";
 $array['Order Book Ids'] = $seeall;
 $array['Client Ids'] = $tmp;
 echo json_encode(array('row' => $array));
开发者ID:AngersPhoenix,项目名称:ReadingFun,代码行数:31,代码来源:fill_orders.php

示例5: Order

?>
			<input type="submit" value="Complete" onClick="setCompleted()">
			<?php 
//}
?>
			<hr>
			<table>
				<tr><td style="width:200px;">Order Code</td>
					<td style="width:200px;">Title</td>
					<td style="width:200px;">Client</td>
					<td style="width:200px;">Destination</td>
					<td style="width:200px;">Action</td>
				</tr>
				<?php 
for ($i = 0; $i < sizeof($orderList); $i++) {
    $mOrder = new Order($orderList[$i]);
    $mClient = new Client($mOrder->getClient());
    echo "<tr>";
    echo "<td><a href='../order/detail.php?id=" . $mOrder->getId() . "'>" . $mOrder->getCode() . "</a></td>";
    echo "<td>" . $mOrder->getTitle() . "</td>";
    echo "<td><a href='../client/detail.php?id=" . $mClient->getId() . "'>" . $mClient->getName() . "</a></td>";
    echo "<td>" . $mOrder->getDestination() . "</td>";
    echo "<td><input type='submit' value='Assign'><input type='submit' value='Track'></td>";
    echo "</tr>";
}
?>
			</table>
		<div>
	</div>
	
</body> 
开发者ID:rustydev19,项目名称:Navigator,代码行数:31,代码来源:detail.php

示例6: getComments

 public function getComments()
 {
     $comments = Comments::getAllByCriteria('entityId = ? and entityName = ? and type = ?', array($this->order->getId(), get_class($this->order), Comments::TYPE_SALES), true, 1, 1, array('id' => 'desc'));
     return count($comments) === 0 ? '' : $comments[0]->getComments();
 }
开发者ID:larryu,项目名称:magento-b2b,代码行数:5,代码来源:OrderPrintController.php

示例7: __construct

 public function __construct(ItemDao $item_dao)
 {
     $fp = fopen('order_data.txt', 'r');
     $dummy = fgets($fp, 4096);
     $this->orders = array();
     while ($buffer = fgets($fp, 4096)) {
         $order_id = trim(substr($buffer, 0, 10));
         $item_ids = trim(substr($buffer, 10));
         $order = new Order($order_id);
         foreach (split(',', $item_ids) as $item_id) {
             $item = $item_dao->findById($item_id);
             if (!is_null($item)) {
                 $order->addItem($item);
             }
         }
         $this->orders[$order->getId()] = $order;
     }
     fclose($fp);
 }
开发者ID:th1209,项目名称:php_design_pattern,代码行数:19,代码来源:abstract_factory.php

示例8: 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

示例9: addInstanceToPool

 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      Order $value A Order object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(Order $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
开发者ID:Chipusy,项目名称:lkbroker,代码行数:22,代码来源:BaseOrderPeer.php

示例10: setOrder

 public function setOrder(Order $order)
 {
     $this->order = $order;
     $this->id_order = $order->getId();
     return true;
 }
开发者ID:berserkr1,项目名称:e-commerce,代码行数:6,代码来源:Basket.class.php

示例11: getSellingItems

 /**
  * Getting the selling item
  *
  * @param OrderItem $orderItem
  * @param string    $serialNo
  * @param string    $description
  * @param Order     $order
  * @param Product   $product
  * @param string    $activeOnly
  * @param string    $pageNo
  * @param unknown   $pageSize
  * @param unknown   $orderBy
  * @param unknown   $stats
  * @return Ambigous <Ambigous, multitype:, multitype:BaseEntityAbstract >
  */
 public static function getSellingItems(OrderItem $orderItem = null, $serialNo = '', $description = '', Order $order = null, Product $product = null, $activeOnly = true, $pageNo = null, $pageSize = DaoQuery::DEFAUTL_PAGE_SIZE, $orderBy = array(), &$stats = array())
 {
     $where = $params = array();
     if (trim($serialNo) !== '') {
         $where[] = 'serialNo like ?';
         $params[] = $serialNo;
     }
     if (trim($description) !== '') {
         $where[] = 'description like ?';
         $params[] = '%' . $description . '%';
     }
     if ($orderItem instanceof OrderItem) {
         $where[] = 'orderItemId = ?';
         $params[] = $orderItem->getId();
     }
     if ($order instanceof Order) {
         $where[] = 'orderId = ?';
         $params[] = $order->getId();
     }
     if ($product instanceof Product) {
         $where[] = 'productId = ?';
         $params[] = $product->getId();
     }
     if (count($where) === 0) {
         return SellingItem::getAll($activeOnly, $pageNo, $pageSize, $orderBy, $stats);
     }
     $results = SellingItem::getAllByCriteria(implode(' AND ', $where), $params, $activeOnly, $pageNo, $pageSize, $orderBy, $stats);
     return $results;
 }
开发者ID:larryu,项目名称:magento-b2b,代码行数:44,代码来源:SellingItem.php

示例12: completeOrder

 public function completeOrder($tid)
 {
     $transaction = Transaction::getTransactionBasedOnTID($tid);
     $user = new User($transaction->getUser());
     $order = new Order();
     $order->setTid($transaction->getTid());
     $order->setUser($transaction->getUser());
     $order->setCustomerName($user->getName());
     $order->setUserEmail($user->getEmail());
     $order->setPhone($transaction->getPhone());
     $order->setShippingStreet($transaction->getShippingStreet());
     $order->setShippingCity($transaction->getShippingCity());
     $order->setShippingPostal($transaction->getShippingPostal());
     $order->setShippingProvince($transaction->getShippingProvince());
     $order->setShippingCountry($transaction->getShippingCountry());
     $order->setBillingStreet($transaction->getBillingStreet());
     $order->setBillingCity($transaction->getBillingCity());
     $order->setBillingPostal($transaction->getBillingPostal());
     $order->setBillingProvince($transaction->getBillingProvince());
     $order->setBillingCountry($transaction->getBillingCountry());
     $order->setCostSubtotal($transaction->getCostSubtotal());
     $order->setCostTax($transaction->getCostTax());
     $order->setCostShipping($transaction->getCostShipping());
     $order->setCostTotal($transaction->getCostTotal());
     $order->setIp($transaction->getIp());
     $order->setShippingClass($transaction->getShippingClass());
     $order->setPaymentClass($transaction->getPaymentClass());
     $order->setDeliveryInstructions($transaction->getDeliveryInstructions());
     $order->setStatus('Pending');
     $order->save();
     $cartItems = CartItem::getAll($transaction->getSession());
     foreach ($cartItems as $cartItem) {
         $product = new Product($cartItem->getProduct());
         $orderDetail = new OrderDetail();
         $orderDetail->setOrderNb($order->getId());
         $orderDetail->setProduct($product->getId());
         $orderDetail->setProductName($product->getName());
         $orderDetail->setQuantity($cartItem->getQuantity());
         $orderDetail->save();
         $cartItem->delete();
     }
     $transaction->delete();
     //Send an email to the user
     $this->sendEmailOrderComplete($order->getId());
     return true;
 }
开发者ID:anas,项目名称:feedstore,代码行数:46,代码来源:EComm.php

示例13: addOrder

 public function addOrder(Order $order)
 {
     $this->orders[$order->getId()] = $order;
 }
开发者ID:Kompaneytsev,项目名称:market-place,代码行数:4,代码来源:Customer.php

示例14: makeDealsWith

 private static function makeDealsWith(Deal $deal)
 {
     $order = new Order();
     $order->findById($deal->getOrderId());
     if ($order->getType() == OrderType::SELL) {
         $oppositeDeals = Deal::getOpenedBuyDeals($order->getPrice(), $order->getRateId());
     } else {
         $oppositeDeals = Deal::getOpenedSellDeals($order->getPrice(), $order->getRateId());
     }
     foreach ($oppositeDeals as $oppDeal) {
         $oppositeDeal = new Deal();
         $oppositeDeal->findById($oppDeal['id']);
         $oppositeOrder = new Order();
         $oppositeOrder->findById($oppositeDeal->getOrderId());
         $difference = $deal->getVolume() - $oppositeDeal->getVolume();
         if ($difference == 0) {
             $deal->setPrice($oppositeDeal->getPrice());
             $deal->setDone(1);
             $deal->save();
             $order->setPart(1.0);
             $order->setStatus(OrderStatus::DONE);
             $order->save();
             $oppositeDeal->setDone(1);
             $oppositeDeal->setDate($deal->getDate());
             $oppositeDeal->save();
             $oppositeOrder->setPart(1.0);
             $oppositeOrder->setStatus(OrderStatus::DONE);
             $oppositeOrder->setDate($deal->getDate());
             $oppositeOrder->save();
             self::transferMoney($deal, $oppositeDeal);
             break;
         }
         $intermediateDeal = new Deal();
         $intermediateDeal->setRateId($order->getRateId());
         $intermediateDeal->setDate($deal->getDate());
         $intermediateDeal->setDone(1);
         if ($difference < 0) {
             $deal->setPrice($oppositeDeal->getPrice());
             $deal->setDone(1);
             $deal->save();
             $order->setPart(1.0);
             $order->setStatus(OrderStatus::DONE);
             $order->save();
             $intermediateDeal->setOrderId($oppositeOrder->getId());
             $intermediateDeal->setUserId($oppositeOrder->getUserId());
             $intermediateDeal->setType($oppositeOrder->getType());
             $intermediateDeal->setPrice($oppositeDeal->getPrice());
             $intermediateDeal->setVolume($deal->getVolume());
             $intermediateDeal->insert();
             $oppositeOrder->updatePart();
             $oppositeOrder->setDate($deal->getDate());
             $oppositeOrder->save();
             $oppositeDeal->setVolume(-$difference);
             $oppositeDeal->setDate($deal->getDate());
             $oppositeDeal->save();
             self::transferMoney($deal, $intermediateDeal);
             break;
         } else {
             $deal->setVolume($difference);
             $deal->save();
             $intermediateDeal->setOrderId($order->getId());
             $intermediateDeal->setUserId($order->getUserId());
             $intermediateDeal->setType($order->getType());
             $intermediateDeal->setPrice($oppositeDeal->getPrice());
             $intermediateDeal->setVolume($oppositeDeal->getVolume());
             $intermediateDeal->insert();
             $order->updatePart();
             $order->save();
             $oppositeDeal->setDone(1);
             $oppositeDeal->setDate($deal->getDate());
             $oppositeDeal->save();
             $oppositeOrder->setPart(1.0);
             $oppositeOrder->setStatus(OrderStatus::DONE);
             $oppositeOrder->setDate($deal->getDate());
             $oppositeOrder->save();
             self::transferMoney($intermediateDeal, $oppositeDeal);
         }
     }
 }
开发者ID:Christian1998,项目名称:php_btc_exchange,代码行数:79,代码来源:OrderModel.php

示例15: getItems

 /**
  * Getting the order item via order and product
  *
  * @param Order   $order
  * @param Product $product
  * @param bool    $activeOnly
  * @param int     $pageNo
  * @param int     $pageSize
  * @param array   $orderBy
  * @param array   $stats
  *
  * @return Ambigous <Ambigous, multitype:, multitype:BaseEntityAbstract >
  */
 public static function getItems(Order $order, Product $product = null, $activeOnly = true, $pageNo = null, $pageSize = DaoQuery::DEFAUTL_PAGE_SIZE, $orderBy = array(), &$stats = array())
 {
     $where = 'orderId = ?';
     $params = array($order->getId());
     if ($product instanceof Product) {
         $where .= ' AND productId = ?';
         $params[] = $product->getId();
     }
     return self::getAllByCriteria($where, $params, $activeOnly, $pageNo, $pageSize, $orderBy, $stats);
 }
开发者ID:larryu,项目名称:magento-b2b,代码行数:23,代码来源:OrderItem.php


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