Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1498
 
1862
 
1862
 
order.php
_> 11 <?php
  22 /*
<> 3 -  $Id: order.php 1498 2007-03-29 14:04:50Z hpdl $
   3+  $Id: order.php 1862 2009-03-06 23:34:07Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
204204       $products_array = array();
  205205       $key = 0;
  206206 
<> 207 -      $Qproducts = $osC_Database->query('select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from :table_orders_products where orders_id = :orders_id');
   207+      $Qproducts = $osC_Database->query('select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity from :table_orders_products where orders_id = :orders_id');
208208       $Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
  209209       $Qproducts->bindInt(':orders_id', $this->_order_id);
  210210       $Qproducts->execute();
     
 !
214214                                       'name' => $Qproducts->value('products_name'),
  215215                                       'model' => $Qproducts->value('products_model'),
  216216                                       'tax' => $Qproducts->value('products_tax'),
<> 217 -                                      'price' => $Qproducts->value('products_price'),
  218 -                                      'final_price' => $Qproducts->value('final_price'));
   217+                                      'price' => $Qproducts->value('products_price'));
219218 
<> 220 -        $Qattributes = $osC_Database->query('select products_options, products_options_values, options_values_price, price_prefix from :table_orders_products_attributes where orders_id = :orders_id and orders_products_id = :orders_products_id');
  221 -        $Qattributes->bindTable(':table_orders_products_attributes', TABLE_ORDERS_PRODUCTS_ATTRIBUTES);
  222 -        $Qattributes->bindInt(':orders_id', $this->_order_id);
  223 -        $Qattributes->bindInt(':orders_products_id', $Qproducts->valueInt('orders_products_id'));
  224 -        $Qattributes->execute();
   219+        $Qvariants = $osC_Database->query('select group_title, value_title from :table_orders_products_variants where orders_id = :orders_id and orders_products_id = :orders_products_id order by id');
   220+        $Qvariants->bindTable(':table_orders_products_variants', TABLE_ORDERS_PRODUCTS_VARIANTS);
   221+        $Qvariants->bindInt(':orders_id', $this->_order_id);
   222+        $Qvariants->bindInt(':orders_products_id', $Qproducts->valueInt('orders_products_id'));
   223+        $Qvariants->execute();
225224 
<> 226 -        if ($Qattributes->numberOfRows() > 0) {
  227 -          while ($Qattributes->next()) {
  228 -            $products_array[$key]['attributes'][] = array('option' => $Qattributes->value('products_options'),
  229 -                                                          'value' => $Qattributes->value('products_options_values'),
  230 -                                                          'prefix' => $Qattributes->value('price_prefix'),
  231 -                                                          'price' => $Qattributes->value('options_values_price'));
   225+        if ( $Qvariants->numberOfRows() > 0 ) {
   226+          while ( $Qvariants->next() ) {
   227+            $products_array[$key]['attributes'][] = array('option' => $Qvariants->value('group_title'),
   228+                                                          'value' => $Qvariants->value('value_title'));
232229           }
  233230         }
  234231 
     
 !
507504       }
  508505 
  509506       if ($error === false) {
<> 510 -        $Qopa = $osC_Database->query('delete from :table_orders_products_attributes where orders_id = :orders_id');
  511 -        $Qopa->bindTable(':table_orders_products_attributes', TABLE_ORDERS_PRODUCTS_ATTRIBUTES);
  512 -        $Qopa->bindInt(':orders_id', $id);
  513 -        $Qopa->setLogging($_SESSION['module'], $id);
  514 -        $Qopa->execute();
   507+        $Qvariants = $osC_Database->query('delete from :table_orders_products_variants where orders_id = :orders_id');
   508+        $Qvariants->bindTable(':table_orders_products_variants', TABLE_ORDERS_PRODUCTS_VARIANTS);
   509+        $Qvariants->bindInt(':orders_id', $id);
   510+        $Qvariants->setLogging($_SESSION['module'], $id);
   511+        $Qvariants->execute();
<_ 515512 
  516513         if ($osC_Database->isError() === true) {
  517514           $error = true;