Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1621
 
1750
 
1750
 
checkout_process.php
_> 11 <?php
  22 /*
<> 3 -  $Id: checkout_process.php,v 1.128 2003/05/28 18:00:29 hpdl Exp $
   3+  $Id: checkout_process.php 1750 2007-12-21 05:20:28Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
1717     $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));
  1818     tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
  1919   }
<> 20 - 
  21 -  if (!tep_session_is_registered('sendto')) {
  22 -    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
   20+
   21+// if there is nothing in the customers cart, redirect them to the shopping cart page
   22+  if ($cart->count_contents() < 1) {
   23+    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
2324   }
  2425 
<>  26+// if no shipping method has been selected, redirect the customer to the shipping method selection page
   27+  if (!tep_session_is_registered('shipping') || !tep_session_is_registered('sendto')) {
   28+    tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
   29+  }
   30+
2531   if ( (tep_not_null(MODULE_PAYMENT_INSTALLED)) && (!tep_session_is_registered('payment')) ) {
  2632     tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
  2733  }
     
 !
4652   require(DIR_WS_CLASSES . 'order.php');
  4753   $order = new order;
  4854 
<>  55+// Stock Check
   56+  $any_out_of_stock = false;
   57+  if (STOCK_CHECK == 'true') {
   58+    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
   59+      if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
   60+        $any_out_of_stock = true;
   61+      }
   62+    }
   63+    // Out of Stock
   64+    if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {
   65+      tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
   66+    }
   67+  }
   68+
   69+  $payment_modules->update_status();
   70+
   71+  if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
   72+    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
   73+  }
   74+
4975   require(DIR_WS_CLASSES . 'order_total.php');
  5076   $order_total_modules = new order_total;
  5177 
     
 !
6692                           'customers_telephone' => $order->customer['telephone'],
  6793                           'customers_email_address' => $order->customer['email_address'],
  6894                           'customers_address_format_id' => $order->customer['format_id'],
<> 69 -                          'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],
   95+                          'delivery_name' => trim($order->delivery['firstname'] . ' ' . $order->delivery['lastname']),
<_ 7096                           'delivery_company' => $order->delivery['company'],
  7197                           'delivery_street_address' => $order->delivery['street_address'],
  7298                           'delivery_suburb' => $order->delivery['suburb'],