本文整理匯總了PHP中comquick2cartHelper::getStoreProdPrice方法的典型用法代碼示例。如果您正苦於以下問題:PHP comquick2cartHelper::getStoreProdPrice方法的具體用法?PHP comquick2cartHelper::getStoreProdPrice怎麽用?PHP comquick2cartHelper::getStoreProdPrice使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類comquick2cartHelper
的用法示例。
在下文中一共展示了comquick2cartHelper::getStoreProdPrice方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: updateStoreFee
/**
* According to commission % specified in component parameter,
* fee/commission is calculated on total amount and added in kart_store table against respected store id
*
* @param INTEGER $orderid orderid.
*
* @return VOID
*/
public function updateStoreFee($orderid)
{
$comquick2cartHelper = new comquick2cartHelper();
$db = JFactory::getDBO();
$pricedetails = $comquick2cartHelper->getStoreProdPrice($orderid);
if (!empty($pricedetails)) {
$params = JComponentHelper::getParams('com_quick2cart');
$per = $params->get('commission');
foreach ($pricedetails as $key => $tprice) {
$fee = '';
$fee = (double) $tprice['totalprice'] * $per / 100;
$query = "UPDATE `#__kart_store` SET `fee`=`fee` + " . $fee . " where `id`=" . $tprice['store_id'];
$db->setQuery($query);
$db->execute();
}
}
}