当前位置: 首页>>代码示例>>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;未经允许,请勿转载。