set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT)); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } // avoid hack attempts during the checkout procedure by checking the internal cartID if (isset($cart->cartID) && tep_session_is_registered('cartID')) { if ($cart->cartID != $cartID) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } } // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } if (!tep_session_is_registered('payment')) tep_session_register('payment'); if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment']; if (!tep_session_is_registered('comments')) tep_session_register('comments'); if (tep_not_null($HTTP_POST_VARS['comments'])) { $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); } // load the selected payment module require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment($payment); require(DIR_WS_CLASSES . 'order.php'); $order = new order; $payment_modules->update_status(); if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } if (is_array($payment_modules->modules)) { $payment_modules->pre_confirmation_check(); } // load the selected shipping module require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping($shipping); require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; // Stock Check $any_out_of_stock = false; if (STOCK_CHECK == 'true') { for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) { $any_out_of_stock = true; } } // Out of Stock if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION); $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_2); ?> > Baseball Batting Cages Shopping Cart
modules)) { if ($confirmation = $payment_modules->confirmation()) { ?> info['comments'])) { ?>
' . HEADING_DELIVERY_ADDRESS . ' (' . TEXT_EDIT . ')'; ?>
delivery['format_id'], $order->delivery, 1, ' ', '
'); ?>
info['tax_groups']) > 1) { ?> products); $i<$n; $i++) { echo ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; if (sizeof($order->info['tax_groups']) > 1) echo ' ' . "\n"; echo ' ' . "\n" . ' ' . "\n"; } ?>
' . HEADING_PRODUCTS . ' (' . TEXT_EDIT . ')'; ?>
' . HEADING_PRODUCTS . ' (' . TEXT_EDIT . ')'; ?>
' . $order->products[$i]['qty'] . ' x' . $order->products[$i]['name']; if (STOCK_CHECK == 'true') { echo tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']); } if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { echo '
  - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . ''; } } echo '
' . tep_display_tax_value($order->products[$i]['tax']) . '%' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '
' . HEADING_BILLING_ADDRESS . ' (' . TEXT_EDIT . ')'; ?>
billing['format_id'], $order->billing, 1, ' ', '
'); ?>
' . HEADING_PAYMENT_METHOD . ' (' . TEXT_EDIT . ')'; ?>
info['payment_method']; ?>
process(); echo $order_total_modules->output(); } ?>
' . HEADING_ORDER_COMMENTS . ' (' . TEXT_EDIT . ')'; ?>
info['comments'])) . tep_draw_hidden_field('comments', $order->info['comments']); ?>
form_action_url)) { $form_action_url = $$payment->form_action_url; } else { $form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'); } echo tep_draw_form('checkout_confirmation', $form_action_url, 'post'); if (is_array($payment_modules->modules)) { echo $payment_modules->process_button(); } echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '' . "\n"; ?>
' . CHECKOUT_BAR_DELIVERY . ''; ?> ' . CHECKOUT_BAR_PAYMENT . ''; ?>