[TEP-COMMIT] CVS: catalog/catalog/includes/boxes currencies.php,1.17,1.18 shopping_cart.php,1.19,1.20 specials.php,1.32,1.33 whats_new.php,1.32,1.33
Harald Ponce de Leon <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tep/catalog/catalog/includes/boxes
In directory sc8-pr-cvs1:/tmp/cvs-serv10016/catalog/includes/boxes
Modified Files:
currencies.php shopping_cart.php specials.php whats_new.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: currencies.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/boxes/currencies.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- currencies.php 17 Nov 2003 19:47:34 -0000 1.17
+++ currencies.php 18 Dec 2003 23:52:14 -0000 1.18
@@ -10,7 +10,7 @@
Released under the GNU General Public License
*/
- if (isset($currencies) && is_object($currencies)) {
+ if (isset($osC_Currencies) && is_object($osC_Currencies)) {
?>
<!-- currencies //-->
<tr>
@@ -21,9 +21,9 @@
new infoBoxHeading($info_box_contents, false, false);
- reset($currencies->currencies);
+ reset($osC_Currencies->currencies);
$currencies_array = array();
- while (list($key, $value) = each($currencies->currencies)) {
+ while (list($key, $value) = each($osC_Currencies->currencies)) {
$currencies_array[] = array('id' => $key, 'text' => $value['title']);
}
Index: shopping_cart.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/boxes/shopping_cart.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- shopping_cart.php 17 Nov 2003 20:05:25 -0000 1.19
+++ shopping_cart.php 18 Dec 2003 23:52:14 -0000 1.20
@@ -57,7 +57,7 @@
if ($cart->count_contents() > 0) {
$info_box_contents[] = array('text' => tep_draw_separator());
$info_box_contents[] = array('align' => 'right',
- 'text' => $currencies->format($cart->show_total()));
+ 'text' => $osC_Currencies->format($cart->show_total()));
}
new infoBox($info_box_contents);
Index: specials.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/boxes/specials.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- specials.php 17 Nov 2003 20:06:21 -0000 1.32
+++ specials.php 18 Dec 2003 23:52:14 -0000 1.33
@@ -23,7 +23,7 @@
$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(DIR_WS_IMAGES . $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'], $osC_Tax->getTaxRate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], $osC_Tax->getTaxRate($random_product['products_tax_class_id'])) . '</span>');
+ 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $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>' . $osC_Currencies->displayPrice($random_product['products_price'], $random_product['products_tax_class_id']) . '</s><br><span class="productSpecialPrice">' . $osC_Currencies->displayPrice($random_product['specials_new_products_price'], $random_product['products_tax_class_id']) . '</span>');
new infoBox($info_box_contents);
?>
Index: whats_new.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/boxes/whats_new.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- whats_new.php 17 Nov 2003 20:07:24 -0000 1.32
+++ whats_new.php 18 Dec 2003 23:52:14 -0000 1.33
@@ -25,10 +25,10 @@
new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW));
if (tep_not_null($random_product['specials_new_products_price'])) {
- $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], $osC_Tax->getTaxRate($random_product['products_tax_class_id'])) . '</s><br>';
- $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], $osC_Tax->getTaxRate($random_product['products_tax_class_id'])) . '</span>';
+ $whats_new_price = '<s>' . $osC_Currencies->displayPrice($random_product['products_price'], $random_product['products_tax_class_id']) . '</s><br>';
+ $whats_new_price .= '<span class="productSpecialPrice">' . $osC_Currencies->displayPrice($random_product['specials_new_products_price'], $random_product['products_tax_class_id']) . '</span>';
} else {
- $whats_new_price = $currencies->display_price($random_product['products_price'], $osC_Tax->getTaxRate($random_product['products_tax_class_id']));
+ $whats_new_price = $osC_Currencies->displayPrice($random_product['products_price'], $random_product['products_tax_class_id']);
}
$info_box_contents = array();
-------------------------------------------------------
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