Hello, I'm getting a snag on Step #3 which reads:
--------
STEP 3 *** If you have already installed USPS Methods or UPS Choice, you can skip this step
--------
In catalog/admin/modules.php
*****************************************
Find This code somewhere around line 48:
*****************************************
if (tep_not_null($action)) {
switch ($action) {
case 'save':
while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {
***********************************************
INSERT THE FOLLOWING CODE AFTER THE ABOVE LINE:
***********************************************
if (is_array($value) ) {
$value = implode( ", ", $value);
$value = ereg_replace (", --none--", "", $value);
}
****************************
SO IT SHOULD LOOK LIKE THIS:
****************************
if (tep_not_null($action)) {
switch ($action) {
case 'save':
while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {
if (is_array($value) ) {
$value = implode( ", ", $value);
$value = ereg_replace (", --none--", "", $value);
}
tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
}
tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));
break;
case 'install':
NOTE1: if you fail to do this step you will get the following error message when editing UPS XML in the admin:
Warning: constant() [function.constant]: Couldn't find constant UPSXML_Array in /path/to/your/shop_root/includes/modules/shipping/upsxml.php on line 1010
NOTE2: if your settings do not save change the line
while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {
to:
foreach($_POST['configuration'] as $key => $value) {
I found the general location of where Step 3 is referencing, but it is not quite the same. My code reads:
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
if (tep_not_null($action)) {
switch ($action) {
// {{ buySAFE Module
case 'buysafe_save':
if ( ( $HTTP_POST_VARS['configuration']['MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA'] == '' ||
$HTTP_POST_VARS['configuration']['MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA'] == '-- none --' )
&&
( $HTTP_POST_VARS['configuration']['MODULE_BUYSAFE_BUYSAFE_STORE_AUTHENTICATION_DATA'] == '' ||
$HTTP_POST_VARS['configuration']['MODULE_BUYSAFE_BUYSAFE_STORE_AUTHENTICATION_DATA'] == '-- none --' ) )
{
$seal_data = tep_db_fetch_array(tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA'"));
$store_data = tep_db_fetch_array(tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_BUYSAFE_BUYSAFE_STORE_AUTHENTICATION_DATA'"));
$HTTP_POST_VARS['configuration']['MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA'] = $seal_data['configuration_value'];
$HTTP_POST_VARS['configuration']['MODULE_BUYSAFE_BUYSAFE_STORE_AUTHENTICATION_DATA'] = $store_data['configuration_value'];
}
if (strlen($HTTP_POST_VARS['configuration']['MODULE_BUYSAFE_BUYSAFE_SEAL_AUTHENTICATION_DATA']) != 88)
{
$messageStack->add('Data entry error: Invalid seal authentication data. Please fix the input data and try again.', 'error');
$action = 'buysafe_edit';
}
if (strlen($HTTP_POST_VARS['configuration']['MODULE_BUYSAFE_BUYSAFE_STORE_AUTHENTICATION_DATA']) != 36)
{
$messageStack->add('Data entry error: Invalid store authentication data. Please fix the input data and try again.', 'error');
$action = 'buysafe_edit';
}
if ($HTTP_POST_VARS['test_authentication'] == '1')
{
$action = 'buysafe_edit';
}
if ($action == 'buysafe_edit') break;
// }}
Any help would be appreciated.