本文整理汇总了PHP中currencies::display_price方法的典型用法代码示例。如果您正苦于以下问题:PHP currencies::display_price方法的具体用法?PHP currencies::display_price怎么用?PHP currencies::display_price使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类currencies
的用法示例。
在下文中一共展示了currencies::display_price方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: currencies
function convert_product_attributes_result($attributes_values, $load_option_name = true, $can_operate = false)
{
if ($load_option_name) {
$attributes_values->fields['products_options_name'] = zen_options_name($attributes_values->fields['options_id']);
$attributes_values->fields['products_options_values_name'] = zen_values_name($attributes_values->fields['options_values_id']);
}
$attributes_values->fields['products_display_price'] = $attributes_values->fields['price_prefix'] . $attributes_values->fields['options_values_price'];
$attributes_values->fields['products_attributes_display_weight'] = $attributes_values->fields['products_attributes_weight_prefix'] . $attributes_values->fields['products_attributes_weight'];
require_once DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$attributes_price_final = zen_get_attributes_price_final($attributes_values->fields["products_attributes_id"], 1, $attributes_values, 'false');
$attributes_price_final_value = $attributes_price_final;
$attributes_price_final = $currencies->display_price($attributes_price_final, zen_get_tax_rate(1), 1);
$attributes_price_final_onetime = zen_get_attributes_price_final_onetime($attributes_values->fields["products_attributes_id"], 1, $attributes_values);
$attributes_price_final_onetime = $currencies->display_price($attributes_price_final_onetime, zen_get_tax_rate(1), 1);
$new_attributes_price = '';
if ($attributes_values->fields["attributes_discounted"]) {
$new_attributes_price = zen_get_attributes_price_final($attributes_values->fields["products_attributes_id"], 1, '', 'false');
$new_attributes_price = zen_get_discount_calc($attributes_values->fields['products_id'], true, $new_attributes_price);
if ($new_attributes_price != $attributes_price_final_value) {
$new_attributes_price = '|' . $currencies->display_price($new_attributes_price, zen_get_tax_rate(1), 1);
} else {
$new_attributes_price = '';
}
}
$attributes_values->fields['attributes_display_price_final'] = $attributes_price_final . $new_attributes_price . ' ' . $attributes_price_final_onetime;
// status
$attributes_values->fields['products_status'] = "";
foreach ($this->statuses as $type => $icon_info) {
$attributes_values->fields['products_status'] .= self::make_status_link($attributes_values->fields, $type, $icon_info['color'], $icon_info['alt'], $can_operate);
}
return $attributes_values->fields;
}
示例2:
?>
</td>
<td class="main"><?php
echo zen_draw_input_field('discount_price[' . $discount_name[$i]['id'] . ']', $discount_name[$i]['discount_price']);
?>
</td>
// Dual Pricing start
<td class="main"><?php
echo zen_draw_input_field('discount_price_w[' . $discount_name[$i]['id'] . ']', $discount_name[$i]['discount_price_w']);
?>
</td>
<?php
if (DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {
?>
<td class="main" align="right"><?php
echo $currencies->display_price($discounted_price, '', 1) . ' ' . $currencies->display_price($discounted_price, zen_get_tax_rate(1), 1);
?>
</td>
<td class="main" align="right"><?php
echo $currencies->display_price_w($discounted_price_w, '', 1) . ' ' . $currencies->display_price_w($discounted_price_w, zen_get_tax_rate(1), 1);
?>
</td>
<td class="main" align="right"><?php
echo ' x ' . number_format($discount_name[$i]['discount_qty']) . ' = ' . $currencies->display_price($discounted_price, '', $discount_name[$i]['discount_qty']) . ' ' . $currencies->display_price($discounted_price, zen_get_tax_rate(1), $discount_name[$i]['discount_qty']);
?>
</td>
<td class="main" align="right"><?php
echo ' x ' . number_format($discount_name[$i]['discount_qty']) . ' = ' . $currencies->display_price_w($discounted_price_w, '', $discount_name[$i]['discount_qty']) . ' ' . $currencies->display_price_w($discounted_price_w, zen_get_tax_rate(1), $discount_name[$i]['discount_qty']);
?>
</td>
<?php
示例3:
$limit = @mysql_result($groups_query, 0, "customers_status_accumulated_limit");
$current_discount = @mysql_result($groups_query, 0, "customers_status_discount");
if ($customer['customers_status'] != $customers_groups_id) {
if ($changed) {
// send emails
// assign language to template for caching
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = false;
// set dirs manual
$vamTemplate->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$vamTemplate->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/');
$vamTemplate->assign('CUSTOMERNAME', $check_status['customers_name']);
$vamTemplate->assign('EMAIL', $check_status['customers_email_address']);
$vamTemplate->assign('GROUPNAME', $customers_groups_name);
$vamTemplate->assign('GROUPDISCOUNT', $current_discount);
$vamTemplate->assign('ACCUMULATED_LIMIT', $currencies->display_price($limit, 0));
//email to admin
$html_mail_admin = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/accumulated_discount_admin.html');
$txt_mail_admin = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/accumulated_discount_admin.txt');
vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER, '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', EMAIL_ACC_SUBJECT, $html_mail_admin, $txt_mail_admin);
//email to customer
$html_mail_customer = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/accumulated_discount_customer.html');
$txt_mail_customer = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/accumulated_discount_customer.txt');
vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $check_status['customers_email_address'], $check_status['customers_name'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', EMAIL_ACC_SUBJECT, $html_mail_customer, $txt_mail_customer);
}
}
}
// eof denuz added accumulated discount
}
if ($order_updated == true) {
$messageStack->add_session(BUS_ORDER . $this_orderID . ' ' . BUS_SUCCESS, 'success');
示例4:
$link_to = '<a href="orders.php?action=edit&oID=' . $affiliate_sales['affiliate_orders_id'] . '">' . $affiliate_sales['affiliate_orders_id'] . '</a>';
?>
<td class="dataTableContent"><?php
echo $affiliate_sales['affiliate_firstname'] . " " . $affiliate_sales['affiliate_lastname'];
?>
</td>
<td class="dataTableContent" align="center"><?php
echo vam_date_short($affiliate_sales['affiliate_date']);
?>
</td>
<td class="dataTableContent" align="right"><?php
echo $link_to;
?>
</td>
<td class="dataTableContent" align="right"> <?php
echo $currencies->display_price($affiliate_sales['affiliate_value'], '');
?>
</td>
<td class="dataTableContent" align="right"><?php
echo $affiliate_sales['affiliate_percent'] . "%";
?>
</td>
<td class="dataTableContent" align="right"> <?php
echo $currencies->display_price($affiliate_sales['affiliate_payment'], '');
?>
</td>
<td class="dataTableContent" align="center"><?php
if ($affiliate_sales['orders_status']) {
echo $affiliate_sales['orders_status'];
} else {
echo TEXT_DELETED_ORDER_BY_ADMIN;
示例5:
for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
if ($order->products[$i]['attributes'][$j]['price'] != '0') {
echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
}
echo '</i></small></nobr>';
}
}
// BOF: Attributes Product Codes - If product code exists, use it, else default to product model.
echo ' </td>' . "\n";
if (tep_not_null($order->products[$i]['code'])) {
echo ' <td class="dataTableContent" valign="top">' . $order->products[$i]['code'] . '</td>' . "\n";
} else {
echo ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
}
echo ' <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->display_price($order->products[$i]['final_price'], 0, 1, $order->info['currency']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], 1, $order->info['currency']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->display_price($order->products[$i]['final_price'], 0, $order->products[$i]['qty'], $order->info['currency']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty'], $order->info['currency']) . '</b></td>' . "\n";
echo ' </tr>' . "\n";
}
?>
<tr>
<td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
echo ' <tr>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n";
}
?>
</table></td>
</tr>
</table></td>
</tr>
<tr>
示例6: while
echo '<tr class="dataTableRow">' . "\n";
echo '<td class="dataTableContent" align="right"><b>' . ADDPRODUCT_TEXT_STEP . ' 3: </b></td>' . "\n";
echo '<td class="dataTableContent" valign="top" colspan="2"><i>' . ADDPRODUCT_TEXT_OPTIONS_NOTEXIST . '</i></td>' . "\n";
echo '</tr>' . "\n";
$_POST['step'] = 4;
} else {
echo '<tr class="dataTableRow">' . tep_draw_form('addProduct', FILENAME_ORDERS_EDIT, 'oID=' . $_GET['oID'] . '&action=' . $_GET['action']) . "\n";
echo '<td class="dataTableContent" align="right"><b>' . ADDPRODUCT_TEXT_STEP . ' 3: </b></td><td class="dataTableContent" valign="top">';
$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $_POST['add_product_products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int) $languages_id . "' order by popt.products_options_name");
while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
$products_options_array = array();
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $_POST['add_product_products_id'] . "' and pa.options_id = '" . (int) $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int) $languages_id . "'");
while ($products_options = tep_db_fetch_array($products_options_query)) {
$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
if ($products_options['options_values_price'] != '0') {
$products_options_array[sizeof($products_options_array) - 1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ') ';
}
}
if (isset($_POST['add_product_options'])) {
$selected_attribute = $_POST['add_product_options'][$products_options_name['products_options_id']];
} else {
$selected_attribute = false;
}
echo $products_options_name['products_options_name'] . ':' . "\n";
echo tep_draw_pull_down_menu('add_product_options[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute) . '<br />' . "\n";
}
echo '</td>';
echo '<td class="dataTableContent" align="center"><input type="submit" value="' . ADDPRODUCT_TEXT_OPTIONS_CONFIRM . '">';
echo '<input type="hidden" name="add_product_categories_id" value=' . $_POST['add_product_categories_id'] . '>';
echo '<input type="hidden" name="add_product_products_id" value=' . $_POST['add_product_products_id'] . '>';
echo '<input type="hidden" name="step" value="4">';
示例7:
</tr>
<tr>
<td colspan="10"><?php
echo zen_black_line();
?>
</td>
</tr>
<tr>
<?php
} else {
// attributes display listing
// calculate current total attribute price
// $attributes_values
$attributes_price_final = zen_get_attributes_price_final($attributes_values->fields["products_attributes_id"], 1, $attributes_values, 'false');
$attributes_price_final_value = $attributes_price_final;
$attributes_price_final = $currencies->display_price($attributes_price_final, zen_get_tax_rate($product_check->fields['products_tax_class_id']), 1);
$attributes_price_final_onetime = zen_get_attributes_price_final_onetime($attributes_values->fields["products_attributes_id"], 1, $attributes_values);
$attributes_price_final_onetime = $currencies->display_price($attributes_price_final_onetime, zen_get_tax_rate($product_check->fields['products_tax_class_id']), 1);
?>
<td class="smallText"> <?php
echo $attributes_values->fields["products_attributes_id"];
?>
</td>
<td class="smallText"> <?php
// echo $products_name_only;
?>
</td>
<td class="smallText"> <?php
echo $options_name;
?>
</td>
示例8:
</tr>
<tr>
<td colspan="10"><?php
echo zen_black_line();
?>
</td>
</tr>
<tr>
<?php
} else {
// attributes display listing
// calculate current total attribute price
// $attributes_values
$attributes_price_final = zen_get_attributes_price_final($attributes_values->fields["products_attributes_id"], 1, $attributes_values, 'false');
$attributes_price_final_value = $attributes_price_final;
$attributes_price_final = $currencies->display_price($attributes_price_final, zen_get_tax_rate(1), 1);
$attributes_price_final_onetime = zen_get_attributes_price_final_onetime($attributes_values->fields["products_attributes_id"], 1, $attributes_values);
$attributes_price_final_onetime = $currencies->display_price($attributes_price_final_onetime, zen_get_tax_rate(1), 1);
?>
<td class="smallText"> <?php
echo $attributes_values->fields["products_attributes_id"];
?>
</td>
<td class="smallText"> <?php
// echo $products_name_only;
?>
</td>
<td class="smallText"> <?php
echo $options_name;
?>
</td>
示例9:
//loop all the products in the order
$products_ordered_attributes = '';
// Raymond Burns not sure about code below. THIS SEEMS TO BE DEPRECATED CODE TO BE REMOVED
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
$products_ordered_attributes .= "\n\t" . $order->products[$i]['attributes'][$j]['option'] . ' ' . $order->products[$i]['attributes'][$j]['value'];
}
}
/* ** Altered for CCGV ** */
$total_weight += $order->products[$i]['qty'] * $order->products[$i]['weight'];
$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
$total_cost += $total_products_price;
/* ** EOF alterations for CCGV ** */
if ($order->products[$i]['model']) {
/* ** Altered for Mail Manager **/
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n" . '<br />';
} else {
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n" . '<br />';
}
/* ** EOF alteration for Mail Manager **/
}
$Text_Billing_Adress = "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . $order->billing['name'] . "\n";
if ($order->billing['company']) {
$Text_Billing_Adress .= $order->billing['company'] . "\n";
}
$Text_Billing_Adress .= $order->billing['street_address'] . "\n";
if ($order->billing['suburb']) {
$Text_Billing_Adress .= $order->billing['suburb'] . "\n";
}
$Text_Billing_Adress .= $order->billing['city'] . "\n";
if ($order->billing['state']) {
示例10: count
}
$affiliate_amount = $affiliate_sales['total'];
if ($affiliate_transactions > 0) {
$affiliate_average = tep_round($affiliate_amount / $affiliate_transactions, 2);
} else {
$affiliate_average = "n/a";
}
$affiliate_commission = $affiliate_sales['payment'];
$affiliates_raw = "select count(*) as count from " . TABLE_AFFILIATE . "";
$affiliates_raw_query = tep_db_query($affiliates_raw);
$affiliates_raw = tep_db_fetch_array($affiliates_raw_query);
$affiliate_number = $affiliates_raw['count'];
$heading = array();
$contents = array();
$heading[] = array('params' => 'class="menuBoxHeading"', 'text' => BOX_TITLE_AFFILIATES);
$contents[] = array('params' => 'class="infoBox"', 'text' => BOX_ENTRY_AFFILIATES . ' ' . $affiliate_number . '<br>' . BOX_ENTRY_CONVERSION . ' ' . $affiliate_conversions . '<br>' . BOX_ENTRY_COMMISSION . ' ' . $currencies->display_price($affiliate_commission, ''));
$box = new box();
echo $box->menuBox($heading, $contents);
echo '<br>';
//
$contents = array();
if (getenv('HTTPS') == 'on') {
$size = getenv('SSL_CIPHER_ALGKEYSIZE') ? getenv('SSL_CIPHER_ALGKEYSIZE') . '-bit' : '<i>' . BOX_CONNECTION_UNKNOWN . '</i>';
$contents[] = array('params' => 'class="infoBox"', 'text' => tep_image(DIR_WS_ICONS . 'locked.gif', ICON_LOCKED, '', '', 'align="right"') . sprintf(BOX_CONNECTION_PROTECTED, $size));
} else {
$contents[] = array('params' => 'class="infoBox"', 'text' => tep_image(DIR_WS_ICONS . 'unlocked.gif', ICON_UNLOCKED, '', '', 'align="right"') . BOX_CONNECTION_UNPROTECTED);
}
$box = new box();
echo $box->tableBlock($contents);
?>
</td>
示例11: array
break;
default:
if (is_object($aInfo)) {
$heading[] = array('text' => HTML_B_START . $aInfo->affiliate_firstname . BLANK . $aInfo->affiliate_lastname . HTML_B_END);
$contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_AFFILIATE, olc_get_all_get_params(array('acID', 'action')) . 'acID=' . $aInfo->affiliate_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_AFFILIATE, olc_get_all_get_params(array('acID', 'action')) . 'acID=' . $aInfo->affiliate_id . '&action=confirm') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . olc_href_link(FILENAME_AFFILIATE_CONTACT, 'selected_box=affiliate&affiliate=' . $aInfo->affiliate_email_address) . '">' . olc_image_button('button_email.gif', IMAGE_EMAIL) . HTML_A_END);
$affiliate_sales_raw = "select count(*) as count, sum(affiliate_value) as total, sum(affiliate_payment) as payment from " . TABLE_AFFILIATE_SALES . " a left join " . TABLE_ORDERS . " o on (a.affiliate_orders_id=o.orders_id)\n where o.orders_status >= " . AFFILIATE_PAYMENT_ORDER_MIN_STATUS . " and affiliate_id = '" . $aInfo->affiliate_id . APOS;
$affiliate_sales_values = olc_db_query($affiliate_sales_raw);
$affiliate_sales = olc_db_fetch_array($affiliate_sales_values);
$contents[] = array('text' => HTML_BR . TEXT_DATE_ACCOUNT_CREATED . BLANK . olc_date_short($aInfo->date_account_created));
$contents[] = array('text' => EMPTY_STRING . TEXT_DATE_ACCOUNT_LAST_MODIFIED . BLANK . olc_date_short($aInfo->date_account_last_modified));
$contents[] = array('text' => EMPTY_STRING . TEXT_INFO_DATE_LAST_LOGON . BLANK . olc_date_short($aInfo->date_last_logon));
$contents[] = array('text' => EMPTY_STRING . TEXT_INFO_NUMBER_OF_LOGONS . BLANK . $aInfo->number_of_logons);
$contents[] = array('text' => EMPTY_STRING . TEXT_INFO_COMMISSION . BLANK . $aInfo->affiliate_commission_percent . ' %');
$contents[] = array('text' => EMPTY_STRING . TEXT_INFO_COUNTRY . BLANK . $aInfo->countries_name);
$contents[] = array('text' => EMPTY_STRING . TEXT_INFO_NUMBER_OF_SALES . BLANK . $affiliate_sales['count'], EMPTY_STRING);
$contents[] = array('text' => EMPTY_STRING . TEXT_INFO_SALES_TOTAL . BLANK . $currencies->display_price($affiliate_sales['total'], EMPTY_STRING));
$contents[] = array('text' => EMPTY_STRING . TEXT_INFO_AFFILIATE_TOTAL . BLANK . $currencies->display_price($affiliate_sales['payment'], EMPTY_STRING));
}
break;
}
if (olc_not_null($heading) && olc_not_null($contents)) {
echo ' <td width="25%" valign="top">' . NEW_LINE;
$box = new box();
echo $box->infoBox($heading, $contents);
echo ' </td>' . NEW_LINE;
}
?>
</tr>
</table></td>
</tr>
<?php
示例12: b_specials
function b_specials()
{
global $currency, $currencies, $languages_id, $xoopsDB, $xoopsConfig, $customer_group, $customer_id, $_GET;
/* if(!defined("XOSC_BLOCK") && !defined("XOSC_CONFIG")) {
define("XOSC_BLOCK",1);
require_once(XOOPS_ROOT_PATH."/modules/osC/includes/application_top.php");
}
*/
// Config Part
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/configure.php";
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/database_tables.php";
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/filenames.php";
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/functions/database.php";
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/functions/general.php";
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/functions/html_output.php";
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/classes/boxes.php";
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/classes/currencies.php";
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/classes/product.php";
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/classes/customer_group.php";
require_once XOOPS_ROOT_PATH . "/modules/osC/includes/languages/" . $xoopsConfig['language'] . ".php";
//$currencies = new currencies();
if (!isset($customer_group)) {
if (!isset($_SESSION['customer_id'])) {
$customer_group = new customer_group(0);
} else {
$customer_group = new customer_group($_SESSION['customer_id']);
}
}
if (!defined('XBLOCK_CONFIG')) {
$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
while ($configuration = tep_db_fetch_array($configuration_query)) {
define($configuration['cfgKey'], $configuration['cfgValue']);
}
define('XBLOCK_CONFIG', "1");
}
if (!isset($_SESSION['languages_id'])) {
$lang_query = "select languages_id from " . TABLE_LANGUAGES . " where directory ='" . $xoopsConfig['language'] . "'";
$lang = tep_db_query($lang_query);
$lang_id = tep_db_fetch_array($lang);
$languages_id = $lang_id['languages_id'];
} else {
$languages_id = $_SESSION['languages_id'];
}
// currency
if (isset($_GET['currency'])) {
$currency = $_GET['currency'];
}
if (!session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && LANGUAGE_CURRENCY != $currency) {
if (!session_is_registered('currency')) {
session_register('currency');
}
if (isset($HTTP_GET_VARS['currency'])) {
if (!($currency = tep_currency_exists($HTTP_GET_VARS['currency']))) {
$currency = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
}
} else {
$currency = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
}
}
if ($currency == '') {
if (!($currency = tep_currency_exists($HTTP_GET_VARS['currency']))) {
$currency = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
}
}
//$currencies = new currencies();
if (!isset($currencies) || !is_object($currencies)) {
$currencies = new currencies();
}
//echo "CUR:".$currencies.":".$currency;
//print_r($currencies);
// Box Part
if ($random_product = tep_random_select("select p.products_distributor_id,p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int) $languages_id . "' and s.status = '1' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS)) {
$sproduct = new product($random_product["products_id"]);
$add_text = '';
if ($customer_group->getdisplaytax() == '1') {
$add_text = '<br>' . TEXT_VAT_INFO . ' ' . $sproduct->get_tax() . ' % ' . $sproduct->get_tax_title();
}
if ($customer_group->getdisplayshipment() == '1') {
$add_text .= '<br>' . TEXT_SHIPPING_HANDLING_INFO;
}
$image_path = DIR_WS_IMAGES;
switch ($random_product['products_distributor_id']) {
case 1:
$image_path = 'http://ec.ingrammicro.de/jpg/';
break;
case 2:
$image_path = '';
break;
}
$info_box_contents = array();
$info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image($image_path . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>' . $add_text);
$block = new infoBox($info_box_contents);
}
return $block->content;
}
示例13:
$total_tax = 0;
// eof order editor 5 0 9
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
//loop all the products in the order
$products_ordered_attributes = '';
if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
$products_ordered_attributes .= "\n\t" . $order->products[$i]['attributes'][$j]['option'] . ' ' . $order->products[$i]['attributes'][$j]['value'];
}
}
$total_weight += $order->products[$i]['qty'] * $order->products[$i]['weight'];
$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
$total_cost += $total_products_price;
if (EMAIL_USE_HTML == 'true') {
if ($order->products[$i]['model']) {
$products_ordered .= $order_totals_zelle_beginn . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $order_totals_zelle_mitte . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . $order_totals_zelle_end;
} else {
$products_ordered .= $order_totals_zelle_beginn . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' = ' . $order_totals_zelle_mitte . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . $order_totals_zelle_end;
}
} else {
if ($order->products[$i]['model']) {
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
} else {
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
}
}
}
$Text_Billing_Adress = "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . $order->billing['name'] . "\n";
if ($order->billing['company']) {
$Text_Billing_Adress .= $order->billing['company'] . "\n";
}
示例14:
<td class="dataTableContent"></td>
<td class="dataTableContent"></td>
<td class="dataTableContent" align="center"><b><?php
echo $totalquantity;
?>
</b> </td>
<?php
if ($show_breakdown == 'on') {
?>
<td class="dataTableContent"></td>
<?php
}
?>
<td class="dataTableContent" align="right"><b><?php
echo TEXT_TOTAL . ' ';
echo $currencies->display_price($totalgross, '', 1);
?>
</b> </td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
示例15:
<td align="right" class="dataTableContent"><?php
echo TEXT_CONVERSION;
?>
</td>
<td align="left" class="dataTableContent"><?php
echo $affiliate_conversions;
?>
</td>
</tr>
<tr>
<td align="right" class="dataTableContent"><?php
echo TEXT_AMOUNT;
?>
</td>
<td align="left" class="dataTableContent"><?php
echo $currencies->display_price($affiliate_amount, '');
?>
</td>
<td align="right" class="dataTableContent"><?php
echo TEXT_AVERAGE;
?>
</td>
<td align="left" class="dataTableContent"><?php
echo $currencies->display_price($affiliate_average, '');
?>
</td>
</tr>
<tr>
<td align="right" class="dataTableContent"><?php
echo TEXT_COMMISSION_RATE;
?>