CATEGORIES_TABS_STATUS Error
Hello everyone, I always have this error that appears in the logs, I can't understand where some idea comes from?
-> PHP Warning: Use of undefined constant CATEGORIES_TABS_STATUS - assumed 'CATEGORIES_TABS_STATUS' (this will throw an Error in a future version of PHP) inincludes / templates / responsive_classic / templates / tpl_modules_categories_tabs.php on line 16.
Re: CATEGORIES_TABS_STATUS Error
It's an entry in your database. Perhaps it got deleted? You can search for it in phpMyAdmin
SELECT * FROM configuration WHERE configuration_key='CATEGORIES_TABS_STATUS';
If necessary, you can recreate it with
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Category Header Menu ON/OFF', 'CATEGORIES_TABS_STATUS', '1', 'Category Header Nav<br />This enables the display of your store\'s categories as a menu across the top of your header. There are many potential creative uses for this.<br />0= Hide Categories Tabs<br />1= Show Categories Tabs', '19', '112', 'zen_cfg_select_option(array(\'0\', \'1\'), ', now());
(Add the your prefix to "configuration" if you have one.)
Re: CATEGORIES_TABS_STATUS Error
Thanks as always exhaustive,
I have other errors:
-> PHP warning: use of undefined constant SHOW_ACCOUNT_LINKS_ON_SITE_MAP - assumed 'SHOW_ACCOUNT_LINKS_ON_SITE_MAP' (this will throw an error in a future version of PHP) in /includes/templates/template_default/templatesfa/tpl_page_not_default/templatesfa/tpl_page_not_default. 29.
-> PHP warning: use of undefined constant LARGE_IMAGE_HEIGHT - assumed 'LARGE_IMAGE_HEIGHT' (this will throw an error in a future version of PHP) in / includes / templates / responsive_classic / templates / tpl_modules_main_product_image.php on line 23.
[11-Apr-2022 11:46:19 Europe / Rome] PHP deprecated: methods with the same name as their class will not be constructors in a future version of PHP; RewardPoints has a deprecated constructor in includes / classes / observers / class.reward_points.php on line 6
Re: CATEGORIES_TABS_STATUS Error
a) SHOW_ACCOUNT_LINKS_ON_SITE_MAP - this is another built in define. It somehow got clobbered; add it back.
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Site Map - include My Account Links?', 'SHOW_ACCOUNT_LINKS_ON_SITE_MAP', 'No', 'Should the links to My Account show up on the site-map?<br />Note: Spiders will try to index this page, and likely should not be sent to secure pages, since there is no benefit in indexing a login page.<br /><br />Default: false', 19, 115, 'zen_cfg_select_option(array(\'Yes\', \'No\'), ', now());
b) LARGE_IMAGE_HEIGHT - this is *not* a built-in define, you have to add it. Same with _WIDTH.
Use this in Admin > Tools > Install SQL Patches:
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Large Image Width', 'LARGE_IMAGE_WIDTH', '600', 'The pixel width of large images', '4', '80', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Large Image Height', 'LARGE_IMAGE_HEIGHT', '600', 'The pixel height of large images', '4', '81', now());
c) Rewards: here's how to fix issues like this:
https://docs.zen-cart.com/user/upgra...s-their-class-
Re: CATEGORIES_TABS_STATUS Error
c) Rewards: here's how to fix issues like this:
https://docs.zen-cart.com/user/upgra...s-their-class-[/QUOTE]
Thanks as always very kind, then the two queries work and have solved, most likely when I made the update to the Italian language of the DB some pieces got lost along the way.
As for the error
PHP deprecated: methods with the same name as their class will not be constructors in a future version of PHP; RewardPoints has a deprecated constructor in includes / classes / observers / class.reward_points.php on line 6
I've seen the instructions,
but on line 6 there's just this:
class RewardPoints extends base
I don't find what to correct
Re: CATEGORIES_TABS_STATUS Error
I can't find the solution of this:
I know but slowly I learn
-> PHP warning: use of undefined constant none - assumption 'none' (this will generate an error in a future version of PHP) in /includes/templates/responsive_classic/common/tpl_language_header.php on line 22.
-> PHP warning: use of undefined constant none - assumption 'none' (this will generate an error in a future version of PHP) in /includes/templates/responsive_classic/common/tpl_currency_header.php on line 69.
Re: CATEGORIES_TABS_STATUS Error
a) RewardPoints:
The line number is a bit misleading. Look for something like
function RewardPoints()
change it to
function __construct()
b) use of undefined constant none
Please post the contents of
/includes/templates/responsive_classic/common/tpl_language_header.php on line 22.
/includes/templates/responsive_classic/common/tpl_currency_header.php on line 69.
Re: CATEGORIES_TABS_STATUS Error
Goodmornig,
language header is:
<?php
/**
* Header Languages Links Template
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* Added by rbarbour (ZCAdditions.com), Flexible Language/Currency Header Options (33a)
*/
$content = " ";
$get_languages = ("select * from " . TABLE_LANGUAGES);
$languages = $db->Execute($get_languages);
if($languages ->RecordCount() > 0)
{
switch (ZCA_LANGUAGE_OPTION) {
case none:
$content .= '';
break;
case links:
$content .= ' ' . ZCA_LANGUAGES_X_TEXT . ' ';
break;
case icons:
$content .= ' ' . ZCA_LANGUAGES_X_TEXT . ' ';
break;
case dropdown:
$content .= '<select onchange="if (this.value) window.location.href=this.value">';
$content .= '<option value="' . ZCA_LANGUAGES_TEXT . '">' . ZCA_LANGUAGES_TEXT . '</option>';
break;
case popup:
$content .= '<div id="languageContainer">';
$content .= '<a href="#" id="languageButton"><span>' . ZCA_LANGUAGES_TEXT . '</span><em> </em></a>';
$content .= '<div style="clear:both"></div>';
$content .= '<div id="languageBox">';
break;
}
while (!$languages->EOF)
{
switch (ZCA_LANGUAGE_OPTION) {
case none:
$content .= '';
break;
case links:
$content .= '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $languages->fields['code'], $request_type) . '">' . $languages->fields['name'] . '</a> ';
break;
case icons:
$content .= '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $languages->fields['code'], $request_type) . '">' . zen_image(DIR_WS_LANGUAGES . $languages->fields['directory'] . '/images/' . $languages->fields['image'], $languages->fields['name'], '', '', '') . '</a> ';
break;
case dropdown:
$content .= '<option value="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $languages->fields['code'], $request_type) . '">' . $languages->fields['name'] . '</option>';
break;
case popup:
$content .= '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $languages->fields['code'], $request_type) . '">' . zen_image(DIR_WS_LANGUAGES . $languages->fields['directory'] . '/images/' . $languages->fields['image'], $languages->fields['name'], '', '', '') . ' ' . $languages->fields['name'] . '</a><br />';
break;
}
$languages->MoveNext();
}
switch (ZCA_LANGUAGE_OPTION) {
case none:
$content .= '';
break;
case links:
$content .= '';
break;
case icons:
$content .= '';
break;
case dropdown:
$content .= '</select>';
break;
case popup:
$content .= '</div>';
$content .= '</div>';
break;
}
}
echo $content;
?>
currency haeder is:
<?php
/**
* Header Languages Links Template
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* Added by rbarbour (ZCAdditions.com), Flexible Language/Currency Header Options (33a)
*/
$content = " ";
$get_languages = ("select * from " . TABLE_LANGUAGES);
$languages = $db->Execute($get_languages);
if($languages ->RecordCount() > 0)
{
switch (ZCA_LANGUAGE_OPTION) {
case none:
$content .= '';
break;
case links:
$content .= ' ' . ZCA_LANGUAGES_X_TEXT . ' ';
break;
case icons:
$content .= ' ' . ZCA_LANGUAGES_X_TEXT . ' ';
break;
case dropdown:
$content .= '<select onchange="if (this.value) window.location.href=this.value">';
$content .= '<option value="' . ZCA_LANGUAGES_TEXT . '">' . ZCA_LANGUAGES_TEXT . '</option>';
break;
case popup:
$content .= '<div id="languageContainer">';
$content .= '<a href="#" id="languageButton"><span>' . ZCA_LANGUAGES_TEXT . '</span><em> </em></a>';
$content .= '<div style="clear:both"></div>';
$content .= '<div id="languageBox">';
break;
}
while (!$languages->EOF)
{
switch (ZCA_LANGUAGE_OPTION) {
case none:
$content .= '';
break;
case links:
$content .= '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $languages->fields['code'], $request_type) . '">' . $languages->fields['name'] . '</a> ';
break;
case icons:
$content .= '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $languages->fields['code'], $request_type) . '">' . zen_image(DIR_WS_LANGUAGES . $languages->fields['directory'] . '/images/' . $languages->fields['image'], $languages->fields['name'], '', '', '') . '</a> ';
break;
case dropdown:
$content .= '<option value="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $languages->fields['code'], $request_type) . '">' . $languages->fields['name'] . '</option>';
break;
case popup:
$content .= '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $languages->fields['code'], $request_type) . '">' . zen_image(DIR_WS_LANGUAGES . $languages->fields['directory'] . '/images/' . $languages->fields['image'], $languages->fields['name'], '', '', '') . ' ' . $languages->fields['name'] . '</a><br />';
break;
}
$languages->MoveNext();
}
switch (ZCA_LANGUAGE_OPTION) {
case none:
$content .= '';
break;
case links:
$content .= '';
break;
case icons:
$content .= '';
break;
case dropdown:
$content .= '</select>';
break;
case popup:
$content .= '</div>';
$content .= '</div>';
break;
}
}
echo $content;
?>
Then I have another problem, I am building a payment form, and I have two errors:
-> PHP Warning: Use of undefined constant TABLE_SMARTPAY - assumed 'TABLE_SMARTPAY' (this will throw an Error in a future version of PHP) in /includes/modules/payment/smartpay.php on line 95.
on line 95 of the module is this:
$ sql = "INSERT INTO" .TABLE_SMARTPAY. "
and it gives me this error:
-> PHP Fatal error: 1146: Table 'erborist_testita_biocanapa.TABLE_SMARTPAY' doesn't exist :: INSERT INTO TABLE_SMARTPAY
as if he didn't see the table
Re: CATEGORIES_TABS_STATUS Error
Oh ok. Change
case none:
...
case links:
...
case icons:
...
..
to
case 'none':
...
case 'links':
...
case 'icons':
...
etc.
Re: CATEGORIES_TABS_STATUS Error
OK thank you
Then I have another problem, I am building a payment form, and I have two errors:
-> PHP Warning: Use of undefined constant TABLE_SMARTPAY - assumed 'TABLE_SMARTPAY' (this will throw an Error in a future version of PHP) in /includes/modules/payment/smartpay.php on line 95.
on line 95 of the module is this:
$ sql = "INSERT INTO" .TABLE_SMARTPAY. "
and it gives me this error:
-> PHP Fatal error: 1146: Table 'XXXXXXXX.TABLE_SMARTPAY' doesn't exist :: INSERT INTO TABLE_SMARTPAY
as if he didn't see the table