I'm testing on a clean installation.
I created a header_php_test.php with the following code:
PHP Code:
<?php
$_SESSION['customer_country_id'] = $check_country->fields['entry_country_id'];
$_SESSION['customer_zone_id'] = $check_country->fields['entry_zone_id'];
$state_code = '';
$state_name = '';
if (isset($_SESSION['customer_country_id']) && isset($_SESSION['customer_zone_id'])) {
$state_info = $db->Execute("SELECT zone_code, zone_name FROM " . TABLE_ZONES . " WHERE zone_country_id = " . $_SESSION['customer_country_id'] . " AND zone_id = " . $_SESSION['customer_zone_id'] . " LIMIT 1");
if (!$state_info->EOF) {
$state_code = $state_info->fields['zone_code']; // 2-character code
$state_name = $state_info->fields['zone_name']; // Full name
}
}
$test = 'this is a test dialog';
?>
On the tpl_checkout_success_default.php I added the following above the last div tag:
PHP Code:
<?php echo $test; ?>
<br />
<?php echo $state_code; ?>
<br />
<?php echo $state_name; ?>
Still all I can see at the bottom of index.php?main_page=checkout_success is "this is a test dialog", but still no customer state info is displayed.
Bookmarks