[TEP-COMMIT] CVS: catalog/catalog account_history_info.php,1.101,1.102 advanced_search_result.php,1.73,1.74 checkout_confirmation.php,1.142,1.143 checkout_process.php,1.129,1.130 checkout_shipping.php,1.18,1.19 product_info.php,1.99,1.100 product_reviews.php,1.51,1.52 product_reviews_info.php,1.51,1.52 product_reviews_write.php,1.56,1.57 products_new.php,1.29,1.30 shopping_cart.php,1.74,1.75 specials.php,1.50,1.51
Harald Ponce de Leon <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tep/catalog/catalog
In directory sc8-pr-cvs1:/tmp/cvs-serv10016/catalog
Modified Files:
account_history_info.php advanced_search_result.php
checkout_confirmation.php checkout_process.php
checkout_shipping.php product_info.php product_reviews.php
product_reviews_info.php product_reviews_write.php
products_new.php shopping_cart.php specials.php
Log Message:
update the currencies class
* $currencies -> $osC_Currencies
* $currencies->display_price() -> $osC_Currencies->displayPrice()
+-- now passes the product tax class id as a parameter instead of the
product tax rate value (saves queries when DISPLAY_PRICES_WITH_TAX
is disabled)
* $currencies->is_set()
+-- removed due to $osC_Currencies->exists()
* $currencies->get_decimal_places() -> $osC_Currencies->decimalPlaces()
* $currencies->get_value() -> $osC_Currencies->value()
* $osC_Currencies->format()
+-- removed $calculate_currency_value (second) parameter due to
redundancy - if the number should not be calculated with the currency
rate, a value of '1' should be passed as the currency rate value
Index: account_history_info.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/account_history_info.php,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- account_history_info.php 17 Nov 2003 20:45:28 -0000 1.101
+++ account_history_info.php 18 Dec 2003 23:52:13 -0000 1.102
@@ -149,7 +149,7 @@
echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";
}
- echo ' <td class="main" align="right" valign="top">' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" .
+ echo ' <td class="main" align="right" valign="top">' . $osC_Currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" .
' </tr>' . "\n";
}
?>
Index: advanced_search_result.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/advanced_search_result.php,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- advanced_search_result.php 17 Nov 2003 20:49:40 -0000 1.73
+++ advanced_search_result.php 18 Dec 2003 23:52:14 -0000 1.74
@@ -276,8 +276,8 @@
}
if (tep_not_null($pfrom)) {
- if ($currencies->is_set($osC_Session->value('currency'))) {
- $rate = $currencies->get_value($osC_Session->value('currency'));
+ if ($osC_Currencies->exists($osC_Session->value('currency'))) {
+ $rate = $osC_Currencies->value($osC_Session->value('currency'));
$pfrom = $pfrom / $rate;
}
Index: checkout_confirmation.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/checkout_confirmation.php,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- checkout_confirmation.php 4 Dec 2003 14:12:16 -0000 1.142
+++ checkout_confirmation.php 18 Dec 2003 23:52:14 -0000 1.143
@@ -200,7 +200,7 @@
if (sizeof($order->info['tax_groups']) > 1) echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";
- echo ' <td class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" .
+ echo ' <td class="main" align="right" valign="top">' . $osC_Currencies->displayPrice($order->products[$i]['final_price'], $order->products[$i]['tax_class_id'], $order->products[$i]['qty']) . '</td>' . "\n" .
' </tr>' . "\n";
}
?>
Index: checkout_process.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/checkout_process.php,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- checkout_process.php 17 Nov 2003 20:58:34 -0000 1.129
+++ checkout_process.php 18 Dec 2003 23:52:14 -0000 1.130
@@ -223,7 +223,7 @@
$total_tax += tep_calculate_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'];
$total_cost += $order->products[$i]['final_price'];
- $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";
+ $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $osC_Currencies->displayPrice($order->products[$i]['final_price'], $order->products[$i]['tax_class_id'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
}
// lets start with the email confirmation
Index: checkout_shipping.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/checkout_shipping.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- checkout_shipping.php 19 Nov 2003 21:25:59 -0000 1.18
+++ checkout_shipping.php 18 Dec 2003 23:52:14 -0000 1.19
@@ -293,7 +293,7 @@
</tr>
<tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, 0)">
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="100%"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?></td>
+ <td class="main" width="100%"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $osC_Currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
@@ -337,12 +337,12 @@
<?php
if ( ($n > 1) || ($n2 > 1) ) {
?>
- <td class="main"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>
+ <td class="main"><?php echo $osC_Currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>
<td class="main" align="right"><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?></td>
<?php
} else {
?>
- <td class="main" align="right" colspan="2"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>
+ <td class="main" align="right" colspan="2"><?php echo $osC_Currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>
<?php
}
?>
Index: product_info.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/product_info.php,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- product_info.php 17 Nov 2003 21:06:26 -0000 1.99
+++ product_info.php 18 Dec 2003 23:52:14 -0000 1.100
@@ -75,9 +75,9 @@
tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$_GET['products_id'] . "' and language_id = '" . (int)$osC_Session->value('languages_id') . "'");
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
- $products_price = '<s>' . $currencies->display_price($product_info['products_price'], $osC_Tax->getTaxRate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, $osC_Tax->getTaxRate($product_info['products_tax_class_id'])) . '</span>';
+ $products_price = '<s>' . $osC_Currencies->displayPrice($product_info['products_price'], $product_info['products_tax_class_id']) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($new_price, $product_info['products_tax_class_id']) . '</span>';
} else {
- $products_price = $currencies->display_price($product_info['products_price'], $osC_Tax->getTaxRate($product_info['products_tax_class_id']));
+ $products_price = $osC_Currencies->displayPrice($product_info['products_price'], $product_info['products_tax_class_id']);
}
if (tep_not_null($product_info['products_model'])) {
@@ -135,7 +135,7 @@
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'], $osC_Tax->getTaxRate($product_info['products_tax_class_id'])) .') ';
+ $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $osC_Currencies->displayPrice($products_options['options_values_price'], $product_info['products_tax_class_id']) .') ';
}
}
Index: product_reviews.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/product_reviews.php,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- product_reviews.php 17 Nov 2003 21:06:26 -0000 1.51
+++ product_reviews.php 18 Dec 2003 23:52:14 -0000 1.52
@@ -20,9 +20,9 @@
}
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
- $products_price = '<s>' . $currencies->display_price($product_info['products_price'], $osC_Tax->getTaxRate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, $osC_Tax->getTaxRate($product_info['products_tax_class_id'])) . '</span>';
+ $products_price = '<s>' . $osC_Currencies->displayPrice($product_info['products_price'], $product_info['products_tax_class_id']) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($new_price, $product_info['products_tax_class_id']) . '</span>';
} else {
- $products_price = $currencies->display_price($product_info['products_price'], $osC_Tax->getTaxRate($product_info['products_tax_class_id']));
+ $products_price = $osC_Currencies->displayPrice($product_info['products_price'], $product_info['products_tax_class_id']);
}
if (tep_not_null($product_info['products_model'])) {
Index: product_reviews_info.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/product_reviews_info.php,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- product_reviews_info.php 17 Nov 2003 21:06:26 -0000 1.51
+++ product_reviews_info.php 18 Dec 2003 23:52:14 -0000 1.52
@@ -29,9 +29,9 @@
$review = tep_db_fetch_array($review_query);
if ($new_price = tep_get_products_special_price($review['products_id'])) {
- $products_price = '<s>' . $currencies->display_price($review['products_price'], $osC_Tax->getTaxRate($review['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, $osC_Tax->getTaxRate($review['products_tax_class_id'])) . '</span>';
+ $products_price = '<s>' . $osC_Currencies->displayPrice($review['products_price'], $review['products_tax_class_id']) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($new_price, $review['products_tax_class_id']) . '</span>';
} else {
- $products_price = $currencies->display_price($review['products_price'], $osC_Tax->getTaxRate($review['products_tax_class_id']));
+ $products_price = $osC_Currencies->displayPrice($review['products_price'], $review['products_tax_class_id']);
}
if (tep_not_null($review['products_model'])) {
Index: product_reviews_write.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/product_reviews_write.php,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- product_reviews_write.php 17 Nov 2003 21:06:26 -0000 1.56
+++ product_reviews_write.php 18 Dec 2003 23:52:14 -0000 1.57
@@ -56,9 +56,9 @@
}
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
- $products_price = '<s>' . $currencies->display_price($product_info['products_price'], $osC_Tax->getTaxRate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, $osC_Tax->getTaxRate($product_info['products_tax_class_id'])) . '</span>';
+ $products_price = '<s>' . $osC_Currencies->displayPrice($product_info['products_price'], $product_info['products_tax_class_id']) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($new_price, $product_info['products_tax_class_id']) . '</span>';
} else {
- $products_price = $currencies->display_price($product_info['products_price'], $osC_Tax->getTaxRate($product_info['products_tax_class_id']));
+ $products_price = $osC_Currencies->displayPrice($product_info['products_price'], $product_info['products_tax_class_id']);
}
if (tep_not_null($product_info['products_model'])) {
Index: products_new.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/products_new.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- products_new.php 17 Nov 2003 21:06:26 -0000 1.29
+++ products_new.php 18 Dec 2003 23:52:14 -0000 1.30
@@ -79,9 +79,9 @@
$products_new_query = tep_db_query($products_new_split->sql_query);
while ($products_new = tep_db_fetch_array($products_new_query)) {
if ($new_price = tep_get_products_special_price($products_new['products_id'])) {
- $products_price = '<s>' . $currencies->display_price($products_new['products_price'], $osC_Tax->getTaxRate($products_new['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, $osC_Tax->getTaxRate($products_new['products_tax_class_id'])) . '</span>';
+ $products_price = '<s>' . $osC_Currencies->displayPrice($products_new['products_price'], $products_new['products_tax_class_id']) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($new_price, $products_new['products_tax_class_id']) . '</span>';
} else {
- $products_price = $currencies->display_price($products_new['products_price'], $osC_Tax->getTaxRate($products_new['products_tax_class_id']));
+ $products_price = $osC_Currencies->displayPrice($products_new['products_price'], $products_new['products_tax_class_id']);
}
?>
<tr>
Index: shopping_cart.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/shopping_cart.php,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- shopping_cart.php 17 Nov 2003 21:07:25 -0000 1.74
+++ shopping_cart.php 18 Dec 2003 23:52:14 -0000 1.75
@@ -146,7 +146,7 @@
$info_box_contents[$cur_row][] = array('align' => 'right',
'params' => 'class="productListing-data" valign="top"',
- 'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], $osC_Tax->getTaxRate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
+ 'text' => '<b>' . $osC_Currencies->displayPrice($products[$i]['final_price'], $products[$i]['tax_class_id'], $products[$i]['quantity']) . '</b>');
}
new productListingBox($info_box_contents);
@@ -157,7 +157,7 @@
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
- <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td>
+ <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $osC_Currencies->format($cart->show_total()); ?></b></td>
</tr>
<?php
if ($any_out_of_stock == 1) {
Index: specials.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/specials.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- specials.php 17 Nov 2003 21:07:53 -0000 1.50
+++ specials.php 18 Dec 2003 23:52:14 -0000 1.51
@@ -79,7 +79,7 @@
while ($specials = tep_db_fetch_array($specials_query)) {
$row++;
- echo ' <td align="center" width="33%" class="smallText"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . $specials['products_name'] . '</a><br><s>' . $currencies->display_price($specials['products_price'], $osC_Tax->getTaxRate($specials['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($specials['specials_new_products_price'], $osC_Tax->getTaxRate($specials['products_tax_class_id'])) . '</span></td>' . "\n";
+ echo ' <td align="center" width="33%" class="smallText"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . $specials['products_name'] . '</a><br><s>' . $osC_Currencies->displayPrice($specials['products_price'], $specials['products_tax_class_id']) . '</s><br><span class="productSpecialPrice">' . $osC_Currencies->displayPrice($specials['specials_new_products_price'], $specials['products_tax_class_id']) . '</span></td>' . "\n";
if ((($row / 3) == floor($row / 3))) {
?>
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click