Ok, this is a pretty simple debug technique, with "global constants"(a constant that is set in "application_top.php" and is available to EVERY page throughout the site) you can simply add that line code to the includes/header.php file, like this:
if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
</tr>
</table>
<?php
}
echo '<br>This is the MVS setting: ' . SELECT_VENDOR_SHIPPING;
?>
Note I added it before the closing php tag, go to any page on your site and it will "print out" on your screen and you will see what the site thinks that constant is.
I don't think you need to do this though, your second point
Is what is allowing that block of code to execute even when MVS is turned off, which it shouldn't. So change that block to this:
if (SELECT_VENDOR_SHIPPING == 'true') {
//MVS - added insert for new orders_shipping table
$shipping_array = $shipping['vendor'];
foreach ($shipping_array as $vendors_id => $shipping_data) {
$vendors_query = tep_db_query("select vendors_name
from " . TABLE_VENDORS . "
where vendors_id = '" . (int)$vendors_id . "'"
);
$vendors_name = 'Unknown';
if ($vendors = tep_db_fetch_array($vendors_query)) {
$vendors_name = $vendors['vendors_name'];
}
$shipping_method_array = explode ('_', $shipping_data['id']);
if ($shipping_method_array[0] == 'fedex1') {
$shipping_method = 'Federal Express';
} elseif ($shipping_method_array[0] == 'upsxml') {
$shipping_method = 'UPS';
} elseif ($shipping_method_array[0] == 'usps') {
$shipping_method = 'USPS';
} else {
$shipping_method = $shipping_method_array[0];
}
$sql_data_array = array('orders_id' => $insert_id,
'vendors_id' => $vendors_id,
'shipping_module' => $shipping_method,
'shipping_method' => $shipping_data['title'],
'shipping_cost' => $shipping_data['cost'],
'shipping_tax' => $shipping_data['ship_tax'],
'vendors_name' => $vendors_name,
'vendor_order_sent' => 'no'
);
tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array);
}
}// end if MVS enabled
//MVS End
And it won't execute if MVS is turned off. I am fairly confident that "if" statement has been there since the first release, but I could be wrong about that.
Good luck Steve, Craig :)