Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to Edit USPS module in Admin


lakota2081

Recommended Posts

Hello,

 

I recently got everything setup to add USPS shipping to a site I can working on. I can successfully install the module on the Admin side. However, when I click on the option to Edit the module to add the username on the account, it just disappears. I am not allowed to add or change anything anything. Is there a work around for this? Should I upgrade to the newest version of OSC to resolve the issue?

 

Thanks for your help

Link to comment
Share on other sites

No one else has had his issue...ugh....

It appears I may have the same problem as you. I was going to write yesterday something about it, but I wanted to double check things. I reinstalled USPS Methods 5.2.1 again and still I could not Edit the configuation for this module. When I clicked Edit the displayed USPS configuration details disappeared.

I am using OSC 2.2RC2a

PHP Version 5.1.6

My previous version of USPS Methods was V. 3.0 with no problems until now it will not communicate with USPS on International quotes.

 

To get noticed, maybe, a better place to post our problems would be here: http://www.oscommerce.com/forums/topic/146950-contribution-usps-methods/

 

Let me know what you think.

Alan

Production:
osCommerce V. 2.3.4BS
VPS Box

Link to comment
Share on other sites

I've been able to make it work for me. For me, the problem was the addition of the USPS Registration Tradmark by the coders. The problem focused with the new code in catalog/admin/includes/functions/general.php. Some code I had to install and some I left out. You may want try this out. BE SURE TO BACKUP. When following the installation instructions in USPS Methods Ver. 5.2.1 provided by fulluvscents, when you come to Step 9. at the correct place to insert as shown, Insert the following (you may already have this code there if you have an earlier version of USPS Methods):

 

// USPS Methods 3.0
// 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;
 }

 

Next, The following code may be used in lieu of step 10. (again, you may already have this code inserted). You insert the following code after the code given above in this post.

// USPS Methods.  Added by Greg Deeth
// Alias function for Store configuration values in the Administration Tool.
 function tep_cfg_multiinput_list($select_array, $key_value, $key = '') {
   $key_values = explode( ", ", $key_value);

   for ($i=0; $i<sizeof($select_array); $i++) {
     $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');
     $string .= '<br><input type="text" name="' . $name . '" value="' . $key_values[$i] . '"> ' . $select_array[$i];
   }
   $string .= '<input type="hidden" name="' . $name . '" value="--none--">';
   return $string;
 }

// USPS Methods.  Added by Greg Deeth
// Alias function for Store configuration values in the Administration Tool.
 function tep_cfg_multiinput_duallist_oz($select_array, $key_value, $key = '') {
   $key_values = explode( ", ", $key_value);
   $string .= '<center>';

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

     $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');
     $string .= '<br><input type="text" name="' . $name . '" size="3" value="' . $current_key_value . '"><i>oz</i>';
           $string .= ' <b><</b> ' . $select_array[$i] . ' <u><b><</b></u>';
           next($key_values);
           $current_key_value = current($key_values);
           $string .= '<input type="text" name="' . $name . '" size="3" value="' . $current_key_value . '"><i>oz</i>';
           next($key_values);
   }
   $string .= '<input type="hidden" name="' . $name . '" value="--none--">';

   $string .= '</center>';
   return $string;
 }
 function tep_cfg_multiinput_duallist_lb($select_array, $key_value, $key = '') {
   $key_values = explode( ", ", $key_value);
   $string .= '<center>';

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

     $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');
     $string .= '<br><input type="text" name="' . $name . '" size="3" value="' . $current_key_value . '"><i>lbs</i>';
           $string .= ' <b><</b> ' . $select_array[$i] . ' <u><b><</b></u>';
           next($key_values);
           $current_key_value = current($key_values);
           $string .= '<input type="text" name="' . $name . '" size="3" value="' . $current_key_value . '"><i>lbs</i>';
           next($key_values);
   }
   $string .= '<input type="hidden" name="' . $name . '" value="--none--">';

   $string .= '</center>';
   return $string;
 }

 

Follow the rest of the instructions starting from step 11.. Again, some of this code may be already inserted depending if you used an earlier version of USPS Methods.

 

After you install the information I gave you, you will not be able to see USPS registration trademarks in the Admin section but you should be able to see them on checkout in the store. In the Admin, USPS configuration section, you will have "regimark" where a registration trademark would go.

 

Also, for some extra info that might not be applicable, I did not do step 5.a., 5.b, or 8.

 

Hope this works for you. I am not a coder, just a cut and paster.

Alan

Production:
osCommerce V. 2.3.4BS
VPS Box

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...