Lioelx Posted December 1, 2016 Share Posted December 1, 2016 (edited) @@Dan Cole No, i have the fail described above. Call to undefined function tep_get_languages() in /httpdocs/faq.php on line 17 Edited December 1, 2016 by Lioelx Quote No external links here, thank you Link to comment Share on other sites More sharing options...
♥Dan Cole Posted December 1, 2016 Share Posted December 1, 2016 @@Lioelx So do you have the function tep_get_languages() in the includes/function/general.php on the catalogue side of the shop? Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Lioelx Posted December 1, 2016 Share Posted December 1, 2016 @@Lioelx So do you have the function tep_get_languages() in the includes/function/general.php on the catalogue side of the shop? Dan @@Dan Cole, No, only on admin side. The original 2.3.4 dont hav the function on cataloge side, i put the function on catalog/includes/functions/general.php and the code made dissaper all the page excep header an footer. this ist the function, i think... function tep_get_languages() { $languages_query = tep_db_query("select languages_id, name, code, image, directory from " . TABLE_LANGUAGES . " order by sort_order"); while ($languages = tep_db_fetch_array($languages_query)) { $languages_array[] = array('id' => $languages['languages_id'], 'name' => $languages['name'], 'code' => $languages['code'], 'image' => $languages['image'], 'directory' => $languages['directory']); } return $languages_array; } Quote No external links here, thank you Link to comment Share on other sites More sharing options...
Lioelx Posted December 1, 2016 Share Posted December 1, 2016 i dont see this on footer: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select f.faq_id, fd.faq_question, fd.faq_answer, f.last_modified, f.sort_order, ' at line 1 select count(select f.faq_id, fd.faq_question, fd.faq_answer, f.last_modified, f.sort_order, f.faq_status from faq f, faq_description fd where f.faq_id=fd.faq_id and fd.language_id=3 order by f.sort_order, fd.faq_id) as total [TEP STOP] TABLE_HEADING_FAQ_PREV TABLE_HEADING_FAQ_QUESTION TABLE_HEADING_FAQ_STATUS TABLE_HEADING_FAQ_LAST_MODIFIED And this the sql query CREATE TABLE `faq` ( `faq_id` int(11) NOT NULL auto_increment, `faq_status` tinyint(1) NOT NULL default '1', `sort_order` int(11) NOT NULL default '0', `last_modified` datetime NOT NULL, PRIMARY KEY (`faq_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE `faq_description` ( `faq_id` int(11) NOT NULL, `language_id` int(11) NOT NULL, `faq_question` text, `faq_answer` text, PRIMARY KEY (`faq_id`,`language_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; Quote No external links here, thank you Link to comment Share on other sites More sharing options...
Lioelx Posted December 1, 2016 Share Posted December 1, 2016 catalog/admin/languages.php // create additional FAQ language records $faq_query = tep_db_query("select f.faq_id, fd.faq_question, fd.faq_answer from faq f left join faq_description fd on f.faq_id = fd.faq_id where fd.language_id = '" . (int)$languages_id . "'"); while ($faq = tep_db_fetch_array($faq_query)) { tep_db_query("insert into faq_description (faq_id, language_id, faq_question, faq_answer) values ('" . (int)$faq['faq_id'] . "', '" . (int)$insert_id . "', '" . tep_db_input($faq['faq_question']) . "', '" . tep_db_input($faq['faq_answer']) . "')"); } Quote No external links here, thank you Link to comment Share on other sites More sharing options...
♥Dan Cole Posted December 2, 2016 Share Posted December 2, 2016 @@Lioelx You lost me....so you added the function on the catalogue side and the error went away...that makes sense. Now you're wondering if it's the right function? The instructions on installing the add-on should guide you through that....I'm guessing that you just put the function in the wrong general.php file when you installed it. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Lioelx Posted December 2, 2016 Share Posted December 2, 2016 Hi @@Dan Cole, sorry for my bad explain. I write the funcion on catalog/includes/functios/general.php install manual dont explain nothign to this. Whit the funcion the error Call to undefined function tep_get_languages() in /httpdocs/faq.php on line 17 is solved but.... Now show this fail: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select f.faq_id, fd.faq_question, fd.faq_answer, f.last_modified, f.sort_order, ' at line 1 select count(select f.faq_id, fd.faq_question, fd.faq_answer, f.last_modified, f.sort_order, f.faq_status from faq f, faq_description fd where f.faq_id=fd.faq_id and fd.language_id=3 order by f.sort_order, fd.faq_id) as total this sentences are in catalog/admin/languages.php (manual installation) // create additional FAQ language records $faq_query = tep_db_query("select f.faq_id, fd.faq_question, fd.faq_answer from faq f left join faq_description fd on f.faq_id = fd.faq_id where fd.language_id = '" . (int)$languages_id . "'"); while ($faq = tep_db_fetch_array($faq_query)) { tep_db_query("insert into faq_description (faq_id, language_id, faq_question, faq_answer) values ('" . (int)$faq['faq_id'] . "', '" . (int)$insert_id . "', '" . tep_db_input($faq['faq_question']) . "', '" . tep_db_input($faq['faq_answer']) . "')"); } Or its caused whit the function... i dont know: function tep_get_languages() { $languages_query = tep_db_query("select languages_id, name, code, image, directory from " . TABLE_LANGUAGES . " order by sort_order"); while ($languages = tep_db_fetch_array($languages_query)) { $languages_array[] = array('id' => $languages['languages_id'], 'name' => $languages['name'], 'code' => $languages['code'], 'image' => $languages['image'], 'directory' => $languages['directory']); } return $languages_array; } Regards Quote No external links here, thank you Link to comment Share on other sites More sharing options...
♥Dan Cole Posted December 3, 2016 Share Posted December 3, 2016 @@Lioelx Let me see if I can get on the same page...is this the add-on you installed...the version by FIMBLE? http://addons.oscommerce.com/info/1106 Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥BrockleyJohn Posted December 3, 2016 Share Posted December 3, 2016 @@Lioelx my guess is that you're getting that error on a page that is supposed to show a list of FAQs. Is that right? It looks like it's when the query is run from the paging logic to see if the results will fit on one page or not, so you won't find the exact query in the code anywhwere. However, the syntax looks ok to me, so the most likely cause of the error is that you haven't applied changes to the database that you were supposed to. Quote Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released. Looking for a payment or shipping module? Maybe I've already done it. Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x Link to comment Share on other sites More sharing options...
Lioelx Posted December 3, 2016 Share Posted December 3, 2016 Hi @@Dan Cole @BrockleyJonh No Dan, the addon its this http://addons.oscommerce.com/info/7744 The problem as solved, The person who mounted the package accidentally changed catalog files by admin and biceversa Many thanks for your help. Regards. Quote No external links here, thank you Link to comment Share on other sites More sharing options...
♥Dan Cole Posted December 3, 2016 Share Posted December 3, 2016 @@Lioelx Glad you got it sorted. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Lioelx Posted December 3, 2016 Share Posted December 3, 2016 Thanks @@Dan Cole Quote No external links here, thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.