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


PHP order::getStatusByCode方法代码示例

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


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

示例1: getCustomerOrders

 protected function getCustomerOrders()
 {
     static $customerOrders = null;
     if (!is_null($customerOrders)) {
         return $customerOrders;
     }
     $customer = customer::get();
     $cmsController = cmsController::getInstance();
     $domain = $cmsController->getCurrentDomain();
     $domainId = $domain->getId();
     $sel = new selector('objects');
     $sel->types('object-type')->name('emarket', 'order');
     $sel->where('customer_id')->equals($customer->id);
     $sel->where('domain_id')->equals($domainId);
     $sel->where('status_id')->equals(order::getStatusByCode('ready'));
     return $customerOrders = $sel->result;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:17,代码来源:allOrdersPrices.php

示例2: onPaymentStatusChanged

		public function onPaymentStatusChanged(iUmiEventPoint $event) {
			if($event->getMode() == "after" &&
				$event->getParam("old-status-id") != $event->getParam("new-status-id")) {
				$order = $event->getRef("order");					
				if ($event->getParam("new-status-id") == order::getStatusByCode('accepted', 'order_payment_status')) {
					self::addBonus($order->getId());
				}
				$this->notifyOrderStatusChange($order, "payment_status_id");
			}
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:10,代码来源:__events.php

示例3: onEmarketOrderAdded

 public function onEmarketOrderAdded(iUmiEventPoint $event)
 {
     if ($event->getMode() == "after" && $event->getParam("old-status-id") != $event->getParam("new-status-id")) {
         if ($event->getParam("new-status-id") == order::getStatusByCode('waiting') && $event->getParam("old-status-id") != order::getStatusByCode('editing')) {
             $module = cmsController::getInstance()->getModule('emarket');
             $order = $event->getRef("order");
             $link = $module->getObjectEditLink($order->getId(), 'order');
             $this->registerEvent('emarket-order-add', array($link, $order->getName()), null, $order->getId());
         }
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:11,代码来源:__events_handlers.php

示例4: onEmarketOrderAdded

 public function onEmarketOrderAdded(iUmiEventPoint $v4119639092e62c55ea8be348e4d9260d)
 {
     if ($v4119639092e62c55ea8be348e4d9260d->getMode() == "after" && $v4119639092e62c55ea8be348e4d9260d->getParam("old-status-id") != $v4119639092e62c55ea8be348e4d9260d->getParam("new-status-id")) {
         if ($v4119639092e62c55ea8be348e4d9260d->getParam("new-status-id") == order::getStatusByCode('waiting') && $v4119639092e62c55ea8be348e4d9260d->getParam("old-status-id") != order::getStatusByCode('editing')) {
             $v22884db148f0ffb0d830ba431102b0b5 = cmsController::getInstance()->getModule('emarket');
             $v70a17ffa722a3985b86d30b034ad06d7 = $v4119639092e62c55ea8be348e4d9260d->getRef("order");
             $v2a304a1348456ccd2234cd71a81bd338 = $v22884db148f0ffb0d830ba431102b0b5->getObjectEditLink($v70a17ffa722a3985b86d30b034ad06d7->getId(), 'order');
             $this->registerEvent('emarket-order-add', array($v2a304a1348456ccd2234cd71a81bd338, $v70a17ffa722a3985b86d30b034ad06d7->getName()), null, $v70a17ffa722a3985b86d30b034ad06d7->getId());
         }
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:11,代码来源:__events_handlers.php

示例5: getBasketOrder

 /**
  * Получить заказ, который представляет текущую корзину товаров. Если такого заказа нет, то он будет создан
  * @return order заказ, который представляет корзину товаров
  */
 public function getBasketOrder($useDummyOrder = true)
 {
     static $cache;
     if ($cache instanceof order) {
         //If order has order-status, that means it is not a basket any more, so we have to reset $cache
         if ($cache->getOrderStatus() && $cache->getOrderStatus() != order::getStatusByCode('editing') || $useDummyOrder == false) {
             $cache = null;
         } else {
             return $cache;
         }
     }
     $customer = customer::get();
     $cmsController = cmsController::getInstance();
     $domain = $cmsController->getCurrentDomain();
     $domainId = $domain->getId();
     $orderId = $customer->getLastOrder($domainId);
     if ($orderId) {
         return $cache = order::get($orderId);
     }
     return $cache = order::create($useDummyOrder);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:25,代码来源:__purchasing.php

示例6: editOrderAsUser

 public function editOrderAsUser($orderId = false)
 {
     if (!$orderId) {
         $orderId = getRequest('param0');
     }
     $objects = umiObjectsCollection::getInstance();
     $order = $objects->getObject($orderId);
     if (!$order instanceof umiObject) {
         return false;
     }
     if ($order->getTypeGUID() !== 'emarket-order') {
         return false;
     }
     $statusId = order::getStatusByCode('editing');
     $order->setValue('status_id', $statusId);
     $order->commit();
     $this->actAsUser($order->getValue('customer_id'), $orderId);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:18,代码来源:__admin.php


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