Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shipping modules don't load


Guest

Recommended Posts

I tried to install a UPS shipping module and found that it would not load. I thought it might be the add-on's mod to the modules.php file so I removed all traces of it. I even used a file comparison tool to make sure it was back to its original state. However, the only shipping modules that load are the flat rate and per item. The "Install Modules" button says there are 6, yet when I click on it there are only 2 with no option of installing even those.

 

I checked the configuration in the database and the line for shipping modules is empty (the installed modules field is empty unlike the payment modules which lists all the payment modules available), so they are just not loading. Is there some code that is supposed to do this that is not found on the modules.php? If it knows how many there are why isn't it loading them?

 

Any help would be greatly appreciated.

Link to comment
Share on other sites

Tim,

 

 

I suggest you upload the ups.php files to both the /includes/modules/shipping/ and the /includes/languages/modules/shipping/ directories. Without the two files, the module will not install. Also, keep in mind the two ups.php files are different, so don't mix them up.

 

 

 

Chris

Link to comment
Share on other sites

Thanks Chris, if only it were that simple.

 

Unfortunately, it is not just a matter of the UPS module I was trying to install not loading, none of the modules are loading. The Install Modules button correctly shows 6: the 5 that come with osC and the UPS one I installed, yet when I click on the button only the 2 are listed and neither can be installed. It looks as if the shipping modules page is not complete as the box on the right with the "Install" button is not there. Even for the Flat Rate and Per Item listed, the line goes all the way to the right side and the Install option is not there. And as I said, the shipping modules line in the DB shows no modules loaded.

 

I didn't even look at this module until now. It is on my dev store on localhost. I just did a clean install of osC and have been installing new version of the add-ons I have on my live store to get ready to update it. It may have had this problem the entire time and I just didn't know it because I hadn't messed with the shipping settings.

 

Since the modules.php file is identical to the original installation, and I haven't touched anything else having to do with shipping, I can't figure out where the problem is. Am I right in thinking the modules.php loads directories based on which module is clicked? In other words, when I click on "Payment" it loads the payment modules by simply loading "payment" (or whatever) into the variable for which directory to search, but does not hand it off to another page? Maybe the problem is on one of the definitions pages. I'll take a look and see if I can find anything.

Link to comment
Share on other sites

This happens when you try to install a module that doesn't have the correct files. The database becomes corrupted and then nothing works. The best solution is to restore your backup copy of the configuration table. If you don't have a known good backup, you can manually remove all of the shipping module rows from the configuration table. You should then be able to reinstall your shipping modules.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

This happens when you try to install a module that doesn't have the correct files. The database becomes corrupted and then nothing works. The best solution is to restore your backup copy of the configuration table. If you don't have a known good backup, you can manually remove all of the shipping module rows from the configuration table. You should then be able to reinstall your shipping modules.

 

Regards

Jim

Thanks Jim, but to make sure I don't screw something up, let me make sure I understand. So I empty the row for shipping modules only from the configuration table in the DB? And then it will rebuild when I click the shipping link in the modules section? I never backed up the DB on my dev store since I don't even have my products on it, just the junk that comes with the installation. I'll take a look and see if this works.

Link to comment
Share on other sites

It's more than one row, otherwise that's right. Look for configuration_key values that start with MODULE_SHIPPING_ and delete all of them.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

It's more than one row, otherwise that's right. Look for configuration_key values that start with MODULE_SHIPPING_ and delete all of them.

 

Regards

Jim

 

I only found one, MODULE_SHIPPING_INSTALLED, deleted it, and nothing changed. There are no other MODULE_SHIPPING entries. I really don't know much about MySQL, is there a way to delete the entire thing and rebuild it without deleting the entire store?

 

My live store works fine, it just bothers me that I can't test shipping modules before uploading changes. And I worry about the possibility of other parts being corrupt.

Link to comment
Share on other sites

You can truncate (empty) the configuration table and replace it with the entries in your backup or the osCommerce install file. The latter will reset all of your configuration entries to the default values, so you will need to make your configuration changes again

 

Unknown modules should always be tested in a test copy of your store before installing them on your live store. This goes for most other code changes as well. Not all of the code in the Addons section is correct.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

You can truncate (empty) the configuration table and replace it with the entries in your backup or the osCommerce install file. The latter will reset all of your configuration entries to the default values, so you will need to make your configuration changes again

 

Unknown modules should always be tested in a test copy of your store before installing them on your live store. This goes for most other code changes as well. Not all of the code in the Addons section is correct.

 

Regards

Jim

 

Luckily this is a test store. Hopefully this will fix things. Thanks for your help.

Link to comment
Share on other sites

Luckily this is a test store. Hopefully this will fix things. Thanks for your help.

 

Well, it didn't work. That is, even after clearing the entire database and running the setup again I still have the problem with the shipping modules. I am guessing that there is a problem with one of the modules that come with osC, most likely one of the ones that show up: either flat rate or per item.

 

Since I don't need either of those (or any of the others other than the one I want to install), does it make sense that I could remove them all, delete the MODULES_SHIPPING line from the DB, and it would work correctly?

Link to comment
Share on other sites

All of the stock modules should be fine. Any other modules, even if you don't install them, may be the source of the problem. Try deleting all modules except the stock modules and see what happens.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

All of the stock modules should be fine. Any other modules, even if you don't install them, may be the source of the problem. Try deleting all modules except the stock modules and see what happens.

 

Regards

Jim

Still no go. The only one I had added was the UPS XML. I took that out, deleted the MODULE_SHIPPING_INSTALLED line, and still nothing. The MODULE was added at the end on the DB, but it just had the generic description (this does not need to be edited, etc.) So the problem is either with one of the stock modules, or whatever code loads them. I don't have a clue; I've checked everything I can think of.

 

Oh yes, the original MODULE_SHIPPING_INSTALLED listed only the Flat Rate module even though the Per Item was listed when I clicked the "Install Modules" button. Could it be the Per Item module is the bad one?

Link to comment
Share on other sites

I found it! I looked at the shipping modules and noticed the order they were listed and guessed that they would load in the same order. The one that loads after Per Item (item.php) is Table Rate. I noticed the modification date for that file was newer than the rest even though I didn't recall changing it. I did a file compare and found the only difference is some code added by Discount Coupon Codes, which installs as a file replacement. So I changed it to match the original and it worked. So the table.php file that comes with ot_discount_coupon_codes_3_34_osc2 failed to load and killed the rest of the modules.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...