Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error: Call to undefined function: tep_get_categories_


glyndower

Recommended Posts

Hi,

 

I did a clean install using 2.2.

 

I then installed the file s for Quanity Controler (nice mod!) made the mods to the db. So far so good.

 

Hers the issue. When I browse to the catagories/products link in the admin area i get the following:

 

Fatal error: Call to undefined function: tep_get_categories_name() in /home/virtual/site60/fst/var/www/html/update/categories.php on line 1266

 

I searched the archives and found a post that seems related to this, I think the suggestion was to download (?) a new function list from sourceforge:

POST QUOTE:

The function is sitting in there. :shock:  

 

http://cvs.sourceforge.net/cgi-bin/viewcvs....viewcvs-markup

 

Do a search on:

 

tep_get_category_name

 

Ten to one you are searching for:

 

tep_get_category_name()

 

and that isn't going to work.

 

I'm not sure what to do here. I'm using the latest snapshot, so I'm not sure why I should have to change the function list, or if in fact I do. If so, do i copy and paste the one at sourceforge and use it to repalce the general.php file that is in the includes/functions dir???

 

TIA....Chris

Link to comment
Share on other sites

I have new functions that need to be added in to the code.

 

They include the missing function tep_get_categories_name

 

You need to find where you have left out an include or require statement that is not loading these functions.

Link to comment
Share on other sites

Most likely you are missing this part:

CHANGES TO /catalog/includes/application_top.php

 

application_top.php is included to show changes to the // Shopping cart actions section the whole section needs to be replaced

 

cart_actions.php contains the whole replacement to be made, exclude the <?php and ?>

 

NOTE: If you replace your application_top.php with mine, there are additional changes for other things that may or may not effect how your shop works.

 

You do want to add above the // Shopping cart actions line:

 

// BOF: WebMakers.com Added: Functions Library

   include(DIR_WS_FUNCTIONS . 'webmakers_added_functions.php');

// EOF: WebMakers.com Added: Functions Library

 

This will add new functions and new filename define statements and includes checking for Forced login and Down for Maintenance

Link to comment
Share on other sites

  • 1 month later...

Linda, I just used all of the files that came with (downloaded yesterday from your site) and I have the same problem.

 

I used all of your files.

// BOF: WebMakers.com Added: Functions Library  

include(DIR_WS_FUNCTIONS . 'webmakers_added_functions.php');  

// EOF: WebMakers.com Added: Functions Library

exists just where it should and 'webmakers_added_functions.php' is in the functions folder.

 

Around line 410 of 'webmakers_added_functions.php' is:

// WebMakers.com Added: Find a Categories Name

// TABLES: categories_description

 function tep_get_categories_name($who_am_i) {

   global $languages_id;

   $the_categories_name_query= tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id= '" . $who_am_i . "' and language_id= '" . $languages_id . "'");



   $the_categories_name = tep_db_fetch_array($the_categories_name_query);

   return $the_categories_name['categories_name'];

 }

so it does exist and could be found if the include was in the right place.

 

Do you think that this line needs to also be in the categories.php?

include(DIR_WS_FUNCTIONS . 'webmakers_added_functions.php');

Link to comment
Share on other sites

Do you think that this line needs to also be in the categories.php?
include(DIR_WS_FUNCTIONS . 'webmakers_added_functions.php');

No that didn't do it. That just gave me more errors.
Warning: main(DIR_WS_FUNCTIONSwebmakers_added_functions.php) [function.main]: failed to create stream: No such file or directory in /home/neenerne/public_html/goodies/admincrap/categories.php on line 14

 

Warning: main() [function.main]: Failed opening 'DIR_WS_FUNCTIONSwebmakers_added_functions.php' for inclusion (include_path='') in /home/myhost/public_html/catalog/admin/categories.php on line 14

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/myhost/public_html/catalog/admin/categories.php:14) in /home/myhost/public_html/catalog/admin/includes/functions/sessions.php on line 67

and that's on top of the original error message. :roll:

 

I notice that there's no space or anything in 'DIR_WS_FUNCTIONSwebmakers_added_functions.php' . Think that's an indication of the problem?

Link to comment
Share on other sites

Similar to

Fatal error: Call to undefined function: tep_get_categories_name() in /home/virtual/site60/fst/var/www/html/update/categories.php on line 1266
except with my host info
Link to comment
Share on other sites

Make sure you have added to the /admin/includes/application_top.php

CHANGES TO /admin/includes/application_top.php

 

Add to the bottom of the file just before the ?> :

 

// BOF: WebMakers.com Added: Functions Library

   include(DIR_WS_FUNCTIONS . 'webmakers_added_functions.php');

// EOF: WebMakers.com Added: Functions Library

 

 

This will add additional functions and additional filename definitions

Link to comment
Share on other sites

Okay, my bad.

 

I thought that if I just FTP'd all of your files over that I would be done.

 

I don't think the /admin/includes/application_top.php file was included in your package. Neither was /admin/includes/languages/english.php

 

Once I got that done things are pretty good. Not perfect yet but much better.

 

One of my Main categories is listed as #23 and I see that you say

Hide a Category is not meant to be used for long term. It is just a quick design to hide a category and its products while creating a product. These hidden products are not hidden everywhere yet, so use this with a grain of salt and be quick :) This hidden category does need to be defined or one of the categories will be hidden. This is presently set to 23
in the readme.txt file.

 

How do I change that so it's visible? Is there a screen somewhere to change that? What number do I change it to that won't screw up some other category?

