本文整理汇总了PHP中olc_format_price函数的典型用法代码示例。如果您正苦于以下问题:PHP olc_format_price函数的具体用法?PHP olc_format_price怎么用?PHP olc_format_price使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了olc_format_price函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: olc_get_products_attribute_price
function olc_get_products_attribute_price($attribute_price, $tax_class, $price_special, $quantity, $prefix, $calculate_currencies = TRUE_STRING_S)
{
if ($_SESSION['customers_status']['customers_status_show_price'] == '1') {
$attribute_tax = olc_get_tax_rate($tax_class);
// check if user is allowed to see tax rates
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == '0') {
$attribute_tax = '';
}
// add tax
$price_string = olc_add_tax($attribute_price, $attribute_tax) * $quantity;
if ($_SESSION['customers_status']['customers_status_discount_attributes'] == '0') {
// format price & calculate currency
$price_string = olc_format_price($price_string, $price_special, $calculate_currencies);
if ($price_special == '1') {
$price_string = BLANK . $prefix . BLANK . $price_string . BLANK;
}
} else {
$discount = $_SESSION['customers_status']['customers_status_discount'];
$rabatt_string = $price_string - $price_string / 100 * $discount;
$price_string = olc_format_price($price_string, $price_special, $calculate_currencies);
$rabatt_string = olc_format_price($rabatt_string, $price_special, $calculate_currencies);
if ($price_special == '1' && $price_string != $rabatt_string) {
$price_string = BLANK . $prefix . '<font color="ff0000"><s>' . $price_string . '</s></font> ' . $rabatt_string . BLANK;
} else {
$price_string = $rabatt_string;
if ($price_special == '1') {
$price_string = BLANK . $prefix . BLANK . $price_string;
}
}
}
} else {
$price_string = ' ' . NOT_ALLOWED_TO_SEE_PRICES;
}
return $price_string;
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:35,代码来源:olc_get_products_attribute_price.inc.php
示例2: quote
function quote($method = '')
{
// W. Kaiser - Show missing amount for free shipping
$CurrentAmount = $_SESSION['cart']->show_total();
// W. Kaiser - Free shipping national/international
require_once DIR_FS_INC . 'olc_get_free_shipping_amount.inc.php';
olc_get_free_shipping_amount();
if (FREE_AMOUNT > 0) {
$MissingAmount = FREE_AMOUNT - $CurrentAmount;
if ($MissingAmount > 0 && MODULE_SHIPPING_FREECOUNT_DISPLAY == FALSE_STRING_L) {
return;
}
// W. Kaiser - Free shipping national/international
$this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FREECOUNT_TEXT_TITLE);
if ($MissingAmount > 0) {
$this->quotes['error'] = MODULE_SHIPPING_FREECOUNT_TEXT_WAY . HTML_B_START . olc_format_price($MissingAmount, 1, 1, 1) . '</b>)';
} else {
$this->quotes['methods'] = array(array('id' => $this->code, 'title' => MODULE_SHIPPING_FREECOUNT_TEXT_WAY, 'cost' => 0));
if (olc_not_null($this->icon)) {
$this->quotes['icon'] = olc_image($this->icon, $this->title);
}
}
}
return $this->quotes;
//W. Kaiser - Show missing amount for free shippin
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:26,代码来源:freeamount.php
示例3: process
function process()
{
global $order, $currencies;
$this->title = $_SESSION['customers_status']['customers_status_ot_discount'] . ' % ' . SUB_TITLE_OT_DISCOUNT;
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == '1' && $_SESSION['customers_status']['customers_status_ot_discount'] != '0.00') {
$discount_price = olc_format_price($order->info['subtotal'], $price_special = 0, $calculate_currencies = false) / 100 * $_SESSION['customers_status']['customers_status_ot_discount'] * -1;
$this->output[] = array('title' => $this->title . ':', 'text' => '<font color="ff0000">' . olc_format_price($discount_price, $price_special = 1, $calculate_currencies = false) . '</font>', 'value' => $discount_price);
}
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:9,代码来源:ot_discount.php
示例4: process
function process()
{
global $order, $currencies;
$od_amount = $this->calculate_credit($this->get_order_total());
if ($od_amount > 0) {
$this->deduction = $od_amount;
$this->output[] = array('title' => $this->title . ':', 'text' => olc_format_price($currencies->format($od_amount), 1, false), 'value' => $od_amount);
$order->info['total'] = $order->info['total'] - $od_amount;
}
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:10,代码来源:ot_payment.php
示例5: process
function process()
{
global $order, $currencies;
$title = $this->title;
if (!CUSTOMER_SHOW_PRICE_TAX) {
if ($_SESSION['customers_status']['customers_status_add_tax_ot'] == 0) {
$title = MODULE_ORDER_TOTAL_SUBTOTAL_TITLE_NO_TAX;
}
}
$subtotal = $order->info['subtotal'];
$this->output[] = array('title' => $title . COLON, 'text' => olc_format_price($subtotal, 1, false), 'value' => $subtotal);
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:12,代码来源:ot_subtotal.php
示例6: process
function process()
{
global $order, $currencies;
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == 1) {
$sub_total_price = $order->info['subtotal'] - $order->info['subtotal'] / 100 * $_SESSION['customers_status']['customers_status_ot_discount'];
} else {
$sub_total_price = $order->info['subtotal'];
}
$this->output[] = array('title' => $this->title . ':', 'text' => HTML_B_START . olc_format_price($sub_total_price + olc_format_price($order->info['shipping_cost'], $price_special = 0, $calculate_currencies = false), $price_special = 1, $calculate_currencies = false) . HTML_B_END, 'value' => olc_format_price($sub_total_price + olc_format_price($order->info['shipping_cost'], $price_special = 0, $calculate_currencies = false), $price_special = 0, $calculate_currencies = false));
}
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:12,代码来源:ot_subtotal_no_tax.php
示例7: process
function process()
{
global $order, $currencies;
if (MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE == TRUE_STRING_S) {
$pass = false;
if ($_SESSION['shipping']['id'] != 'selfpickup_selfpickup') {
$country = $order->delivery['country_id'];
switch (MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION) {
case 'national':
if ($country == STORE_COUNTRY) {
$pass = true;
}
break;
case 'international':
if ($country != STORE_COUNTRY) {
$pass = true;
}
break;
case 'both':
$pass = true;
break;
}
}
if ($pass) {
if ($order->info['total'] - $order->info['shipping_cost'] < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) {
$delivery_country = $order->delivery['country']['id'];
$delivery_zone_id = $order->delivery['zone_id'];
$tax = olc_get_tax_rate(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS, $delivery_country, $delivery_zone_id);
$tax_description = olc_get_tax_description(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS, $delivery_country, $delivery_zone_id);
$low_order_fee = MODULE_ORDER_TOTAL_LOWORDERFEE_FEE;
$low_order_fee_tax = olc_calculate_tax($low_order_fee, $tax);
$low_order_fee = olc_add_tax($low_order_fee, $tax);
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 1) {
$order->info['tax'] += $low_order_fee_tax;
$order->info['tax_groups'][TAX_ADD_TAX . "{$tax_description}"] += $low_order_fee_tax;
$order->info['total'] += $low_order_fee;
} else {
if ($_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
$order->info['tax'] += $low_order_fee_tax;
$order->info['tax_groups'][TAX_NO_TAX . "{$tax_description}"] += $low_order_fee_tax;
}
$order->info['subtotal'] += $low_order_fee;
$order->info['total'] += $low_order_fee;
}
$this->output[] = array('title' => $this->title . ':', 'text' => olc_format_price($low_order_fee, 1, 1, 1), 'value' => $low_order_fee);
}
}
}
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:49,代码来源:ot_loworderfee.php
示例8: process
function process()
{
global $order, $currencies, $customer_id;
// if (MODULE_ORDER_TOTAL_HANDLING_HANDLING == TRUE_STRING_S) {
$freequery = olc_db_query("SELECT SUM(cb.customers_basket_quantity) AS total FROM " . TABLE_CUSTOMERS_BASKET . " cb LEFT JOIN " . TABLE_PRODUCTS . " p ON cb.products_id = p.products_id WHERE cb.customers_id = '" . $customer_id . "' AND cb.final_price < '0.01' AND p.products_price < '0.01'");
$freestuff = olc_db_fetch_array($freequery);
$freeitems = $freestuff['total'];
$handlingfree = $order->info['subtotal'] / 100 * 0.85;
$tax = olc_get_tax_rate(MODULE_ORDER_TOTAL_HANDLING_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id']);
$tax_description = olc_get_tax_description(MODULE_ORDER_TOTAL_HANDLING_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id']);
$order->info['tax'] += olc_calculate_tax($handlingfree, $tax);
$order->info['tax_groups']["{$tax_description}"] += olc_calculate_tax($handlingfree, $tax);
$order->info['total'] += $handlingfree + olc_calculate_tax($handlingfree, $tax);
$this->output[] = array('title' => $this->title . ':', 'text' => olc_format_price(olc_add_tax($handlingfree, $tax), true, $order->info['currency'], $order->info['currency_value']), 'value' => olc_add_tax($handlingfree, $tax));
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:15,代码来源:ot_handling.php
示例9: process
function process()
{
global $order, $currencies;
reset($order->info['tax_groups']);
while (list($key, $value) = each($order->info['tax_groups'])) {
if ($value > 0) {
if ($_SESSION['customers_status']['customers_status_show_price_tax'] != 0) {
$this->output[] = array('title' => $key . ':', 'text' => olc_format_price($value, $price_special = 1, $calculate_currencies = false), 'value' => olc_format_price($value, $price_special = 0, $calculate_currencies = false));
}
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
$this->output[] = array('title' => $key . ':', 'text' => olc_format_price($value, $price_special = 1, $calculate_currencies = false), 'value' => olc_format_price($value, $price_special = 0, $calculate_currencies = false));
}
}
}
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:15,代码来源:ot_tax.php
示例10: process
function process()
{
global $order, $currencies;
$total = $order->info['total'];
$tax = $order->info['tax'];
if (CUSTOMER_SHOW_PRICE_TAX) {
$title = $this->title;
} else {
if ($_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
$total += $tax;
$title = MODULE_ORDER_TOTAL_TOTAL_TITLE_NO_TAX_BRUTTO;
} else {
$title = MODULE_ORDER_TOTAL_TOTAL_TITLE_NO_TAX;
}
}
$this->output[] = array('title' => $title . ':', 'text' => HTML_B_START . olc_format_price($total, $price_special = 1, $calculate_currencies = false) . HTML_B_END, 'value' => olc_format_price($total, $price_special = 0, $calculate_currencies = false));
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:17,代码来源:ot_total.php
示例11: process
function process()
{
global $order, $currencies;
// if ($_SESSION['cot_gv']) { // old code Strider
if (isset($_SESSION['cot_gv']) && $_SESSION['cot_gv'] == true) {
$order_total = $this->get_order_total();
$od_amount = $this->calculate_credit($order_total);
if ($this->calculate_tax != "None") {
$tod_amount = $this->calculate_tax_deduction($order_total, $od_amount, $this->calculate_tax);
$od_amount = $this->calculate_credit($order_total);
}
$this->deduction = $od_amount;
// if (($this->calculate_tax == "Credit Note") && (DISPLAY_PRICE_WITH_TAX != TRUE_STRING_S)) {
// $od_amount -= $tod_amount;
// $order->info['total'] -= $tod_amount;
// }
$order->info['total'] = $order->info['total'] - $od_amount;
if ($od_amount > 0) {
$this->output[] = array('title' => $this->title . ':', 'text' => '<b><font color="ff0000">-' . olc_format_price($od_amount, $price_special = 1, $calculate_currencies = false) . '</font></b>', 'value' => olc_format_price($od_amount, $price_special = 0, $calculate_currencies = false));
}
}
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:22,代码来源:ot_gv.php
示例12: olc_oe_get_products_attribute_price
function olc_oe_get_products_attribute_price($attribute_price, $tax_class, $price_special, $quantity, $prefix, $calculate_currencies = TRUE_STRING_S, $customer_status)
{
$customers_status_query = olc_db_query("select * from " . TABLE_CUSTOMERS_STATUS . " where customers_status_id = '" . $customer_status . "' ");
$customers_status = olc_db_fetch_array($customers_status_query);
if ($customers_status['customers_status_show_price'] == '1') {
$attribute_tax = olc_get_tax_rate($tax_class);
// check if user is allowed to see tax rates
if ($customers_status['customers_status_show_price_tax'] == '0') {
$attribute_tax = '';
}
// add tax
$price_string = olc_add_tax($attribute_price, $attribute_tax) * $quantity;
if ($customers_status['customers_status_discount_attributes'] == '0') {
// format price & calculate currency
$price_string = olc_format_price($price_string, $price_special, $calculate_currencies);
if ($price_special == '1') {
$price_string = BLANK . $prefix . BLANK . $price_string . BLANK;
}
} else {
$discount = $customers_status['customers_status_discount'];
$rabatt_string = $price_string - $price_string / 100 * $discount;
$price_string = olc_format_price($price_string, $price_special, $calculate_currencies);
$rabatt_string = olc_format_price($rabatt_string, $price_special, $calculate_currencies);
if ($price_special == '1' && $price_string != $rabatt_string) {
$price_string = BLANK . $prefix . '<font color="ff0000"><s>' . $price_string . '</s></font> ' . $rabatt_string . BLANK;
} else {
$price_string = $rabatt_string;
if ($price_special == '1') {
$price_string = BLANK . $prefix . BLANK . $price_string;
}
}
}
} else {
$price_string = ' ' . NOT_ALLOWED_TO_SEE_PRICES;
}
return $price_string;
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:37,代码来源:olc_oe_get_products_attribute_price.inc.php
示例13: array
</td>
</tr>
</table>
</td>
</tr>
';
}
}
}
if ($session_change) {
// restore old session data
$_SESSION = array();
$_SESSION = $old_session;
}
if ($cart_total > 0) {
$main_content .= str_replace(HASH, TEXT_VALUE_OF_CARTS . olc_format_price($cart_total, true, true), $whos_online_end_row);
}
}
$main_content .= str_replace(HASH, sprintf(TEXT_NUMBER_OF_CUSTOMERS, $visitors), $whos_online_end_row);
$main_content .= '
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
';
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:livehelp.php
示例14: define
Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contributions:
freeamountv2-p1 Autor: dwk
(c) 2004 XT - Commerce; www.xt-commerce.com
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
define('MODULE_SHIPPING_FREECOUNT_TEXT_TITLE', 'Free Shipping');
define('MODULE_SHIPPING_FREECOUNT_TEXT_DESCRIPTION', 'Free Shipping w/ Minimum Order Amount');
//define('MODULE_SHIPPING_FREECOUNT_TEXT_WAY', 'w/ $' . MODULE_SHIPPING_FREECOUNT_AMOUNT . ' minimum order');
//W. Kaiser
require_once DIR_FS_INC . 'olc_format_price.inc.php';
// W. Kaiser - Free shipping national/international
require_once DIR_FS_INC . 'olc_get_free_shipping_amount.inc.php';
olc_get_free_shipping_amount();
// W. Kaiser - Free shipping national/international
define('MODULE_SHIPPING_FREECOUNT_TEXT_WAY', 'From <b>' . olc_format_price(FREE_AMOUNT, $price_special = 1, $calculate_currencies = false) . '</b> order value onwardswie ship your order <b>without</b> shipping cost!<br/>' . ' (<font color="red"><b>Missing order amount for free shipment: </b></font>');
//W. Kaiser
define('MODULE_SHIPPING_FREECOUNT_SORT_ORDER', 'Sort Order');
define('MODULE_SHIPPING_FREEAMOUNT_ALLOWED_TITLE', 'Allowed Zones');
define('MODULE_SHIPPING_FREEAMOUNT_ALLOWED_DESC', 'Please enter the zones <b>separately</b> which should be allowed to use this modul (e. g. AT,DE (leave empty if you want to allow all zones))');
define('MODULE_SHIPPING_FREECOUNT_STATUS_TITLE', 'Enable Free Shipping with Minimum Purchase');
define('MODULE_SHIPPING_FREECOUNT_STATUS_DESC', 'Do you want to offer free shipping?');
define('MODULE_SHIPPING_FREECOUNT_DISPLAY_TITLE', 'Enable Display');
define('MODULE_SHIPPING_FREECOUNT_DISPLAY_DESC', 'Do you want to display text way if the minimum amount is not reached?');
define('MODULE_SHIPPING_FREECOUNT_AMOUNT_TITLE', 'Minimum Cost');
define('MODULE_SHIPPING_FREECOUNT_AMOUNT_DESC', 'Minimum order amount purchased before shipping is free?');
define('MODULE_SHIPPING_FREECOUNT_SORT_ORDER_TITLE', 'Display order');
define('MODULE_SHIPPING_FREECOUNT_SORT_ORDER_DESC', 'Lowest will be displayed first.');
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:30,代码来源:freeamount.php
示例15: olc_get_products_attribute_price_checkout
$data_products .= '
<tr>
<td class="main" nowrap="nowrap" align="left" valign="top" width="">' . $products_qty . ' x ' . $order_products['name'] . ' </td>
<td class="main" align="right" valign="top">' . $single_price . '</td>
<td class="main" align="right" valign="top">' . $total_price . '</td>
</tr>
';
$products_attributes = $order_products['attributes'];
if (sizeof($products_attributes) > 0) {
for ($j = 0, $n2 = sizeof($products_attributes); $j < $n2; $j++) {
$products_attribute = $products_attributes[$j];
$products_attribute_price = $products_attribute['price'];
if ($products_attribute_price != 0) {
$products_attribute_price_single = olc_get_products_attribute_price_checkout($products_attribute_price, $order_products['tax'], 1, $products_qty, $products_attribute['prefix']);
if ($products_qty != 1) {
$products_attribute_price_total = olc_format_price($products_attribute_price * $products_qty, true, true);
} else {
$products_attribute_price_total = $products_attribute_price_single;
}
} else {
$products_attribute_price = EMPTY_STRING;
}
$data_products .= ' <tr>
<td class="main" align="left" valign="top">
<nobr><small> <i> - ' . $products_attribute['option'] . COLON_BLANK . $products_attribute['value'] . '
</i></small>
</td>
<td class="main" align="right" valign="top"><i><small>' . $products_attribute_price_single . ' </i></small></nobr>
</td>
<td class="main" align="right" valign="top"><i><small>' . $products_attribute_price_single . ' </i></small></nobr>
</td>
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:checkout_confirmation.php
示例16: ProductsDataSheet
function ProductsDataSheet($languages_id, $products_id)
{
global $currencies;
global $docfilename;
//Convertion pixels -> mm
$this->pdf_to_mm_faktor = 1 / $this->k;
$imagewidth = PRODUCT_IMAGE_INFO_WIDTH * $this->pdf_to_mm_faktor;
$imageheight = PRODUCT_IMAGE_INFO_HEIGHT * $this->pdf_to_mm_faktor;
//W. Kaiser -- AJAX
//Use 'product_info.php' also for printing!!
$isprint_version = true;
$is_pdf = true;
include DIR_WS_MODULES . 'product_info.php';
//W. Kaiser -- AJAX
global $products_data;
//Get Data fram Smarty
$products_data = array();
$products_data[] = $imagewidth;
$products_data[] = $imageheight;
while (list($key, $value) = each($info_smarty->_tpl_vars)) {
$products_data[$key] = $value;
}
require_once DIR_FS_INC . 'olc_get_smarty_config_variable.inc.php';
$products_data['SHIPPING_DESC'] = olc_get_smarty_config_variable($info_smarty, 'product_info', 'text_shippingtime');
$this->AddPage();
$this->DrawCells($products_data);
$this->SetY(max($this->y_after_description, $this->y_after_image) + $this->cells_height);
if (PDF_SHOW_OPTIONS) {
$products_options_name_sql = "\n\t\t\t\tselect distinct\n\t\t\t\tpopt.products_options_id,\n\t\t\t\tpopt.products_options_name\n\t\t\t\tfrom " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib\n\t\t\t\twhere\n\t\t\t\tpatrib.products_id='" . $products_id . "' and\n\t\t\t\tpatrib.options_id = popt.products_options_id and\n\t\t\t\tpopt.language_id = '" . SESSION_LANGUAGE_ID . APOS;
$products_options_name = olc_db_query($products_options_name_sql);
if (olc_db_num_rows($products_options_name)) {
$this->DrawSeparatorLine();
//pov.products_options_values_thumbnail,
$products_options_sql0 = "\n\t\t\t\tselect\n\t\t\t\tpov.products_options_values_id,\n\t\t\t\tpov.products_options_values_name,\n\t\t\t\tpa.options_values_price,\n\t\t\t\tpa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where\n\t\t\t\tpa.products_id = '" . $products_id . "'\n\t\t\t\tand pa.options_id = '#'\n\t\t\t\tand pa.options_values_id = pov.products_options_values_id\n\t\t\t\tand pov.language_id = '" . SESSION_LANGUAGE_ID . "'\n\t\t\t\torder by pov.products_options_values_name";
$this->SetFont($this->font, BOLD, 10);
$special_price_color_text = explode(COMMA, PDF_SPECIAL_PRICE_COLOR_TEXT);
$this->SetTextColor($special_price_color_text[0], $special_price_color_text[1], $special_price_color_text[2]);
$this->MultiCell(0, 8, TEXT_PRODUCTS_OPTIONS . $print_catalog_array['name'], 0, LEFT, 0);
$this->SetFont($this->font, EMPTY_STRING, 8);
$options_color_text = explode(COMMA, PDF_OPTIONS_COLOR);
$this->SetTextColor($options_color_text[0], $options_color_text[1], $options_color_text[2]);
$options_color_text = explode(COMMA, PDF_OPTIONS_BG_COLOR);
$this->SetFillColor($options_color_text[0], $options_color_text[1], $options_color_text[2]);
if (PDF_OPTIONS_AS_IMAGES_ENABLED == TRUE_STRING_S) {
//OAI query
if (PDF_SHOW_OPTIONS_VERTICAL != 0) {
while ($products_options_name_values = olc_db_fetch_array($products_options_name)) {
$this->Ln(6);
$this->SetFont($this->font, BOLD, 11);
$this->Cell(190, $this->cells_height, $products_options_name_values['products_options_name'], 0, 0, LEFT);
$this->Ln();
$products_options_sql = str_replace(HASH, $products_options_name_values['products_options_id'], $products_options_sql0);
$products_options = olc_db_query($products_options_sql);
$count_options_values = olc_db_num_rows($products_options);
$count_options = 0;
$largest_y = $this->GetY();
//OAI query
$products_options_query = olc_db_query($products_options_query_sql);
while ($products_options_values = olc_db_fetch_array($products_options_query)) {
$products_options_values_name = $products_options_values['products_options_values_name'];
$w = $this->GetStringWidth($products_options_values_name) + 2;
$this->SetFont($this->font, EMPTY_STRING, 10);
$this->SetTextColor($body_color_text[0], $body_color_text[1], $body_color_text[2]);
$option_string = $products_options_values_name;
$current_x = $this->GetX();
if (PDF_SHOW_OPTIONS_PRICE) {
$options_values_price = $products_options_values['options_values_price'];
if ($options_values_price != ' 0.0000') {
$option_string .= LPAREN . $products_options_values['price_prefix'] . olc_format_price($options_values_price, true, true, true) . RPAREN;
}
}
$count_options++;
$add_to = $count_options_values != $count_options ? ',' : '.';
$this->Write($this->cells_height, $option_string . $add_to);
$largest_y = $this->GetY();
$next_x = $this->GetX();
if ($products_options_name_values['products_options_images_enabled'] == TRUE_STRING_S) {
$path_to_image = DIR_IMAGE . 'options/' . $products_options_values['products_options_values_thumbnail'];
$img_size = GetImageSize($path_to_image);
$img_h = $img_size[1] * $this->pdf_to_mm_faktor;
$img_w = $img_size[0] * $this->pdf_to_mm_faktor;
if ($next_x < $current_x + $img_w) {
$next_x = $current_x + $img_w;
}
$current_y = $this->GetY();
$image_y = $this->GetY() + $this->cells_height;
$largest_y = $image_y + $img_h;
$this->SetY($image_y);
$this->SetX($current_x);
$this->ShowImage($img_w, $img_h, $path_to_image);
//, false, 0);
$this->SetY($current_y);
$this->SetX($next_x);
}
$this->Cell(3, 6, EMPTY_STRING, 0, 0, CENTER);
$this->SetTextColor('Black');
}
$this->SetY($largest_y);
}
} else {
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:101,代码来源:pdf_datasheet_functions.php
示例17: olc_db_query
//get all auction templates
$auctionssql = SELECT . "predef_id, quantity, title, subtitle, c.name catname, cat1, startprice, binprice, duration,\n\tt.name typename FROM " . TABLE_AUCTION_PREDEFINITION . " p, " . TABLE_EBAY_CATEGORIES . " c, " . TABLE_EBAY_AUCTIONTYPE . " t\n\twhere\n\tp.cat1 = c.id and\n\tp.auction_type = t.id " . $ordersql;
$myauctions = olc_db_query($auctionssql);
/* define Table Heading */
$heading = array(array($name_text => AUCTIONS_TEXT_AUCTION_PREDEF_ID, $attributes_text => $align_right_text, $sort_text => str_replace(HASH, $predef_id_text, $sort0), $link_text => $file . $predef_id_text), array($name_text => AUCTIONS_TEXT_AUCTION_AMOUNT, $attributes_text => $align_right_text, $sort_text => str_replace(HASH, $product_id_text, $sort0), $link_text => $file . $product_id_text), array($name_text => AUCTIONS_TEXT_AUCTION_CAT, $attributes_text => $align_right_text, $sort_text => str_replace(HASH, $cat1_text, $sort0), $link_text => $file . $cat1_text), array($name_text => AUCTIONS_TEXT_AUCTION_START_PRICE, $attributes_text => $align_right_text, $sort_text => str_replace(HASH, $startprice_text, $sort0), $link_text => $file . $startprice_text), array($name_text => AUCTIONS_TEXT_AUCTION_BUYNOW_PRICE, $attributes_text => $align_right_text, $sort_text => str_replace(HASH, $binprice_text, $sort0), $link_text => $file . $binprice_text), array($name_text => AUCTIONS_TEXT_AUCTION_PREDEF_DURATION, $attributes_text => $align_right_text, $sort_text => str_replace(HASH, $duration_text, $sort0), $link_text => $file . $duration_text), array($name_text => AUCTIONS_TEXT_AUCTION_PREDEF_TYPE, $attributes_text => $align_right_text, $sort_text => str_replace(HASH, $typename_text, $sort0), $link_text => $file . $typename_text, array($name_text => HTML_NBSP)));
/* print table heading */
$main_content .= tableheading($heading);
$i = 0;
while ($auctions_values = olc_db_fetch_array($myauctions)) {
/* define content array */
$i++;
if ($i % 2 == 0) {
$class = $dataTableRow_1_text;
} else {
$class = $dataTableRow_text;
}
$startprice = $auctions_values[$startprice_text];
$startprice = $startprice == 0 ? DASH : olc_format_price($startprice, 1, 1, 1);
$binprice = $auctions_values[$binprice_text];
$binprice = $binprice == 0 ? DASH : olc_format_price($binprice, 1, 1, 1);
$content = array($cssclass_text => $class, $values_text => array(array($value_text => $auctions_values[$predef_id_text], $link_text => $getItem_text . $auctions_values[$predef_id_text], $linkattribute_text => $target_blank_text), array($value_text => $auctions_values[$quantity_text] . $x_text . $auctions_values[$title_text] . HTML_BR . $auctions_values[$subtitle_text]), array($value_text => $auctions_values[$catname_text] . HTML_BR . "(" . $auctions_values[$cat1_text] . RPAREN, $attributes_text => $align_right_text), array($value_text => $startprice, $attributes_text => $align_right_text), array($value_text => $binprice, $attributes_text => $align_right_text), array($value_text => $auctions_values[$duration_text] . AUCTIONS_TEXT_AUCTION_DURATION_DAYS), array($value_text => $auctions_values[$typename_text], $attributes_text => $align_right_text), array($value_text => olc_draw_form('edit_form', FILENAME_AUCTIONS_NEW) . olc_draw_hidden_field('id', $auctions_values[$predef_id_text]) . olc_draw_submit_button('edit', AUCTIONS_TEXT_AUCTION_PREDEF_ACCEPT) . '
</form>', $attributes_text => $align_right_text)));
/* print content table */
$main_content .= tablecontent($content);
}
$page_header_title = AUCTIONS_TEXT_HEADER;
$page_header_subtitle = AUCTIONS_TEXT_SUB_HEADER_PREDEF;
$page_header_icon_image = HEADING_MODULES_ICON;
$show_column_right = true;
$no_left_menu = false;
require PROGRAM_FRAME;
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:auctions_predefined.php
示例18: olc_price_adjust
function olc_price_adjust($price, $faktor)
{
$price = $price * $faktor;
return olc_format_price($price, true, true, true);
}
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:5,代码来源:379.php
示例19: olc_db_query
<td nowrap="nowrap" width="142" class="main" style="border: 1px solid;">
<?php
$personal_offer0 = $staffel_values['personal_offer'];
$personal_offer = $personal_offer0;
if ($is_brutto) {
/*
$tax_query = olc_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_class_id = '" .
$pInfo->products_tax_class_id . "' ");
$tax = olc_db_fetch_array($tax_query);
*/
$personal_offer = $personal_offer * $tax_rate;
}
$products_price = olc_round($personal_offer, PRICE_PRECISION);
echo $products_price;
if ($is_brutto) {
echo ' <br/>' . TEXT_NETTO . HTML_B_START . olc_format_price(olc_round($personal_offer0, PRICE_PRECISION), 1, 1) . '</b> ';
}
?>
</td>
<td width="80" align="left"><?php
echo olc_draw_separator('pixel_trans.gif', '1', '10');
?>
<a href="<?php
echo olc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&function=delete&quantity=' . $staffel_values['quantity'] . '&statusID=' . $products_id . '&action=new_product&pID=' . $_GET['pID']);
?>
">
<?php
echo olc_image_button('button_delete.gif', IMAGE_DELETE);
?>
</a>
</td>
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:group_prices.php
示例20: tableheading
/* print table heading */
$main_content = tableheading($heading);
$i = 0;
while ($auctions_values = olc_db_fetch_array($myauctions)) {
$mybidcount = $auctions_values[$bidcount_text];
if ($mybidcount == 0) {
$currentprice = DASH;
} else {
$currentprice = olc_format_price($auctions_values[$bidprice_text], 1, 1, 1);
}
/* define content array */
$i++;
if ($i % 2 == 0) {
$class = $dataTableRow_1_text;
} else {
$class = $dataTableRow_text;
}
$startprice = $auctions_values[$startprice_text];
$startprice = $startprice == 0 ? DASH : olc_format_price($startprice, 1, 1, 1);
$buynowprice = $auctions_values[$buynowprice_text];
$buynowprice = $buynowprice == 0 ? DASH : olc_format_price($buynowprice, 1, 1, 1);
$auction_title = $auctions_values[$auction_title_text];
$auction_id = $auctions_values[$auction_id_text];
$content = array($cssclass_text => $class, $values_text => array(array($value_text => $auctions_values[$quantity_text] . $x_text . $auction_title, $link_text => EBAY_SERVER . EBAY_VIEWITEM . $auction_title . APOS, $linkattribute_text => $target_blank_text, $attributes_text => $align_right_text), array($value_text => $auction_id, $link_text => $getItem_text . $auction_id, $linkattribute_text => $target_blank_text, $attributes_text => $align_right_text), array($value_text => $startprice, $attributes_text => $align_right_text), array($value_text => $buynowprice, $attributes_text => $align_right_text), array($value_text => GMT1($auctions_values[$starttime_text]), $attributes_text => $align_right_text), array($value_text => GMT1($auctions_values[$endtime_text]), $attributes_text => $align_right_text), array($value_text => $mybidcount, $attributes_text => $align_right_text), array($value_text => $currentprice, $attributes_text => $align_right_text)));
/* print content table */
$main_content .= tablecontent($content);
}
$page_header_subtitle = AUCTIONS_TEXT_SUB_HEADER_AUCTION_LIST;
$show_column_right = true;
$no_left_menu = false;
require PROGRAM_FRAME;
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:auctions_list.php
|
请发表评论