forked from gburton/CE-Phoenix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckout_success.php
66 lines (46 loc) · 1.77 KB
/
checkout_success.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2010 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
// if the customer is not logged on, redirect them to the shopping cart page
if (!tep_session_is_registered('customer_id')) {
tep_redirect(tep_href_link('shopping_cart.php'));
}
$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1");
// redirect to shopping cart page if no orders exist
if ( !tep_db_num_rows($orders_query) ) {
tep_redirect(tep_href_link('shopping_cart.php'));
}
$orders = tep_db_fetch_array($orders_query);
$order_id = $orders['orders_id'];
$page_content = $oscTemplate->getContent('checkout_success');
if ( isset($_GET['action']) && ($_GET['action'] == 'update') ) {
tep_redirect(tep_href_link('index.php'));
}
require('includes/languages/' . $language . '/checkout_success.php');
$breadcrumb->add(NAVBAR_TITLE_1);
$breadcrumb->add(NAVBAR_TITLE_2);
require('includes/template_top.php');
?>
<div class="page-header">
<h1><?php echo HEADING_TITLE; ?></h1>
</div>
<?php echo tep_draw_form('order', tep_href_link('checkout_success.php', 'action=update', 'SSL'), 'post', 'class="form-horizontal" role="form"'); ?>
<div class="contentContainer">
<?php echo $page_content; ?>
</div>
<div class="contentContainer">
<div class="buttonSet">
<div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-angle-right', null, 'primary', null, 'btn-success'); ?></div>
</div>
</div>
</form>
<?php
require('includes/template_bottom.php');
require('includes/application_bottom.php');
?>