[TEP-COMMIT] CVS: catalog/catalog/includes/boxes order_history.php,1.5,1.6

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-serv22260/boxes

Modified Files:
	order_history.php 
Log Message:
use the new session and customer classes


Index: order_history.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/boxes/order_history.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- order_history.php	9 Jun 2003 22:18:30 -0000	1.5
+++ order_history.php	17 Nov 2003 20:02:18 -0000	1.6
@@ -10,9 +10,9 @@
   Released under the GNU General Public License
 */
 
-  if (tep_session_is_registered('customer_id')) {
+  if ($osC_Customer->isLoggedOn()) {
 // retreive the last x products purchased
-    $orders_query = tep_db_query("select distinct op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS . " p where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = '1' group by products_id order by o.date_purchased desc limit " . MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
+    $orders_query = tep_db_query("select distinct op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS . " p where o.customers_id = '" . (int)$osC_Customer->id . "' and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = '1' group by products_id order by o.date_purchased desc limit " . MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
     if (tep_db_num_rows($orders_query)) {
 ?>
 <!-- customer_orders //-->
@@ -31,7 +31,7 @@
       $product_ids = substr($product_ids, 0, -1);
 
       $customer_orders_string = '<table border="0" width="100%" cellspacing="0" cellpadding="1">';
-      $products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . (int)$languages_id . "' order by products_name");
+      $products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . (int)$osC_Session->value('languages_id') . "' order by products_name");
       while ($products = tep_db_fetch_array($products_query)) {
         $customer_orders_string .= '  <tr>' .
                                    '    <td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . $products['products_name'] . '</a></td>' .



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
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.