當前位置: 首頁>>代碼示例>>PHP>>正文


PHP order::getId方法代碼示例

本文整理匯總了PHP中order::getId方法的典型用法代碼示例。如果您正苦於以下問題:PHP order::getId方法的具體用法?PHP order::getId怎麽用?PHP order::getId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在order的用法示例。


在下文中一共展示了order::getId方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: order

require_once '../model/order.php';
require_once '../model/company.php';
require_once '../model/extraction.php';
$order = new order($_GET['id']);
$company = new company($order->getId_company());
$receiving_address = new address($company->getId_receiving_address());
// Génération du n° Document
//[X : typedocument][XX : Year][X : country][XXXX : id commande]
$typedocument = 7;
$year = date('y');
$country = 5;
$country_company = $company->getNationality();
$extraction = new extraction();
$allPartners = $extraction->get('partner');
$id_order = $order->getId();
$id_to_print = "";
$count = strlen((string) $id_order);
for ($i = 0; $i < 4 - $count; $i++) {
    $id_to_print .= "0";
}
$id_to_print .= $id_order;
foreach ($allPartners as $partner) {
    if ($partner->getCountry() == $country_company) {
        $country = $partner->getRef();
        break;
    }
}
//id commande à replacer par référence commande quand ce sera fait
$id_document = $typedocument . $year . $country . $id_to_print;
//
開發者ID:JulienRst,項目名稱:Biothys-Manager,代碼行數:30,代碼來源:PDFSamplesInvoice.php

示例2: printInvoice

 protected function printInvoice(order $order)
 {
     $orderId = $order->getId();
     $uri = "uobject://{$orderId}/?transform=sys-tpls/emarket-invoice.xsl";
     return file_get_contents($uri);
 }
開發者ID:BGCX261,項目名稱:zimmerli-svn-to-git,代碼行數:6,代碼來源:invoice.php

示例3: order

<?php

require_once '../model/order.php';
$order = new order($_GET["id"]);
$param_delivery = json_decode($order->getParam_delivery(), true);
?>

<h2>Modifier les paramètres de la livraison</h2>
<form method="get" action="../controller/setParamDelivery.php">
	<input type="hidden" name="id" value="<?php 
echo $order->getId();
?>
">
	<div class="form-group">
		<label for="DeliveryBy">Délivré par :</label>
		<input name="DeliveryBy" type="text" class="form-control" value="<?php 
echo $param_delivery['DeliveryBy'];
?>
">
	</div>
	<div class="form-group">
		<label for="GrossWeight">Poids :</label>
		<input name="GrossWeight" type="text" class="form-control" value="<?php 
echo $param_delivery['GrossWeight'];
?>
">
	</div>
	<div class="form-group">
		<label for="NbOfPackages">Nombre d'emballages :</label>
		<input name="NbOfPackages" type="text" class="form-control" value="<?php 
echo $param_delivery['NbOfPackages'];
開發者ID:JulienRst,項目名稱:Biothys-Manager,代碼行數:31,代碼來源:setParamDelivery.php

示例4: result

 /**
  * Возвращает страницу "Заказ оформлен/Неудалось оформить"
  * @param order $order
  * @param String $step - результат оформления заказа (успешно/нет)
  * @param $mode
  * @param String $template
  * @return Array
  */
 public function result(order $order, $step, $mode, $template)
 {
     list($tpl_successful, $tpl_failed) = def_module::loadTemplates("emarket/" . $template, 'purchase_successful', 'purchase_failed');
     $tpl_block = $step == 'successful' ? $tpl_successful : $tpl_failed;
     if ($order->isEmpty()) {
         $customer = customer::get();
         $domain = cmsController::getInstance()->getCurrentDomain();
         $domainId = $domain->getId();
         $sel = new selector('objects');
         $sel->types('object-type')->name('emarket', 'order');
         $sel->where('customer_id')->equals($customer->getId());
         $sel->where('domain_id')->equals($domainId);
         $sel->order('id')->desc();
         if ($sel->length()) {
             $orderId = $sel->first->id;
         }
     } else {
         $orderId = $order->getId();
     }
     $result = array('status' => $step, 'order' => array('attribute:id' => $orderId), 'void:order_id' => $orderId);
     return def_module::parseTemplate($tpl_block, $result);
 }
開發者ID:BGCX261,項目名稱:zimmerli-svn-to-git,代碼行數:30,代碼來源:__purchasing.php

示例5: findVisitedProducts

 /**
  * Find visited products
  * @param order
  * @return product[]
  */
 public function findVisitedProducts(order $order)
 {
     try {
         $result = dibi::query('SELECT [product_id], [visited_at]', 'FROM [:prefix:order_visited_products]', 'WHERE [order_id] = %i', $order->getId(), 'ORDER BY [visited_at]');
         $ids = array();
         $ret = array();
         foreach ($result as $row) {
             $ids[$row->product_id] = TRUE;
             $ret[] = (array) $row;
         }
         $products = array();
         foreach (mapper::products()->findByIds(array_keys($ids)) as $product) {
             $products[$product->getId()] = $product;
         }
         foreach ($ret as &$_) {
             if (!isset($products[$_['product_id']])) {
                 $_ = FALSE;
                 continue;
             }
             $_['product'] = $products[$_['product_id']];
             $_ = (object) $_;
         }
         return array_filter($ret);
     } catch (Exception $e) {
         return FALSE;
     }
 }
開發者ID:jakubkulhan,項目名稱:shopaholic,代碼行數:32,代碼來源:orders.php


注:本文中的order::getId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。