Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

546
 
548
 
548
 
order.php
_> 11 <?php
  22 /*
<> 3 -  $Id: order.php 546 2006-04-28 21:19:09Z hpdl $
   3+  $Id: order.php 548 2006-04-29 02:36:44Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
196196         $order_products_id = $osC_Database->nextID();
  197197 
  198198         if ($osC_ShoppingCart->hasAttributes($products['id'])) {
<> 199 -          foreach ($osC_ShoppingCart->getAttributes($products['id']) as $atttributes) {
   199+          foreach ($osC_ShoppingCart->getAttributes($products['id']) as $attributes) {
200200             if (DOWNLOAD_ENABLED == '1') {
  201201               $Qattributes = $osC_Database->query('select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount, pad.products_attributes_filename from :table_products_options popt, :table_products_options_values poval, :table_products_attributes pa left join :table_products_attributes_download pad on (pa.products_attributes_id = pad.products_attributes_id) where pa.products_id = :products_id and pa.options_id = :options_id and pa.options_id = popt.products_options_id and pa.options_values_id = :options_values_id and pa.options_values_id = poval.products_options_values_id and popt.language_id = :popt_language_id and poval.language_id = :poval_language_id');
  202202               $Qattributes->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
     
 !
354354                        $osC_Language->get('email_order_separator') . "\n" .
  355355                        sprintf($osC_Language->get('email_order_order_number'), $id) . "\n" .
  356356                        sprintf($osC_Language->get('email_order_invoice_url'), tep_href_link(FILENAME_ACCOUNT, 'orders=' . $id, 'SSL', false, true, true)) . "\n" .
<> 357 -                       sprintf($osC_Language->get('email_order_date_ordered'), osC_DateTime::getLong()) . "\n\n";
   357+                       sprintf($osC_Language->get('email_order_date_ordered'), osC_DateTime::getLong()) . "\n\n" .
   358+                       $osC_Language->get('email_order_products') . "\n" .
   359+                       $osC_Language->get('email_order_separator') . "\n";
358360 
<> 359 -        $Qproducts = $osC_Database->query('select products_model, products_name, final_price, products_tax, products_quantity from :table_orders_products where orders_id = :orders_id order by orders_products_id');
   361+        $Qproducts = $osC_Database->query('select orders_products_id, products_model, products_name, final_price, products_tax, products_quantity from :table_orders_products where orders_id = :orders_id order by orders_products_id');
360362         $Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
  361363         $Qproducts->bindInt(':orders_id', $id);
  362364         $Qproducts->execute();
  363365 
<> 364 -        $products_ordered = '';
  365 -
366366         while ($Qproducts->next()) {
<> 367 -          $products_ordered .= $Qproducts->valueInt('products_quantity') . ' x ' . $Qproducts->value('products_name') . ' (' . $Qproducts->value('products_model') . ') = ' . $osC_Currencies->displayPriceWithTaxRate($Qproducts->value('final_price'), $Qproducts->value('products_tax'), $Qproducts->valueInt('products_quantity'), $Qorder->value('currency'), $Qorder->value('currency_value')) . "\n"; // . $products_ordered_attributes . "\n";
   367+          $email_order .= $Qproducts->valueInt('products_quantity') . ' x ' . $Qproducts->value('products_name') . ' (' . $Qproducts->value('products_model') . ') = ' . $osC_Currencies->displayPriceWithTaxRate($Qproducts->value('final_price'), $Qproducts->value('products_tax'), $Qproducts->valueInt('products_quantity'), $Qorder->value('currency'), $Qorder->value('currency_value')) . "\n";
   368+
   369+          $Qattributes = $osC_Database->query('select products_options, products_options_values from :table_orders_products_attributes where orders_id = :orders_id and orders_products_id = :orders_products_id order by orders_products_attributes_id');
   370+          $Qattributes->bindTable(':table_orders_products_attributes', TABLE_ORDERS_PRODUCTS_ATTRIBUTES);
   371+          $Qattributes->bindInt(':orders_id', $id);
   372+          $Qattributes->bindInt(':orders_products_id', $Qproducts->valueInt('orders_products_id'));
   373+          $Qattributes->execute();
   374+
   375+          while ($Qattributes->next()) {
   376+            $email_order .= "\t" . $Qattributes->value('products_options') . ': ' . $Qattributes->value('products_options_values') . "\n";
   377+          }
368378         }
  369379 
  370380         unset($Qproducts);
<>  381+        unset($Qattributes);
371382 
<> 372 -        $email_order .= $osC_Language->get('email_order_products') . "\n" .
  373 -                        $osC_Language->get('email_order_separator') . "\n" .
  374 -                        $products_ordered .
  375 -                        $osC_Language->get('email_order_separator') . "\n";
   383+        $email_order .= $osC_Language->get('email_order_separator') . "\n";
<_ 376384 
  377385         $Qtotals = $osC_Database->query('select title, text from :table_orders_total where orders_id = :orders_id order by sort_order');
  378386         $Qtotals->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);