本文整理匯總了PHP中comquick2cartHelper::getOrderitems方法的典型用法代碼示例。如果您正苦於以下問題:PHP comquick2cartHelper::getOrderitems方法的具體用法?PHP comquick2cartHelper::getOrderitems怎麽用?PHP comquick2cartHelper::getOrderitems使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類comquick2cartHelper
的用法示例。
在下文中一共展示了comquick2cartHelper::getOrderitems方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: vendorEmail
/**
* vendorEmail
*
* @param string $order order
* @param string $orderid orderid
*
* @return Void
*/
public function vendorEmail($order, $orderid)
{
$fullorder_id = $order['order_info'][0]->prefix . $orderid;
// Getting orderitem infomation
$comquick2cartHelper = new comquick2cartHelper();
$order_details = $comquick2cartHelper->getOrderitems($orderid);
// GETTTING STORE INFORMATION
$store_array = array();
$storeinfo = array();
foreach ($order_details as $cart) {
if (!in_array($cart['store_id'], $store_array)) {
$store_array[] = $cart['store_id'];
$qtc_store_id = $cart['store_id'];
$storeinfo[$qtc_store_id] = $comquick2cartHelper->getSoreInfo($cart['store_id']);
}
}
$original_order_data = $order;
foreach ($storeinfo as $key => $sinfo) {
// Check for view override
$view = $comquick2cartHelper->getViewpath('orders', 'order');
$this->orders_site = 1;
$this->orders_email = 1;
$this->vendor_email = 1;
$this->order_authorized = 1;
// STORE RELEATED VIEW
$this->storeReleatedView = 1;
$html = '';
$temp = $original_order_data['items'];
// 3. REMOVE other verder store item information
foreach ($temp as $k => $order_item) {
if ($order_item->store_id != $key) {
unset($temp[$k]);
}
}
$this->orderinfo = $original_order_data['order_info'];
$this->vendor_email = 1;
$this->vendor_store_id = $key;
$this->orderitems = $temp;
$mainframe = JFactory::getApplication();
$site = $mainframe->getCfg('sitename');
$html = '<div>' . JText::sprintf('QTC_ORDER_VENDER_MAIL_MSG', $sinfo['title']) . '</div>';
$subject = JText::sprintf('QTC_ORDER_MAIL_SUB', $site, $fullorder_id);
ob_start();
include $view;
$html = ob_get_contents();
ob_end_clean();
$body = $html;
$comquick2cartHelper->sendmail($sinfo['store_email'], $subject, $body, '');
}
}