本文整理匯總了PHP中products_minierp::calcPremiumPrice方法的典型用法代碼示例。如果您正苦於以下問題:PHP products_minierp::calcPremiumPrice方法的具體用法?PHP products_minierp::calcPremiumPrice怎麽用?PHP products_minierp::calcPremiumPrice使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類products_minierp
的用法示例。
在下文中一共展示了products_minierp::calcPremiumPrice方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: while
$q .= " WHERE p.products_id = {$pid}";
$r = tep_db_query($q);
$no_old_price = '<span style="color:#ababab;">No Old Price</span>';
while ($row = tep_db_fetch_array($r)) {
$price_old = round($product['p']['products_price_old'], 2);
$price = round($product['p']['products_price'], 2);
$net_price = product::calculateNetPrice($price, VAT);
$mat_expense = $product['p']['material_expenses'];
$cogs = product::calculateCOGS($mat_expense, $product['p']['complexity']);
$profit = product::calculateProfit($net_price, $cogs);
$profit_old = product::calculateProfit($net_price, $mat_expense);
$margin = product::calculateMargin($profit, $net_price);
$margin_is_good = $class_pm->priceMargindIsGood($price, $margin);
$margin_old = product::calculateMargin($profit_old, $net_price);
$margin_old_is_good = $class_pm->priceMargindIsGood($price, $margin_old);
$premium = $class_pm->calcPremiumPrice($price, $cogs);
$premium_old = $class_pm->calcPremiumPrice($price, $mat_expense);
$purchase_price = product::calculatePurchasePrice($cogs);
$purchase_price_old = product::calculatePurchasePrice($mat_expense);
$is_active = $row['products_status'] == '1';
$status_price = $row['jng_status_price'];
$jng_icon_eye = $is_active ? getIconEyePricesBasedOnRules($status_price, 'jg') : array();
$jng = '<img src="/images/icon-tick' . ($is_active ? '' : '-dis') . '.png" class="activation" />';
$jng .= '<br /><br />';
if ($row['jng_price_old'] > 0) {
$jng_price_old = '<span class="price-old">' . displayCurrency('EUR', $row['jng_price_old']) . '</span>';
$jng .= $jng_price_old . $jng_icon_eye['price_old'];
} else {
$jng_price_old = $no_old_price;
$jng .= $no_old_price;
}