本文整理汇总了PHP中mslib_fe::final_products_price方法的典型用法代码示例。如果您正苦于以下问题:PHP mslib_fe::final_products_price方法的具体用法?PHP mslib_fe::final_products_price怎么用?PHP mslib_fe::final_products_price使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mslib_fe
的用法示例。
在下文中一共展示了mslib_fe::final_products_price方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$formats[] = '100';
$formats[] = '200';
$formats[] = '300';
foreach ($formats as $format) {
if ($current_product['products_image']) {
$key = 'image_' . $format;
if ($this->imageWidth == $format) {
$key = 'image';
}
$imagePath = mslib_befe::getImagePath($current_product['products_image'], 'products', $format);
$output[$key] = '<img src="' . $imagePath . '" alt="' . htmlspecialchars($current_product['products_name']) . '" />';
} else {
$output[$key] = '<div class="no_image"></div>';
}
}
$final_price = mslib_fe::final_products_price($current_product);
$final_price_per_each = $current_product['final_price'];
if (!$this->ms['MODULES']['DB_PRICES_INCLUDE_VAT'] and ($current_product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT'])) {
$old_price = $current_product['products_price'] * (1 + $current_product['tax_rate']);
} else {
$old_price = $current_product['products_price'];
}
if ($current_product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_WITH_AND_WITHOUT_VAT']) {
$output['products_price'] .= '<div class="price_excluding_vat">' . $this->pi_getLL('excluding_vat') . ' ' . mslib_fe::amount2Cents($current_product['final_price']) . '</div>';
}
if ($current_product['products_price'] != $current_product['final_price']) {
if (!$this->ms['MODULES']['DB_PRICES_INCLUDE_VAT'] and ($current_product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT'])) {
$old_price = $current_product['products_price'] * (1 + $current_product['tax_rate']);
} else {
$old_price = $current_product['products_price'];
}
示例2: htmlspecialchars
$old_price_label = '';
}
// jcarousel
$specials_items .= '{url: \'' . $link . '\', image: \'' . $image . '\', title: \'' . htmlspecialchars(addslashes($product['products_name'])) . '\', price: \'' . $old_price_label . '\', specials_price: \'' . mslib_fe::amount2Cents($final_price) . '\'}';
if ($teller < $total) {
$specials_items .= ',';
}
$specials_items .= "\n";
} else {
if ($product['products_image']) {
$image = '<img src="' . mslib_befe::getImagePath($product['products_image'], 'products', $this->imageWidth) . '" alt="' . htmlspecialchars($product['products_name']) . '" />';
} else {
$image = '<div class="no_image"></div>';
}
// normal
$final_price = mslib_fe::final_products_price($product);
$item_products_specials_price = '';
if ($product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_WITH_AND_WITHOUT_VAT']) {
$item_products_specials_price = '<div class="price_excluding_vat">' . $this->pi_getLL('excluding_vat') . ' ' . mslib_fe::amount2Cents($product['final_price']) . '</div>';
}
$item_products_price = '';
if ($product['products_price'] != $product['final_price']) {
if ($product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT']) {
$old_price = $product['products_price'] * (1 + $product['tax_rate']);
} else {
$old_price = $product['products_price'];
}
$item_products_price = '<div class="old_price">' . mslib_fe::amount2Cents($old_price) . '</div><div class="final_price">' . mslib_fe::amount2Cents($final_price) . '</div>';
} else {
$item_products_price = '<div class="final_price">' . mslib_fe::amount2Cents($final_price) . '</div>';
}
示例3: array
$product = mslib_fe::getProduct($products_id);
}
// hook
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/get_staffel_price.php']['getProductPostProc'])) {
$params = array('products_id' => &$products_id, 'product' => &$product);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/get_staffel_price.php']['getProductPostProc'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
// hook eof
$disableFeFromCalculatingVatPrices = $this->conf['disableFeFromCalculatingVatPrices'];
$this->conf['disableFeFromCalculatingVatPrices'] = 1;
$exclude_vat_price = mslib_fe::final_products_price($product, $qty, 0) * $qty;
$this->conf['disableFeFromCalculatingVatPrices'] = $disableFeFromCalculatingVatPrices;
// count normal price
$price = mslib_fe::final_products_price($product, $qty, 0) * $qty;
$original_price = $product['products_price'] * $qty;
if ($product['tax_rate'] and $this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT']) {
//$price=round($price*(1+$product['tax_rate']), 2);
$original_price = round($original_price * (1 + $product['tax_rate']), 2);
}
$attr = array();
$original_attr = array();
if (is_array($this->get['attributes'])) {
foreach ($this->get['attributes'] as $key => $value) {
if (!$value) {
continue;
}
if (is_numeric($key)) {
$str = "SELECT products_options_name,listtype from tx_multishop_products_options o where o.products_options_id='" . $key . "' and language_id='" . $this->sys_language_uid . "'";
$qry = $GLOBALS['TYPO3_DB']->sql_query($str);
示例4: round
$tmpcontent .= round($old_product_price, 2);
} else {
$tmpcontent .= '';
}
break;
case 'products_price_excluding_vat':
$tmpcontent .= round($row['final_price'], 14);
break;
case 'products_price':
$tmpcontent .= mslib_fe::final_products_price($row);
break;
case 'products_price_currency':
$tmpcontent .= $this->ms['MODULES']['CURRENCY_ARRAY']['cu_iso_3'];
break;
case 'products_price_with_currency':
$tmpcontent .= mslib_fe::final_products_price($row) . ' ' . $this->ms['MODULES']['CURRENCY_ARRAY']['cu_iso_3'];
break;
case 'product_capital_price':
if ($this->ms['MODULES']['FLAT_DATABASE']) {
$row2 = mslib_befe::getRecord($row['products_id'], 'tx_multishop_products', 'products_id');
$tmpcontent .= $row2['product_capital_price'];
} else {
$tmpcontent .= $row['product_capital_price'];
}
break;
case 'manufacturers_id':
$tmpcontent .= $row['manufacturers_id'];
break;
case 'manufacturers_name':
if ($row['manufacturers_name']) {
$tmpcontent .= $row['manufacturers_name'];