Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

368
 
383
 
383
 
order.php
_> 11 <?php
  22 /*
<> 3 -  $Id: order.php 368 2005-12-22 16:27:23Z hpdl $
   3+  $Id: order.php 383 2006-01-09 16:35:46Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
4040 /* Public methods */
  4141 
  4242     function &getListing($limit = null, $page_keyword = 'page') {
<> 43 -      global $osC_Database, $osC_Customer;
   43+      global $osC_Database, $osC_Customer, $osC_Language;
4444 
  4545       $Qorders = $osC_Database->query('select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.orders_status_name from :table_orders o, :table_orders_total ot, :table_orders_status s where o.customers_id = :customers_id and o.orders_id = ot.orders_id and ot.class = "ot_total" and o.orders_status = s.orders_status_id and s.language_id = :language_id order by orders_id desc');
  4646       $Qorders->bindTable(':table_orders', TABLE_ORDERS);
  4747       $Qorders->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);
  4848       $Qorders->bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
  4949       $Qorders->bindInt(':customers_id', $osC_Customer->getID());
<> 50 -      $Qorders->bindInt(':language_id', $_SESSION['languages_id']);
   50+      $Qorders->bindInt(':language_id', $osC_Language->getID());
5151 
  5252       if (is_numeric($limit)) {
  5353         $Qorders->setBatchLimit(isset($_GET[$page_keyword]) && is_numeric($_GET[$page_keyword]) ? $_GET[$page_keyword] : 1, $limit);
     
 !
5959     }
  6060 
  6161     function &getStatusListing($id = null) {
<> 62 -      global $osC_Database;
   62+      global $osC_Database, $osC_Language;
6363 
  6464       if ( ($id === null) && isset($this) ) {
  6565         $id = $this->_id;
     
 !
6969       $Qstatus->bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
  7070       $Qstatus->bindTable(':table_orders_status_history', TABLE_ORDERS_STATUS_HISTORY);
  7171       $Qstatus->bindInt(':orders_id', $id);
<> 72 -      $Qstatus->bindInt(':language_id', $_SESSION['languages_id']);
   72+      $Qstatus->bindInt(':language_id', $osC_Language->getID());
7373 
  7474       return $Qstatus;
  7575     }
     
 !
127127 
  128128 
  129129     function query($order_id) {
<> 130 -      global $osC_Database;
   130+      global $osC_Database, $osC_Language;
131131 
  132132       $Qorder = $osC_Database->query('select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from :table_orders where orders_id = :orders_id');
  133133       $Qorder->bindTable(':table_orders', TABLE_ORDERS);
     
 !
162162       $Qstatus = $osC_Database->query('select orders_status_name from :table_orders_status where orders_status_id = :orders_status_id and language_id = :language_id');
  163163       $Qstatus->bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
  164164       $Qstatus->bindInt(':orders_status_id', $Qorder->valueInt('orders_status'));
<> 165 -      $Qstatus->bindInt(':language_id', $_SESSION['languages_id']);
   165+      $Qstatus->bindInt(':language_id', $osC_Language->getID());
166166       $Qstatus->execute();
  167167 
  168168       $this->info = array('currency' => $Qorder->value('currency'),
     
 !
257257     }
  258258 
  259259     function cart() {
<> 260 -      global $osC_Database, $osC_Customer, $osC_Tax, $osC_Currencies;
   260+      global $osC_Database, $osC_Customer, $osC_Tax, $osC_Currencies, $osC_Language;
261261 
  262262       $this->content_type = $_SESSION['cart']->get_content_type();
  263263 
     
 !
384384             $Qattributes->bindInt(':products_id', $products[$i]['id']);
  385385             $Qattributes->bindInt(':options_id', $option);
  386386             $Qattributes->bindInt(':options_values_id', $value);
<> 387 -            $Qattributes->bindInt(':language_id', $_SESSION['languages_id']);
  388 -            $Qattributes->bindInt(':language_id', $_SESSION['languages_id']);
   387+            $Qattributes->bindInt(':language_id', $osC_Language->getID());
   388+            $Qattributes->bindInt(':language_id', $osC_Language->getID());
<_ 389389             $Qattributes->execute();
  390390 
  391391             $this->products[$index]['attributes'][$subindex] = array('option' => $Qattributes->value('products_options_name'),