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


PHP order::getValue方法代码示例

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


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

示例1: renderPaymentsList

 public function renderPaymentsList(order $order, $template)
 {
     list($tpl_block, $tpl_item) = def_module::loadTemplates("emarket/payment/" . $template, 'payment_block', 'payment_item');
     $payementIds = payment::getList();
     $items_arr = array();
     $currentPaymentId = $order->getValue('payment_id');
     foreach ($payementIds as $paymentId) {
         $payment = payment::get($paymentId);
         if ($payment->validate($order) == false) {
             continue;
         }
         $paymentObject = $payment->getObject();
         $paymentTypeId = $paymentObject->getValue('payment_type_id');
         $paymentTypeName = umiObjectsCollection::getInstance()->getObject($paymentTypeId)->getValue('class_name');
         if ($paymentTypeName == 'social') {
             continue;
         }
         $item_arr = array('attribute:id' => $paymentObject->id, 'attribute:name' => $paymentObject->name, 'attribute:type-name' => $paymentTypeName, 'xlink:href' => $paymentObject->xlink);
         if ($paymentId == $currentPaymentId) {
             $item_arr['attribute:active'] = 'active';
         }
         $items_arr[] = def_module::parseTemplate($tpl_item, $item_arr, false, $paymentObject->id);
     }
     /*			if(cmsController::getInstance()->getCurrentTemplater() instanceof tplTemplater) {
     				return def_module::parseTemplate($tpl_block, array('items' => $items_arr));
     			} else {
     				return array('items' => array('nodes:item'	=> $items_arr));
     			}*/
     $urlPrefix = cmsController::getInstance()->getUrlPrefix() ? cmsController::getInstance()->getUrlPrefix() . '/' : '';
     $submitUrl = $this->pre_lang . '/' . $urlPrefix . 'emarket/purchase/payment/choose/do/';
     return def_module::parseTemplate($tpl_block, array('subnodes:items' => $items_arr, 'submit_url' => $submitUrl));
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:32,代码来源:__payments.php

示例2: notifyOrderStatusChange

		public function notifyOrderStatusChange(order $order, $changedProperty) {
			$order->need_export = true;
			if($changedProperty == "status_id") {
				$order->status_change_date = new umiDate();
			}
			if(order::getCodeByStatus($order->getPaymentStatus()) == "accepted" && !$order->delivery_allow_date) {
				$sel = new selector('objects');
				$sel->types('object-type')->name('emarket', 'delivery');
				if($sel->length) {
					$order->delivery_allow_date = new umiDate();
				}
			}
			$statusId = $order->getValue($changedProperty);
			$codeName = order::getCodeByStatus($statusId);
			if($changedProperty == 'status_id' && (!$statusId || $codeName == 'payment')) return;
			$this->sendCustomerNotification($order, $changedProperty, $codeName);
			if($changedProperty == 'status_id' && $codeName == 'waiting') {
				$this->sendManagerNotification($order);
			}
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:20,代码来源:__notification.php

示例3: renderDeliveryList

 public function renderDeliveryList(order $order, $template, $selfDeliveryOnly = false)
 {
     $tplPrefix = $selfDeliveryOnly ? 'self_' : '';
     list($tpl_block, $tpl_item_free, $tpl_item_priced) = def_module::loadTemplates("emarket/delivery/{$template}", $tplPrefix . 'delivery_block', $tplPrefix . 'delivery_item_free', $tplPrefix . 'delivery_item_priced');
     if (!isset($_SESSION['emarket'])) {
         $_SESSION['emarket'] = array();
     }
     if (!isset($_SESSION['emarket']['delivery'])) {
         $_SESSION['emarket']['delivery'] = array();
     }
     $deliveryIds = delivery::getList($selfDeliveryOnly);
     $items_arr = array();
     $currentDeliveryId = $order->getValue('delivery_id');
     foreach ($deliveryIds as $delivery) {
         $delivery = delivery::get($delivery);
         if ($delivery->validate($order) == false) {
             continue;
         }
         $deliveryObject = $delivery->getObject();
         $deliveryPrice = $delivery->getDeliveryPrice($order);
         $_SESSION['emarket']['delivery'][$delivery->id] = (double) $deliveryPrice;
         $item_arr = array('attribute:id' => $deliveryObject->id, 'attribute:name' => $deliveryObject->name, 'attribute:price' => $deliveryPrice . '', 'xlink:href' => $deliveryObject->xlink);
         if ($delivery->id == $currentDeliveryId) {
             $item_arr['attribute:active'] = 'active';
             $item_arr['void:checked'] = 'checked="checked" ';
         } else {
             $item_arr['void:checked'] = '';
         }
         $tpl_item = $deliveryPrice ? $tpl_item_priced : $tpl_item_free;
         $items_arr[] = def_module::parseTemplate($tpl_item, $item_arr, false, $deliveryObject->id);
     }
     return def_module::parseTemplate($tpl_block, array('subnodes:items' => $items_arr));
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:33,代码来源:__delivery.php


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