siteplanet Posted May 22, 2003 Posted May 22, 2003 Hello, I have the latest version of both OSCommerce and EasyPopulate, and I am getting a very strange error message when I try to access EasyPopulate on the admin panel. The only contributions that I have installed are EasyPopulate and a Privacy Policy/Terms of Use mod. Fatal error: Cannot redeclare tep_get_tax_class_title() (previously declared in /home/castleso/public_html/catalog/admin/includes/functions/general.php:1109) in /home/castleso/public_html/catalog/admin/easypopulate_functions.php on line 34 I am new to PHP and have no idea how to fix this. :oops: Has anyone else encountered this error? Quote
siteplanet Posted May 22, 2003 Author Posted May 22, 2003 Here is the relevant code from easypopulate_functions that the error was referring to. } function tep_get_tax_class_title($tax_class_id) { if ($tax_class_id == '0') { return TEXT_NONE; } else { $classes_query = tep_db_query("select tax_class_title from " . TABLE_TAX_CLASS . " where tax_class_id = '" . $tax_class_id . "'"); $classes = tep_db_fetch_array($classes_query); return $classes['tax_class_title']; } Quote
infinityws Posted May 22, 2003 Posted May 22, 2003 Were you suppose to replace some code with the above code? It seems its trying to call the same thing twice? Quote
siteplanet Posted May 22, 2003 Author Posted May 22, 2003 Hi, Thanks for the reply. :) Actually, the only code that was supposed to be replaced/added for EasyPopulate was in the admin/includes/boxes/catalog.php file. The help file said nothing about tax configuration That's why it seems so strange. Quote
infinityws Posted May 22, 2003 Posted May 22, 2003 I've noticed some read me files to be incomplete. The structure of OSC is weird, but after installing a few hacks I noticed a few things some hacks left out. Also, sometimes it doesn't say, but the creator has already replaced that code for you in the file you've uploaded. Quote
loxly Posted May 22, 2003 Posted May 22, 2003 That code referenced above has been added to general.php so it just needs to be removed from easypopulatefunctions.php Quote [no external urls in signatures please, kthanks]
siteplanet Posted May 22, 2003 Author Posted May 22, 2003 :D Thank you, infinityws and loxly. I really appreciate your help. I removed the tax code from easypopulate_functions and now it works fine. I was about to try that before I asked for help, but I'm being very careful when re-arranging code as I am still learning PHP. Quote
infinityws Posted May 22, 2003 Posted May 22, 2003 Congrats and enjoy =) Remember to always back your files. I usually rename the current file currentfile.phpOLD and then upload the new file. If everything goes well I can just delete the OLD one. Quote
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.
Note: Your post will require moderator approval before it will be visible.