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


PHP shopFunctionsF::sentOrderConfirmedEmail方法代码示例

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


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

示例1: plgVmOnPaymentResponseReceived

 function plgVmOnPaymentResponseReceived(&$html)
 {
     // the payment itself should send the parameter needed.
     $virtuemart_paymentmethod_id = JRequest::getInt('pm', 0);
     $vendorId = 0;
     if (!($method = $this->getVmPluginMethod($virtuemart_paymentmethod_id))) {
         return null;
         // Another method was selected, do nothing
     }
     if (!$this->selectedThisElement($method->payment_element)) {
         return false;
     }
     if (!class_exists('VirtueMartCart')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $payment_data = JRequest::get('post');
     $payment_name = $this->renderPluginName($method);
     $html = $this->_getPaymentResponseHtml($payment_data, $payment_name);
     if (!empty($payment_data)) {
         vmdebug('plgVmOnPaymentResponseReceived', $payment_data);
         $order_number = $payment_data['invoice'];
         $return_context = $payment_data['custom'];
         if (!class_exists('VirtueMartModelOrders')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
         }
         $virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number);
         $payment_name = $this->renderPluginName($method);
         $html = $this->_getPaymentResponseHtml($payment_data, $payment_name);
         if ($virtuemart_order_id) {
             // send the email ONLY if payment has been accepted
             if (!class_exists('VirtueMartModelOrders')) {
                 require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
             }
             $modelOrder = new VirtueMartModelOrders();
             $orderitems = $modelOrder->getOrder($virtuemart_order_id);
             $nb_history = count($orderitems['history']);
             //vmdebug('history', $orderitems);
             if (!class_exists('shopFunctionsF')) {
                 require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
             }
             if ($nb_history == 1) {
                 if (!class_exists('shopFunctionsF')) {
                     require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
                 }
                 shopFunctionsF::sentOrderConfirmedEmail($orderitems);
                 $this->logInfo('plgVmOnPaymentResponseReceived, sentOrderConfirmedEmail ' . $order_number, 'message');
                 $order['order_status'] = $orderitems['items'][$nb_history - 1]->order_status;
                 $order['virtuemart_order_id'] = $virtuemart_order_id;
                 $order['customer_notified'] = 0;
                 $order['comments'] = JText::sprintf('VMPAYMENT_PAYPAL_EMAIL_SENT');
                 $modelOrder->updateStatusForOneOrder($virtuemart_order_id, $order, true);
             }
         }
     }
     //We delete the old stuff
     // get the correct cart / session
     $cart = VirtueMartCart::getCart();
     $cart->emptyCart();
     return true;
 }
开发者ID:rurikhero,项目名称:PagSeguro-VirtueMart-3,代码行数:60,代码来源:pagseguro_virtuemartbrasil.php


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