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