Link to comment
Share on other sites

BTW, in the bottom left corner I see:

Error!

 

Unable to determine connection method on a link!

 

Known methods: NONSSL SSL

What's that about?
Link to comment
Share on other sites

application_top.php is not included in the add-on.

 

But, the README file of instructions have several things you actually have to do yourself ... such as add the include/require files where indicated. :D

 

I'd have to do a search for it ... but there should be a setting for the categories_id of the Hidden category.

 

Off hand I forget which file. Most likely a search for '23' or "23" would find the file ... :wink:

Link to comment
Share on other sites

BTW, in the bottom left corner I see:
Error!

 

Unable to determine connection method on a link!

 

Known methods: NONSSL SSL

What's that about?

 

What snapshot did you load this into and which version of which add-on of mine are you using?

Link to comment
Share on other sites

application_top.php is not included in the add-on.

 

But, the README file of instructions have several things you actually have to do yourself ... such as add the include/require files where indicated. :D

Yeah, but since the first few were done by copying your files over I figured you had covered all of the bases. You might add a line to the readme.txt a line that says, "Even if you copy all of the files in this add-on onto your site, you will still need to edit the /admin/includes/application_top.php and /admin/includes/languages/english.php files as follows ... "

 

BTW, found the category 23 thing. It's in catalog/includes/categories_tab.php on line 85. I commented it out and my category is visible again as a tab on top. It still doesn't show up in the category scrollbox though. The subcats for the 2nd category appear to be subcats of the 1st category instead. Does that make sense what I said?

 

Still have the

Error!

 

Unable to determine connection method on a link!

 

Known methods: NONSSL SSL

in the bottom left corner :(
Link to comment
Share on other sites

What snapshot did you load this into and which version of which add-on of mine are you using?
tep-pr2.1.tar.gz is what I downloaded from OSC and QuantityControllerv5_1.zip from you.
Link to comment
Share on other sites

You do want to add above the // Shopping cart actions line:  

 

// BOF: WebMakers.com Added: Functions Library  

include(DIR_WS_FUNCTIONS . 'webmakers_added_functions.php');  

// EOF: WebMakers.com Added: Functions Library  

 

I kinda thought that putting the above in the README file was pretty straight forward that you had to do something other that copy the files ... :wink:

 

Look for a setting in the /includes/boxes/categories.php

 

// BOF: WebMakers.com Added: Hide a Category

if (HIDE_A_CATEGORY_ON=='1') {

 $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id . "' and c.categories_id !='" . $hide_category . "' order by sort_order, cd.categories_name");

} else {

 $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");

}

// EOF: WebMakers.com Added: Hide a Category

 

As to the other error, there must be a compatibility issue I would think between a couple files.

 

But I do not know your snapshot or what other add-ons you may have.

 

NOTE: this is NOT for MS1

Link to comment
Share on other sites

As to the other error, there must be a compatibility issue I would think between a couple files.

 

But I do not know your snapshot or what other add-ons you may have.

 

NOTE: this is NOT for MS1

That could be it right there cause I'm too ignorant to know what version I'm supposed to be running. :oops:

 

I haven't installed ANY other add on. Your's is the first :inlove:

Link to comment
Share on other sites

You do want to add above the // Shopping cart actions line:  

 

// BOF: WebMakers.com Added: Functions Library  

include(DIR_WS_FUNCTIONS . 'webmakers_added_functions.php');  

// EOF: WebMakers.com Added: Functions Library  

 

I kinda thought that putting the above in the README file was pretty straight forward that you had to do something other that copy the files ... :wink:

Well, yes and no. I went to a couple of files and saw that what you were telling me to do was already done by copying the files over.

 

So, of course my next thought was, "Looks like she's already taken care of all of this in the included files. Cool!" And I promptly stopped checking the rest of the files. As I said, my bad for not checking them all. Still that line I mentioned might solve some future issues. :D

Link to comment
Share on other sites

As to the other error, there must be a compatibility issue I would think between a couple files.

 

But I do not know your snapshot or what other add-ons you may have.

 

NOTE: this is NOT for MS1

That could be it right there cause I'm too ignorant to know what version I'm supposed to be running. :oops:

 

I haven't installed ANY other add on. Your's is the first :inlove:

 

I am afraid that is why you are having so much trouble ... :shock:

 

It's not made for MS1 ... it only works with snapshots through about the 2nd week of January.

 

I have a new add-on coming out as soon as I can possilby finish the darn thing ... Shoppe Enhancement Controller

 

This will have the Quantity Controller, Attributes Sorter and Copier, Free Call for Price and a number of other groovy toys to it as well.

 

I am in the process of cleaning up the code so it can be released. A time that I keep thinking is just a few hours away ... but then ... seems a few hours more than expected.

 

Good news ... it's coming soon to a computer near you! :D

Link to comment
Share on other sites

It's not made for MS1 ... it only works with snapshots through about the 2nd week of January.

 

I have a new add-on coming out as soon as I can possilby finish the darn thing ... Shoppe Enhancement Controller

You mean if I get tep_snapshot-20030415.zip then I'll still be hosed? :(

 

I read about your SEC. I understand about the finish lines that keep moving farther away. I hope you catch it soon.

Link to comment
Share on other sites

Yes ... afraid so.

 

But the new release will take care of that ... just keep your fingers ... toes, eyes and ears crossed that I can finish it soon ... like yesterday ... :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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