Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

please help w/shipping module


stashandstuff

Recommended Posts

I tried to install this contribution, making individual changes as instructed in the install.txt file (rather than copying the files directly).

 

I could not get the shipping module to install at all, so I restored all the files that were changed.

 

With the restore, all of my text definitions disappeared. My admin page now looks like this:

admin5rl.gif

 

And I get this error in my checkout:

Fatal error: Call to undefined method shoppingCart::get_content_type() in /opt/home/cowalunga/htdocs/catalog/includes/classes/order.php on line 136

 

What freaks me out is that I didn't change anything in order.php.

Link to comment
Share on other sites

I finally gave up... did a full restore from yesterday's backup.

Now I get these errors:

 

Warning: shipping::shipping(includes/languages/english/modules/shipping/mltship.php) [function.shipping]: failed to open stream: No such file or directory in /catalog/includes/classes/shipping.php on line 36

 

Warning: shipping::shipping() [function.include]: Failed opening 'includes/languages/english/modules/shipping/mltship.php' for inclusion (include_path='.:/usr/local/lib/php') in /catalog/includes/classes/shipping.php on line 36

 

Warning: shipping::shipping(includes/modules/shipping/mltship.php) [function.shipping]: failed to open stream: No such file or directory in /catalog/includes/classes/shipping.php on line 37

 

Warning: shipping::shipping() [function.include]: Failed opening 'includes/modules/shipping/mltship.php' for inclusion (include_path='.:/usr/local/lib/php') in /catalog/includes/classes/shipping.php on line 37

 

Fatal error: Class 'mltship' not found in /catalog/includes/classes/shipping.php on line 39

Link to comment
Share on other sites

And this stream of errors when I try to log in to admin:

 

