Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

383
 
443
 
443
 
order.php
_> 11 <?php
  22 /*
<> 3 -  $Id: order.php 383 2006-01-09 16:35:46Z hpdl $
   3+  $Id: order.php 443 2006-02-19 23:01:01Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
4242     function &getListing($limit = null, $page_keyword = 'page') {
  4343       global $osC_Database, $osC_Customer, $osC_Language;
  4444 
<> 45 -      $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');
   45+      $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 = "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);
     
 !
146146         $this->totals[] = array('title' => $Qtotals->value('title'),
  147147                                 'text' => $Qtotals->value('text'));
  148148 
<> 149 -        if ($Qtotals->value('class') == 'ot_shipping') {
   149+        if ($Qtotals->value('class') == 'shipping') {
150150           $shipping_method_string = strip_tags($Qtotals->value('title'));
  151151 
  152152           if (substr($shipping_method_string, -1) == ':') {
  153153             $shipping_method_string = substr($Qtotals->value('title'), 0, -1);
  154154           }
  155155         }
  156156 
<> 157 -        if ($Qtotals->value('class') == 'ot_total') {
   157+        if ($Qtotals->value('class') == 'total') {
158158           $order_total_string = strip_tags($Qtotals->value('text'));
  159159         }
  160160       }
     
 !
257257     }
  258258 
  259259     function cart() {
<> 260 -      global $osC_Database, $osC_Customer, $osC_Tax, $osC_Currencies, $osC_Language;
   260+      global $osC_Database, $osC_ShoppingCart, $osC_Customer, $osC_Tax, $osC_Currencies, $osC_Language;
261261 
<> 262 -      $this->content_type = $_SESSION['cart']->get_content_type();
   262+      $this->content_type = $osC_ShoppingCart->getContentType();
263263 
  264264       $shipping =& $_SESSION['shipping'];
  265265       $payment =& $_SESSION['payment'];
     
 !
360360                              'format_id' => $Qbilling->valueInt('address_format_id'));
  361361 
  362362       $index = 0;
<> 363 -      $products = $_SESSION['cart']->get_products();
   363+      $products = $osC_ShoppingCart->getProducts();
364364       for ($i=0, $n=sizeof($products); $i<$n; $i++) {
  365365         $this->products[$index] = array('qty' => $products[$i]['quantity'],
  366366                                         'name' => $products[$i]['name'],
     
 !
369369                                         'tax_description' => $osC_Tax->getTaxRateDescription($products[$i]['tax_class_id'], $Qtax->valueInt('entry_country_id'), $Qtax->valueInt('entry_zone_id')),
  370370                                         'tax_class_id' => $products[$i]['tax_class_id'],
  371371                                         'price' => $products[$i]['price'],
<> 372 -                                        'final_price' => $products[$i]['price'] + $_SESSION['cart']->attributes_price($products[$i]['id']),
   372+                                        'final_price' => $products[$i]['price'] + $osC_ShoppingCart->getProductAttributesPriceTotal($products[$i]['id']),
373373                                         'weight' => $products[$i]['weight'],
  374374                                         'id' => $products[$i]['id']);
  375375 
     
 !
383383             $Qattributes->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
  384384             $Qattributes->bindInt(':products_id', $products[$i]['id']);
  385385             $Qattributes->bindInt(':options_id', $option);
<> 386 -            $Qattributes->bindInt(':options_values_id', $value);
   386+            $Qattributes->bindInt(':options_values_id', $value['value_id']);
387387             $Qattributes->bindInt(':language_id', $osC_Language->getID());
  388388             $Qattributes->bindInt(':language_id', $osC_Language->getID());
  389389             $Qattributes->execute();
  390390 
  391391             $this->products[$index]['attributes'][$subindex] = array('option' => $Qattributes->value('products_options_name'),
  392392                                                                      'value' => $Qattributes->value('products_options_values_name'),
  393393                                                                      'option_id' => $option,
<> 394 -                                                                     'value_id' => $value,
   394+                                                                     'value_id' => $value['value_id'],
<_ 395395                                                                      'prefix' => $Qattributes->value('price_prefix'),
  396396                                                                      'price' => $Qattributes->value('options_values_price'));
  397397