[TEP-COMMIT] CVS: catalog/catalog/includes/modules new_products.php,1.36,1.37 product_listing.php,1.45,1.46

Harald Ponce de Leon <[email protected]>
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Update of /cvsroot/tep/catalog/catalog/includes/modules
In directory sc8-pr-cvs1:/tmp/cvs-serv10016/catalog/includes/modules

Modified Files:
	new_products.php product_listing.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: new_products.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/new_products.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- new_products.php	17 Nov 2003 20:12:15 -0000	1.36
+++ new_products.php	18 Dec 2003 23:52:15 -0000	1.37
@@ -20,23 +20,23 @@
   }
 
   if (tep_db_num_rows($new_products_query) > 0) {
-
     $info_box_contents = array();
     $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));
 
     new contentBoxHeading($info_box_contents);
 
-
     $row = 0;
     $col = 0;
+
     $info_box_contents = array();
     while ($new_products = tep_db_fetch_array($new_products_query)) {
       $new_products['products_name'] = tep_get_products_name($new_products['products_id']);
       $info_box_contents[$row][$col] = array('align' => 'center',
                                              'params' => 'class="smallText" width="33%" valign="top"',
-                                             'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], $osC_Tax->getTaxRate($new_products['products_tax_class_id'])));
+                                             'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $osC_Currencies->displayPrice($new_products['products_price'], $new_products['products_tax_class_id']));
 
       $col ++;
+
       if ($col > 2) {
         $col = 0;
         $row ++;

Index: product_listing.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/product_listing.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- product_listing.php	17 Nov 2003 20:22:29 -0000	1.45
+++ product_listing.php	18 Dec 2003 23:52:15 -0000	1.46
@@ -107,9 +107,9 @@
           case 'PRODUCT_LIST_PRICE':
             $lc_align = 'right';
             if (tep_not_null($listing['specials_new_products_price'])) {
-              $lc_text = '&nbsp;<s>' .  $currencies->display_price($listing['products_price'], $osC_Tax->getTaxRate($listing['products_tax_class_id'])) . '</s>&nbsp;&nbsp;<span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], $osC_Tax->getTaxRate($listing['products_tax_class_id'])) . '</span>&nbsp;';
+              $lc_text = '&nbsp;<s>' .  $osC_Currencies->displayPrice($listing['products_price'], $listing['products_tax_class_id']) . '</s>&nbsp;&nbsp;<span class="productSpecialPrice">' . $osC_Currencies->displayPrice($listing['specials_new_products_price'], $listing['products_tax_class_id']) . '</span>&nbsp;';
             } else {
-              $lc_text = '&nbsp;' . $currencies->display_price($listing['products_price'], $osC_Tax->getTaxRate($listing['products_tax_class_id'])) . '&nbsp;';
+              $lc_text = '&nbsp;' . $osC_Currencies->displayPrice($listing['products_price'], $listing['products_tax_class_id']) . '&nbsp;';
             }
             break;
           case 'PRODUCT_LIST_QUANTITY':



-------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.