Jump to content
Sign in to follow this  
Muldrick

Tried the USPS shipping update, but...

Recommended Posts

I was working on the USPS update (USPSMethods_2.8d)

1. I disabled my USPS shipping. (I already have an account)

2. I replaced the catalog/includes/modules/shipping/usps.php with the file included in

the contribution.

3. I replaced the catalog/includes/languages/english/modules/shipping/usps.php with the

file included in the contribution.

4. I replaced the admin/modules.php with the file included in the contribution.

5. I replace admin/includes/functions/general.php with the file included in the

contribution.

 

And that should have done it. (right?)

 

Now when I try to log into my admin (to enable the USPS shipping) it won't let me in:(

Comes up with:

Fatal error: Unknown function: tep_admin_check_login() in public_html/admin/includes/application_top.php on line 215

 

My line 215 says:

// Set the local configuration parameters - mainly for developers

if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');

 

Help?

Edited by Muldrick

Share this post


Link to post
Share on other sites

OK, I started all over. I put my original files back and was able to get back into my admin.

The problem only starts when I try step 6 in the instructions, which says:

 

STEP 6

------

 

Replace admin/includes/functions/general.php with the file included in this

contribution. Do this even if you have used versions of USPS Methods.

 

**

OR

**

 

********************************************************************************

***********

IF YOU HAVE AN ALREADY MODIFIED FILE YOU WILL NEED TO DO THIS INSTEAD OF USING THE DROP IN:

********************************************************************************

***********

 

*****************************************

Find This code somewhere around line 767:

*****************************************

 

////

// Alias function for module configuration keys

function tep_mod_select_option($select_array, $key_name, $key_value) {

reset($select_array);

while (list($key, $value) = each($select_array)) {

if (is_int($key)) $key = $value;

$string .= '<br><input type="radio" name="configuration[' . $key_name . ']" value="' . $key . '"';

if ($key_value == $key) $string .= ' CHECKED';

$string .= '> ' . $value;

}

 

return $string;

}

 

***********************************************

INSERT THE FOLLOWING CODE AFTER THE ABOVE LINE:

***********************************************

 

// USPS Methods 2.5

// Alias function for Store configuration values in the Administration Tool

function tep_cfg_select_multioption($select_array, $key_value, $key = '') {

for ($i=0; $i<sizeof($select_array); $i++) {

$name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');

$string .= '<br><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"';

$key_values = explode( ", ", $key_value);

if ( in_array($select_array[$i], $key_values) ) $string .= ' CHECKED';

$string .= '> ' . $select_array[$i];

}

$string .= '<input type="hidden" name="' . $name . '" value="--none--">';

return $string;

}

 

------------------------------------------------------------------------------------------------------------------------------------------------

 

I have an already modified general.php file, so I added the code like it says to do.

 

When I go try to login to my admin it says:

Parse error: parse error, unexpected $ in public_html/admin/includes/functions/general.php on line 1497

 

Well, line 1497 is the last line in the code. It only shows ?>

Why would that be an error?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×