Skip to content

Commit

Permalink
#200: Correct virtual orders can't be checked out
Browse files Browse the repository at this point in the history
  • Loading branch information
lat9 committed Jun 5, 2019
1 parent 42e029c commit 5fc2504
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions includes/modules/pages/checkout_one_confirmation/header_php.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@
}
}

// if no shipping method has been selected, redirect the customer to the shipping method selection page
if (!isset($_SESSION['shipping'])) {
$checkout_one->debug_message('NOTIFY_CHECKOUT_ONE_CONFIRMATION_NO_SHIPPING');
zen_redirect(zen_href_link(FILENAME_CHECKOUT_ONE, '', 'SSL'));
}

$checkout_one->debug_message ('Starting confirmation, shipping and request data follows:' . print_r ($_SESSION['shipping'], true), true);

$free_shipping_enabled = (defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true');
Expand Down Expand Up @@ -137,6 +131,12 @@
require DIR_WS_CLASSES . 'order.php';
$order = new order;

// if no shipping method has been selected (and the order is not virtual), redirect the customer to the shipping method selection page
if (!isset($_SESSION['shipping']) && $order->content_type != 'virtual') {
$checkout_one->debug_message('NOTIFY_CHECKOUT_ONE_CONFIRMATION_NO_SHIPPING');
zen_redirect(zen_href_link(FILENAME_CHECKOUT_ONE, '', 'SSL'));
}

// -----
// Generate a starting hash of the session information, so that we can check to see if anything has changed
// after processing the order-total modules.
Expand Down

0 comments on commit 5fc2504

Please sign in to comment.