Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error upon checkout


JoshuaTSmith01

Recommended Posts

Posted

Hey, all! I was trying to edit one of the usps.php files in my online store so that I could remove the Express shipping option. Every time I tried test logging out and shipping with media mail, it automatically calculated the total with Express... annoying. But, I screwed things up ever more after I tried manually removing the line

define('MODULE_SHIPPING_USPS_TEXT_OPT_EX', 'Express Mail'); in the file /includes/languages/english/modules/shipping/usps.php. Now I get this error...

 

Fatal error: Cannot instantiate non-existent class: usps in /home/content/j/o/s/joshuatsmith01/html/oscommerce/catalog/includes/classes/shipping.php on line 39

 

 

Tried uploading a replacement usps.php file from the oscommerce-3.0a5.zip but it didn't work.

 

I'm really new to all of this, any help would be great! I'm hoping this is an easy fix. Thanks!

Posted

Removing the line won't do anything else than removing the text, except avoiding the class usps to be load... So put it back in your file and the module should work again. Are you sure that you're using version 3.0a5 since it's not recommended for productive systems? Otherwise the 3.x module may not work with 2.2RC2a...

 

As a hint, making backups of a file before making any changes saves you trouble. And commenting out a line of code is the first choice, rather than deleting it.

Posted
Removing the line won't do anything else than removing the text, except avoiding the class usps to be load... So put it back in your file and the module should work again. Are you sure that you're using version 3.0a5 since it's not recommended for productive systems? Otherwise the 3.x module may not work with 2.2RC2a...

 

As a hint, making backups of a file before making any changes saves you trouble. And commenting out a line of code is the first choice, rather than deleting it.

 

 

Ah, you're right. It was the oscommerce-2.2rc2a.zip folder that I got the replacement .php file from.

 

However, I tried replacing the text before I tried replacing the file and neither seem to work. Are there any other possible solutions to this problem? Thanks!

Posted
Make sure you didn't mix up the module file and the language file since they are both named usps.php.

 

Haha, I knew this was an easy fix. I re-uped the right usps.php and now everything's working fine!

 

Thank you so much for you help! Like I said, I'm new to this and can be pretty computer illiterate at times. Really appreciate the help!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...