Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error: Call to undefined function: tep_customer greeting()


hro2u

Recommended Posts

Hi again and thank?s for your help.

 

I managed to recreate my cataloguestructure and can now manage the oscommerce configuration from my admin account (even though the admin interface in distorted).

 

However...When trying to put my index.php live on my website or trying to log in to the administration interface I get a distorted page with the following Fatal error message:

 

Fatal error: Call to undefined function: tep_customer greeting() in /data/members/paid/r/u/ruirui.se/htdocs/www/index.php on line 301

 

 

As far as I can understand the above error message refers to the line <td class="main"><?php echo tep_customer_greeting(); ?></td> BUT...I dont understand what generates it, what file or statement that might be missing?

 

Any ideas about what can be done to solve this problem?

 

 

 

Best Regards

 

Hans in Stockholm

Link to comment
Share on other sites

The tep_customer_greeting() function is defined in catalog/includes/functions/general.php from line 934.

 

In mine, it looks like this:

 

// Return a customer greeting
 function tep_customer_greeting() {
global $customer_id, $customer_first_name;

if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
  $greeting_string = sprintf(TEXT_GREETING_PERSONAL, tep_output_string_protected($customer_first_name), tep_href_link(FILENAME_PRODUCTS_NEW));
} else {
  $greeting_string = sprintf(TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}

return $greeting_string;
 }

 

Check to see if you have altered anything.

Link to comment
Share on other sites

Hi "spax"

 

Thank?s for answering this issue I addressed :-)

 

 

You know, I checked this perticular file that you mentioned...

 

My general.php looks totally different (?) This is both in my admin\includes folder and in the includes folder.

 

If I check in the fresh download of oscommerce that I have then - Yes - the file general.php had the content you suggest.

 

The question is - can I just copy back the default general.php to my site and expect it to work?

 

Greatful for your advise,

 

All the best,

 

Hans

 

 

 

The tep_customer_greeting() function is defined in catalog/includes/functions/general.php from line 934.

 

In mine, it looks like this:

 

// Return a customer greeting
 function tep_customer_greeting() {
global $customer_id, $customer_first_name;

if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
  $greeting_string = sprintf(TEXT_GREETING_PERSONAL, tep_output_string_protected($customer_first_name), tep_href_link(FILENAME_PRODUCTS_NEW));
} else {
  $greeting_string = sprintf(TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}

return $greeting_string;
 }

 

Check to see if you have altered anything.

Link to comment
Share on other sites

I'm not too sure what your problem is. You say you have recreated the catalog structure, does that mean you have been changing the code in any way?

You also say when you downloaded the current version of OSC, the missing funtion was there. Does that mean you have an older version running and you have tried a hard code update?

Is the application you have on your server one you have uploaded or is it one installed by your host?

 

If you uploaded it, maybe some of the files have been corrupted when you FTP'd them to your remote server. In that case, it would probably be better to start again.

You could insert the function tep_customer_greeting() into general.php and see if that solves your problem. Although that said, if some files are corrupt, you will hit more problems further on down the line.

 

If you haven't gone far down the road of design, uploading the latest version might be the best way to go.

 

Sorry if this isn't very helpful, but if you elaborate on your problem, people here, better qualified than me, will be able to help more.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...