本文整理匯總了PHP中comquick2cartHelper::getOrderId方法的典型用法代碼示例。如果您正苦於以下問題:PHP comquick2cartHelper::getOrderId方法的具體用法?PHP comquick2cartHelper::getOrderId怎麽用?PHP comquick2cartHelper::getOrderId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類comquick2cartHelper
的用法示例。
在下文中一共展示了comquick2cartHelper::getOrderId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: mediaFileAuthorise
/**
* mediaFileAuthorise
*
* @param STRING $file_id file_id
* @param STRING $strorecall strorecall
* @param STRING $guest_email guest_email
* @param STRING $order_item_id order_item_id
*
* @return html
*/
public function mediaFileAuthorise($file_id, $strorecall, $guest_email, $order_item_id)
{
// Get store id associatd with file id
$db = JFactory::getDBO();
$query = "SELECT i.`store_id`,`file_id`,`file_display_name`,`filePath`,`purchase_required` FROM `#__kart_itemfiles` AS f\n\t\tLEFT JOIN `#__kart_items` AS i ON f.item_id=i.item_id\n\t\twhere f.`file_id`=" . $file_id;
$db->setQuery($query);
$fileDetail = $db->loadAssoc();
$comquick2cartHelper = new comquick2cartHelper();
$ret['validDownload'] = 0;
$ret['orderItemFileId'] = 0;
// FOR STORE AUTHORIZED PERSONS
if (!empty($strorecall)) {
$ret['validDownload'] = $comquick2cartHelper->store_authorize('product_default', $fileDetail['store_id']);
return $ret;
} elseif (empty($order_item_id) && $fileDetail['purchase_required'] == 0) {
// Called from product detail page
// For free media
$ret['validDownload'] = 1;
return $ret;
} else {
// Is authorized guest chekout
if (!empty($guest_email)) {
$orderid = $comquick2cartHelper->getOrderId($order_item_id);
$guest_email_chk = $comquick2cartHelper->checkmailhash($orderid, $guest_email);
if (empty($guest_email_chk)) {
// Not matched
$ret['validDownload'] = 0;
return $ret;
}
}
// Is expired date/download conunt or not
$productHelper = new productHelper();
$ret = $productHelper->validDownload($file_id, $order_item_id);
return $ret;
}
}