Uploaded Current Database Into V.2.1 Error With Wholesale
I am working on upgrading my v.1.5.8 site into v.2.1.
After installing a fresh copy of v.2.1 on my local computer and making a fresh, blank database everything was working fine after comparing and updating all of my files.
I then moved on to adding my current v.1.5.8 database. It all uploaded fine and I can see the information in the tables. The site on my local computer is now just blank screen and the error logs show this:
Uncaught Error: Undefined constant "WHOLESALE_PRICING_CONFIG" in C:\wamp64\www\2.1\includes\classes\Customer.php:47
I have not altered this file in any way, and line 47 shows:
if (WHOLESALE_PRICING_CONFIG !== 'false' && zen_is_logged_in() && !zen_in_guest_checkout()) {
global $db;
I see on line 50 it is trying to look in my database in Customers at the table customers_whole ....whereby there is no customer_whole table
Could this be the problem??
Any ideas on how to fix this??
Thanks,
Jeff
Re: Uploaded Current Database Into V.2.1 Error With Wholesale
When you import an older database you have to run the zc_install procedure to bring it up to date.
Re: Uploaded Current Database Into V.2.1 Error With Wholesale
Thanks for your reply swguy, much appreciated!
That was going to be my next step to run the installer to update my database....but when I go to my site I have a white screen....blank. I cannot access either my Admin panel or website (in my local machine) as it is only a white screen.
With the new addition in v.2 to have the wholesale pricing options for customers, when I run a clean and fresh install and it creates the database tables, everything works. Does importing my current live site database, does it eliminate necessary data tables....which is causing this?? i.e. in my database under Customers, it should have a table for customer_whole.....but it is not there. Was this originally there when freshly installed, but eliminated when I imported my current live site database??
Thanks again for your help,
Jeff
Re: Uploaded Current Database Into V.2.1 Error With Wholesale
Quote:
Originally Posted by
NWCE
Thanks for your reply swguy, much appreciated!
That was going to be my next step to run the installer to update my database....but when I go to my site I have a white screen....blank. I cannot access either my Admin panel or website (in my local machine) as it is only a white screen.
With the new addition in v.2 to have the wholesale pricing options for customers, when I run a clean and fresh install and it creates the database tables, everything works. Does importing my current live site database, does it eliminate necessary data tables....which is causing this?? i.e. in my database under Customers, it should have a table for customer_whole.....but it is not there. Was this originally there when freshly installed, but eliminated when I imported my current live site database??
Thanks again for your help,
Jeff
To upgrade your database, you'll navigate to www.yourwebsite.com/zc_install to start that process.
The upgrade process doesn't eliminate any database tables and the wholesale implementation in zc210 does not include a table named customer_whole.
Re: Uploaded Current Database Into V.2.1 Error With Wholesale
> To upgrade your database, you'll navigate to www.yourwebsite.com/zc_install to start that process.
... and don't do anything else first (no peeking at the admin or storefront! Get your database fixed as step 1).
Re: Uploaded Current Database Into V.2.1 Error With Wholesale
Thanks again swguy for the clarification.....thought it would automatically bring up the Upgrade Database screen.
Did the upgrade on my database. I can now access my Admin panel, but the site is still a blank screen. Admin panel Home, not showing most recent orders on far right side as normal. In Admin->Customers-> Orders....it processes quickly and shows everything....just not in the right panel. No error log to explain why when going to site page it is a white screen.
Error logs show:
PHP Fatal error: Maximum execution time of 60 seconds exceeded in C:\wamp64\www\2.1\includes\classes\db\mysql\query_factory.php on line 437
[15-Jan-2025 16:05:16 UTC] PHP Stack trace:
[15-Jan-2025 16:05:16 UTC] PHP 1. {main}() C:\wamp64\www\2.1\admin\index.php:0
[15-Jan-2025 16:05:16 UTC] PHP 2. require() C:\wamp64\www\2.1\admin\index.php:16
[15-Jan-2025 16:05:16 UTC] PHP 3. require() C:\wamp64\www\2.1\admin\home.php:25
[15-Jan-2025 16:05:16 UTC] PHP 4. include() C:\wamp64\www\2.1\admin\index_dashboard.php:100
[15-Jan-2025 16:05:16 UTC] PHP 5. queryFactory->Execute($sqlQuery = 'SELECT products_options, products_options_values\n FROM zen_orders_products_attributes\n WHERE orders_products_id = 376198 ORDER BY orders_products_attributes_id ASC', $limit = FALSE, $enableCaching = TRUE, $cacheSeconds = 1800, $removeFromQueryCache = *uninitialized*) C:\wamp64\www\2.1\admin\includes\modules\dashboard_widgets\RecentOrdersDashboard Widget.php:58
[15-Jan-2025 16:05:16 UTC] PHP 6. queryFactory->runQuery($sqlQuery = 'SELECT products_options, products_options_values\n FROM zen_orders_products_attributes\n WHERE orders_products_id = 376198 ORDER BY orders_products_attributes_id ASC', $removeFromQueryCache = FALSE) C:\wamp64\www\2.1\includes\classes\db\mysql\query_factory.php:266
[15-Jan-2025 16:05:16 UTC] PHP 7. queryFactory->query($link = class mysqli { public $affected_rows = 1; public $client_info = 'mysqlnd 8.0.30'; public $client_version = 80030; public $connect_errno = 0; public $connect_error = NULL; public $errno = 0; public $error = ''; public $error_list = []; public $field_count = 2; public $host_info = 'localhost via TCP/IP'; public $info = NULL; public $insert_id = 0; public $server_info = '8.3.0'; public $server_version = 80300; public $sqlstate = '00000'; public $protocol_version = 10; public $thread_id = 403; public $warning_count = 0 }, $query = 'SELECT products_options, products_options_values\n FROM zen_orders_products_attributes\n WHERE orders_products_id = 376198 ORDER BY orders_products_attributes_id ASC', $removeFromQueryCache = FALSE) C:\wamp64\www\2.1\includes\classes\db\mysql\query_factory.php:186
Hope this sheds light on what I'm seeing and what to do to fix this.
Thanks,
Jeff
Re: Uploaded Current Database Into V.2.1 Error With Wholesale
jeff,
look at this line here:
https://github.com/zencart/zencart/b...rrides.php#L64
change it to read:
PHP Code:
$includeAttributesInPopoverRows = false;
pretty sure that will fix your issue...
you could try changing line 70 to something lower:
PHP Code:
$recentOrdersMaxRows = 15;
do not forget to remove the 2 slashes at the beginning of the line.
as you running a WAMP, you could also increase the execution time allowed for your php scripts. but i'm not a WAMP guy... i'm an ABM guy... but i think the first correction should address it.
you are welcome.
best.
Re: Uploaded Current Database Into V.2.1 Error With Wholesale
Thanks again swguy....this totally worked setting it to false. My Admin panel now shows all orders in the Home down the right side. I also then got a new error log for me to fix why my site was not displaying when going to it.
Much appreciated for your help and patience!
Jeff
Re: Uploaded Current Database Into V.2.1 Error With Wholesale
> Thanks again swguy....this totally worked setting it to false.
Be sure to give credit to the person who suggested this (not me!)
Re: Uploaded Current Database Into V.2.1 Error With Wholesale
Very sorry......thanks goes to you carlwhat for the answer that corrected my problem!
My apologies to you carlwhat for not paying attention when writing my reply.
Thanks again....your help was very much appreciated!