/* osCommerce, Open Source E-Commerce Solutions [url=http://www.oscommerce.com]http://www.oscommerce.com[/url] Copyright ? 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) o define('HTTP_SERVER', 'http://www.stashandstuff.com'); // eg, [url=http://localhost]http://localhost[/url] - should not be empty for productive servers define('HTTP_CATALOG_SERVER', 'http://www.stashandstuff.com'); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '  /catalog/'); // where the pages are located on the server define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required define('DIR_FS_ADMIN', '  /catalog/admin/'); // absolute pate required define('DIR_WS_CATALOG', '/catalog/'); // absolute path required define('DIR_FS_CATALOG', '  /catalog/'); // absolute path required define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'xxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxx'); define('DB_DATABASE', 'xxxxx'); define('USE_PCONNECT', 'false'); // use persisstent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' ?>

 

Warning: main(DIR_WS_INCLUDESfilenames.php) [function.main]: failed to open stream: No such file or directory in /catalog/admin/includes/application_top.php on line 44

 

Fatal error: main() [function.require]: Failed opening required 'DIR_WS_INCLUDESfilenames.php' (include_path='.:/usr/local/lib/php') in /catalog/admin/includes/application_top.php on line 44

Link to comment
Share on other sites

Thank you jared, can you tell me what I'm missing?

 

Got back in to admin by making some name changes in the restored files. My store has one name, my admin address another. Now, I have this error:

 

 

1146 - Table 'oscom.shipping_methods' doesn't exist

 

select method_name, module_name, handling_charge, handling_per_box, tare_weight, max_box_weight from shipping_methods

 

[TEP STOP]

 

 

It seems as though oscom has a memory for what I've installed before - even when I've uninstalled it.

I've done a full search for this string (oscom.shipping_methods) and it is not found in any php file. Where is the error coming from?

:(

Link to comment
Share on other sites

I can't add products in admin, my existing products can't go through checkout.

 

:angry:

 

I get this same error for everything.

 

1146 - Table 'oscom.shipping_methods' doesn't exist

 

select method_name from shipping_methods

 

[TEP STOP]

 

I've received no help here... Am I just S-O-L?

Link to comment
Share on other sites

Restore last week's or last month's backup. Alternately you can upload your last good snapshot of your store. You do have a snapshot, right?

 

If you don't have a snapshot of your last good store codebase then this lesson will be great motivation to maintain immaculate development snapshots of your store.

 

Once you get your store functioning correctly download all the source files and save it to an easily identified folder on your local harddrive. I set the folder name as the date for easy identification. Also, pull down a SQL database structure dump so you have that if needed.

 

Every time you add another contribution or make modification to the store do the same thing...download and save in a separate folder with SQL database structure dump.

 

If this ever happens again you can upload one of the stable snapshots (and even have the database structure)...you will never be S.O.L. again.

 

Bobby

Link to comment
Share on other sites

Restore last week's or last month's backup. 

 

I did that... read post 2. Did not help.

 

 

Also, pull down a SQL database structure dump so you have that if needed.

 

 

How do I do this?

 

I deleted everything from my catalog directory and reinstalled the entire application. I still get the same 1146 error.

Link to comment
Share on other sites

I did that... read post 2.  Did not help.

I did read post #2 which stated you restored "yesterday's" backup. This is not the same as last week or last month. Most reputable hosting companies will create daily, weekly, and monthly backups. If you have tried "yesterday's" backup the next logical step is to restore last weeks. If that does not help then restore last months. If that does not help you are truly S.O.L.

How do I do this?

 

I deleted everything from my catalog directory and reinstalled the entire application.  I still get the same 1146 error.

Get with your host and tell them you need to have last week's backup restored. If they say they only have last month's tell them to do that.

 

Bobby

Link to comment
Share on other sites

My host is ME. I don't have a 'last week's backup' because I only started making changes this week. I restored from the last working copy, which was two days ago (yesterday's yesterday).

 

If there is no way to rid myself of this 1146 error, then I will have to find a different shopping cart because even a re-install doesn't remove it.

Link to comment
Share on other sites

Louise,

 

Change shopping carts if you wish...nobody will be offended. However, if you move on to the next one and monkey screw the code without a working snapshot to restore the problem will persist.

 

The issue is NOT with the shopping cart...the problem is that the codebase is corrupt (by your own hand) and you don't have a good backup to restore.

 

Listen, you are in a tough situation with no easy answer. You don't have a good backup and everything is corrupt from the code to the database. The only way of getting your store back to where it was previously is approach each error and correct them individually.

 

The 1064 SQL error is telling you the shipping_methods table does not exist. Go back to the contribution that uses that table and perform the SQL table addition. Check the contribution code revisions and make sure they are retained.

 

You have to continue the process until all errors are gone.

 

Is it time consuming? Yes. Is it tedious? Hell yes. Is it the only way without a good backup? Unfortunately yes.

 

The take home lesson is always have a backup EVEN if you are your own host.

 

Bobby

Link to comment
Share on other sites

The 1064 SQL error is telling you the shipping_methods table does not exist.  Go back to the contribution that uses that table and perform the SQL table addition.  Check the contribution code revisions and make sure they are retained. 

 

You have to continue the process until all errors are gone.

 

Can you repeat this in basic english?

What is a SQL table addition?

What does it mean to check contribution code revisions?

 

I reinstalled the entire oscommerce application from scratch. No bells, no whistles. Plain old vanilla oscommerce with no changes, and still I get the error.

Link to comment
Share on other sites

Download a fresh osCommerce ZIP (or tarball). Unzip the files and delete both configure.php files. Upload the whole thing to your site and overwrite the files. Voila!

 

Although you report that you uploaded a vanilla code base the error tells me that it was not successful. That table it is complaining about is not part of the vanilla osCommerce application and can ONLY be used by a contribution.

 

Bobby

Link to comment
Share on other sites

I'm more than a little exasperated. No one seems to be able to answer my questions. I wouldn't know SQL if it bit me on the butt.

 

 

How SPECIFICALLY do I fix the 1064 error.

 

 

Is there a specific file that needs to be edited? How do I find it? What in the file needs to be changed?

 

How do I add or remove tables? In a php file? If so, which one?

On the server itself? Where?

Link to comment
Share on other sites

I SPECIFICALLY detailed how to correct the issue:

Download a fresh osCommerce ZIP (or tarball). Unzip the files and delete both configure.php files. Upload the whole thing to your site and overwrite the files. Voila!
Link to comment
Share on other sites

OSC uses two different parts to do what it does, the file structure of folders and mostly php files, and a MySQL database. The SQL Bobby is talking about acts upon the database, and at some point one of the contributions (a shipping one) needs a table added to the db. In the contribution download, there should be a file with a .sql suffix. It will be the commands needed to create the table in question. You need to run it on the db, using some sort of interface, I like phpmyadmin myself. Hopefully you have access to something to work on the db directly. The fact that after trying to start over from scratch, yet still the error persists (for a table that isn't in the download) simply indicates that your old modified files are in use. Since you have only just begun working on your store, starting again from scratch is probably the best option. I'd delete all of the osc folders, and the db from your server, and work from the zip or tar that you got from the download. Use a new name for the database even.

 

Jeremy

Link to comment
Share on other sites

ps the contribution code revisions are the changes that you are instructed to make in order to install a contribution to osc. It looks like when you restored the first time, you missed a file in admin/includes/languages/english/ that defines all the headings.

 

Jeremy

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...