Hi,
First I would like to thank you for this contribution that I really appreciate it works perfectly fine.
The only problem I have now is when I tried to install the contribution "[TiM's osC Solutions] Require customers to login", the maintenance page does not load anymore the open and closed mode are functioning properly with this contribution.
It only adds this to the application_top.php file.
In /catalog/inlcudes/application_top.php
*** At the end of the file, find ***
?>
*** Before that, add ***
// BOF: [TiM's osC Solutions] Require customers to login
if (!defined('REQUIRE_LOGIN')) {
tep_db_query(
"insert into configuration
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function)
VALUES ('Require login', 'REQUIRE_LOGIN', 'false', 'Require users to login before they can see the catalog. This redirects any guests to the login page.', '1', '22', now(), null, 'tep_cfg_select_option(array(\'true\', \'false\'),');"
);
define('REQUIRE_LOGIN', 'false');
}
if (!tep_session_is_registered('customer_id') && REQUIRE_LOGIN == 'true') {
if (!in_array(basename($PHP_SELF), array(FILENAME_LOGIN, FILENAME_LOGOFF, FILENAME_PASSWORD_FORGOTTEN, FILENAME_CONTACT_US, FILENAME_SITEMAP, FILENAME_CREATE_ACCOUNT, FILENAME_CREATE_ACCOUNT_SUCCESS))) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}
}
// BOF: [TiM's osC Solutions] Require customers to login
I don't know exactly how to add a check that if STORE_MODE is in maintenance mode, to define('REQUIRE_LOGIN', 'false');
and I'm not sure if it's the right place to modify or should the maintenance_index.php file should be modified in some way instead.
Any help would be greatly appreciated.
Thanks.