Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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?

Posted

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'];

}

Posted

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.

Posted

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.

Posted

That code referenced above has been added to general.php so it just needs to be removed from easypopulatefunctions.php

[no external urls in signatures please, kthanks]

Posted

: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.

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...