Closed cstdenis closed 2 years ago
I can't trigger this. Zen Cart version? php version? On what page is this triggered? Look in your database for BACK_IN_STOCK_REQUIRES_LOGIN
ZenCart 1.5.7c PHP 8.0.15
I think it was happening on all pages.
Clean install of files, but using an existing database which contains an older version of back in stock. BACK_IN_STOCK_REQUIRES_LOGIN does not exist in the older version of the database.
Looking at the code, manually accessing admin/back_in_stock_notifications.php probably fixes this.
To add the constant BACK_IN_STOCK_REQUIRES_LOGIN.
Either you can uninstall (I could not find instructions for that) and re-install, or add it manually like this.
1) In your admin, hover over the link to BISN in the Configuration menu to get the gID of the url, eg. here it is 33,
2)Use the following SQL in the admin->Tools->SQL Patch Tool, replacing the 33 with your site's gID.
INSERT INTO
configuration(
configuration_title,
configuration_key,
configuration_value,
configuration_description,
configuration_group_id,
sort_order,
set_function,
date_added) VALUES ('Back in Stock requires login', 'BACK_IN_STOCK_REQUIRES_LOGIN', '1', '<br>If enabled, only logged in customers may use the Back in Stock notification system<br><br>0 = off<br>1 = on', '33', '1', 'zen_cfg_select_option(array(''0'', ''1''), ', NOW() );
[15-Feb-2022 20:23:03 America/Vancouver] PHP Fatal error: Uncaught Error: Undefined constant "BACK_IN_STOCK_REQUIRES_LOGIN" in /usr/home/sites/zen15/www/includes/languages/english/extra_definitions/back_in_stock_notifications.php:23 Stack trace:
0 /usr/home/sites/zen15/www/includes/modules/extra_definitions.php(45): include()
1 /usr/home/sites/zen15/www/includes/init_includes/init_templates.php(85): include('/usr/home/sites...')
2 /usr/home/sites/zen15/www/includes/autoload_func.php(37): require_once('/usr/home/sites...')
3 /usr/home/sites/zen15/www/includes/application_top.php(222): require('/usr/home/sites...')
4 /usr/home/sites/zen15/www/index.php(25): require('/usr/home/sites...')
5 {main}
thrown in /usr/home/sites/zen15/www/includes/languages/english/extra_definitions/back_in_stock_notifications.php on