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


PHP comquick2cartHelper::sendordermail方法代码示例

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


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

示例1: store


//.........这里部分代码省略.........
     $row->email = $bill['email1'];
     if (empty($orderId)) {
         //vm:DONT UPDATE THESE THING WHILE UPDATING ORDER (1-PAGE-CKOUT)
         $row->amount = $data->get('final_amt_pay_inputbox');
         $row->original_amount = $data->get('total_amt_inputbox');
         $row->order_tax = $data->get('orderTax', 0);
         $order_tax_details = $data->get('order_tax_details', '');
         $row->order_tax_details = isset($order_tax_details) ? $order_tax_details : json_encode(array());
         $row->order_shipping = $data->get('qtcOrderShipcharges', '', "STRING");
         $order_shipping_details = $data->get('order_shipping_details', '', "STRING");
         //  order level : Save shipping msg for order level shipping method
         $row->order_shipping_details = isset($order_shipping_details) ? $order_shipping_details : json_encode(array());
         $row->coupon_code = $data->get('cop');
     }
     //	$row->coupon_discount 		= $dis_totalamt;//$cdiscount;
     $comment = $data->get('comment', '', 'RAW');
     $row->customer_note = $comment ? nl2br($comment) : '';
     $updateOrderstatus = 0;
     $gtway = $data->get('gateways');
     //	if ZERO ORDER (first time) or on edit
     if (empty($row->amount)) {
         // if ZERO ORDER and EDIT MODE (FOUND $data['order_id']) THEN DONT CHANGE GATEWAY
         $row->status = 'P';
         // ORDER IS NOT PLACED
         if (empty($orderId)) {
             // FIRST TIME AND AMOUT =0 THEN USE FREE CKOUT PAYMENT METHOD
             $updateOrderstatus = 1;
             $row->processor = 'FreeCheckout';
             //$data['gateways']; // vm:what should be place here?
         } else {
             // Order is placed and buyer editing something. Now fetch order price from D.
             // FETCH  ORDER PRICE FRM db
             $orderFinalAMt = (int) $this->getFinalOrderPrice($orderId);
         }
     } else {
         $row->status = 'P';
         // not free product and no geteway then return false
         /*	if (!isset($gtway))
         			{
         				return 0;
         			}
         			$row->processor 		= $gtway;*/
     }
     $row->cdate = $timestamp;
     $row->mdate = $timestamp;
     $row->ip_address = $ip;
     $comquick2cartHelper = new comquick2cartHelper();
     $row->currency = $comquick2cartHelper->getCurrencySession();
     //$row->discount_type 		= $this->discount_type;			@TODO coupon related???
     $row->id = '';
     if (!empty($orderId)) {
         //EDIT ORDER
         $row->id = $insert_order_id = $orderId;
         if (!$this->_db->updateObject('#__kart_orders', $row, 'id')) {
             echo $this->_db->stderr();
             return 0;
         }
     } else {
         if (!$this->_db->insertObject('#__kart_orders', $row, 'id')) {
             echo $this->_db->stderr();
             return 0;
         }
         $insert_order_id = $this->_db->insertid();
     }
     // Code to pad zero's to $insert_order_id and append to prefix and update
     JLoader::import('payment', JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'models');
     $Quick2cartModelpayment = new Quick2cartModelpayment();
     $prefix = $Quick2cartModelpayment->generate_prefix($insert_order_id);
     $row1 = new stdClass();
     $row1->prefix = $prefix;
     $row1->id = $insert_order_id;
     if (!$this->_db->updateObject('#__kart_orders', $row1, 'id')) {
         echo $this->_db->stderr();
         return 0;
     }
     // Get Cart item detail$taxdataf
     $Quick2cartModelcart = new Quick2cartModelcart();
     $cart_id = $Quick2cartModelcart->getCartId();
     $cart_itemsdata = $Quick2cartModelcart->getCartitems();
     if (empty($orderId)) {
         $this->addSaveOrderItems($insert_order_id, $cart_itemsdata, $data, $updateOrderstatus);
     }
     // Store billing and shipping detail.
     $this->billingaddr($user->id, $data, $insert_order_id);
     //START Q2C Sample development
     $order_obj = array();
     $order_obj['order'] = $row;
     $order_obj['items'] = $cart_itemsdata;
     $dispatcher = JDispatcher::getInstance();
     JPluginHelper::importPlugin("system");
     $result = $dispatcher->trigger("OnAfterq2cOrder", array($order_obj, $data));
     //END Q2C Sample development
     /*
     $dispatcher = JDispatcher::getInstance();
     JPluginHelper::importPlugin('system');
     $plgresult = $dispatcher->trigger('qtcAfterCheckoutDetailSave',array($row->id, $data));
     */
     @$comquick2cartHelper->sendordermail($row->id);
     return $insert_order_id;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:101,代码来源:cartcheckout.php


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