Unexplainable Database Error
I am really hoping someone here can be of assistance as I have been reading posts, googling and trying almost everything for quite some time now, but without success...
Background:
My shop (www.experilab.co.za) has been running successfully now on ver1.3.9 for quite a few years.
I recently took the step to upgrade to ver1.5.5, mainly to be able to make the site responsive.
The updated version (still in test phase) is working very well, although I am still using the classic template (will only switch templates as a final step).
I wrote a custom shipping module which required a new table in the database. This module has been running 100% on ver1.3.9 for more than 2 years now.
Problem:
As soon as I install the custom shipping module on version 1.5.5, the 'Go to checkout' and 'Estimate shipping' buttons produces an error. (Everything works again as soon as it is deleted).
The debug logs provide the following clue: PHP Fatal error: 1146:Table 'experilabnew.TABLE_POSTALCODEZONE' doesn't exist. Only, this table DOES exist as confirmed by PHPMYADMIN.
I have tried:
Dropping the table and reinstalling.
Deleting the shipping module and reinstalling.
Additional Information:
The database is a test database which was created via the export/import process as described in the upgrade instructions.
No database prefix is used (old and new versions).
The shipping module is unaltered between the two versions.
Everything else on the new version seems to be working 100% using the test database.
It seems as if the specific table (Type: InnoDB) is suddenly invisible to the module.
ANY ideas to try, anyone?
I can post the complete log as well as the shipping module file, if it would help.
Please note I am only an amateur developer...
Re: Unexplainable Database Error
You need to tell Zen Cart there is a new new table. Go over to your old zc version and find the file that is containing the define for 'TABLE_POSTALCODEZONE', normally found in the folder 'includes/extra_datafiles' and/or 'YOUR_ADMINincludes/extra_datafiles', and copy this to your new Zen Cart install. That should solve your problem.
Re: Unexplainable Database Error
Quote:
Originally Posted by
Design75
You need to tell Zen Cart there is a new new table. Go over to your old zc version and find the file that is containing the define for 'TABLE_POSTALCODEZONE', normally found in the folder 'includes/extra_datafiles' and/or 'YOUR_ADMINincludes/extra_datafiles', and copy this to your new Zen Cart install. That should solve your problem.
Of course! (I actually knew that once upon a time...)
The define was located in database_tables.php in the /includes/ directory. (And I must have put it there).
Thanks for saving me!
Re: Unexplainable Database Error
Glad you found it. It is actually better to put it in a separate file, this way you will not lose the define on a next upgrade.