本文整理汇总了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;
}