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


PHP VirtueMartModelOrders::getOrderNumber方法代码示例

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


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

示例1: createVmOrder

 /**
  * Create the VM order with the saved cart, and the users infos from klarna
  * @param $klarna_order return data from Klarna
  * @param $cartData cart json_decoded saved in the table
  * @param $method
  * @param $cartId pkey of the cart saved in the table
  *
  */
 function createVmOrder($klarna_order, $cartData, $cartId)
 {
     if (!class_exists('VirtueMartCart')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     if (!class_exists('shopFunctionsF')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
     }
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     $cartData->_confirmDone = true;
     $cartData->_dataValidated = true;
     if (!class_exists('VirtueMartCart')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $cart = VirtueMartCart::getCart(false, array(), serialize($cartData));
     $this->updateBTSTAddressInCart($cart, $klarna_order);
     $orderId = $cart->confirmedOrder();
     $this->debugLog($orderId, 'createVmOrder', 'debug');
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     $modelOrder = VmModel::getModel('orders');
     $order_number = VirtueMartModelOrders::getOrderNumber($orderId);
     $history = array();
     $history['customer_notified'] = 1;
     $history['order_status'] = $this->method->status_checkout_complete;
     $history['comments'] = vmText::sprintf('VMPAYMENT_KLARNACHECKOUT_PAYMENT_STATUS_CHECKOUT_COMPLETE', $order_number);
     $modelOrder->updateStatusForOneOrder($orderId, $history, TRUE);
     $this->debugLog('', 'AFTER updateStatusForOneOrder', 'debug');
     $klarna_data = $this->getKlarnaData($klarna_order);
     //$this->debugLog('plgVmOnPaymentNotification KLARNA DATA ' . var_export($klarna_data, true), 'message');
     $order_number = VirtueMartModelOrders::getOrderNumber($orderId);
     $dbValues = array('virtuemart_order_id' => $orderId, 'order_number' => $order_number, 'virtuemart_paymentmethod_id' => $this->method->virtuemart_paymentmethod_id, 'payment_name' => $this->renderPluginName($this->method, 'create_order'), 'action' => 'createOrder', 'klarna_status' => $klarna_order['status'], 'format' => 'json', 'data' => json_encode($klarna_data));
     $this->debugLog($dbValues, 'storePSPluginInternalData createVmOrder', 'debug');
     $this->storePSPluginInternalData($dbValues);
     $dbValues = array('virtuemart_order_id' => $orderId, 'order_number' => VirtueMartModelOrders::getOrderNumber($orderId), 'virtuemart_paymentmethod_id' => $this->method->virtuemart_paymentmethod_id, 'payment_name' => 'Klarna Checkout', 'action' => 'storeCart', 'format' => 'json', 'klarna_status' => 'pre-purchase');
     $this->storeCartInTable($cartData, $cartId, $dbValues);
     return $order_number;
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:49,代码来源:klarnacheckout.php

示例2: _getPaypalInternalData

 private function _getPaypalInternalData($virtuemart_order_id, $order_number = '')
 {
     if (empty($order_number)) {
         $order_number = VirtueMartModelOrders::getOrderNumber($virtuemart_order_id);
     }
     $db = JFactory::getDBO();
     $q = 'SELECT * FROM `' . $this->_tablename . '` WHERE ';
     $q .= " `order_number` = '" . $order_number . "'";
     $db->setQuery($q);
     if (!($payments = $db->loadObjectList())) {
         // JError::raiseWarning(500, $db->getErrorMsg());
         return '';
     }
     return $payments;
 }
开发者ID:lenard112,项目名称:cms,代码行数:15,代码来源:paypal.php


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