gaspower Posted March 5, 2008 Share Posted March 5, 2008 Hello, I get this error: Fatal error: Call to undefined function tep_get_sources() in /home/virtual/site3/fst/var/www/html/create_account.php on line 508 After installing the code in create_account.php <!-- //rmh referral start --> <?php if ((tep_not_null(tep_get_sources()) || DISPLAY_REFERRAL_OTHER == 'true') && (!tep_session_is_registered('referral_id') || (tep_session_is_registered('referral_id') && DISPLAY_REFERRAL_SOURCE == 'true')) ) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><b><?php echo CATEGORY_SOURCE; ?></b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" cellspacing="2" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_SOURCE; ?></td> <td class="main"><?php echo tep_get_source_list('source', (DISPLAY_REFERRAL_OTHER == 'true' || (tep_session_is_registered('referral_id') && tep_not_null($referral_id)) ? true : false), (tep_session_is_registered('referral_id') && tep_not_null($referral_id)) ? '9999' : '') . ' ' . (tep_not_null(ENTRY_SOURCE_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_TEXT . '</span>': ''); ?></td> </tr> <?php if (DISPLAY_REFERRAL_OTHER == 'true' || (tep_session_is_registered('referral_id') && tep_not_null($referral_id))) { ?> <tr> <td class="main"><?php echo ENTRY_SOURCE_OTHER; ?></td> <td class="main"><?php echo tep_draw_input_field('source_other', (tep_not_null($referral_id) ? $referral_id : '')) . ' ' . (tep_not_null(ENTRY_SOURCE_OTHER_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_OTHER_TEXT . '</span>': ''); ?></td> </tr> <?php } ?> </table></td> </tr> </table></td> </tr> <?php } else if (DISPLAY_REFERRAL_SOURCE == 'false') { echo tep_draw_hidden_field('source', ((tep_session_is_registered('referral_id') && tep_not_null($referral_id)) ? '9999' : '')) . tep_draw_hidden_field('source_other', (tep_not_null($referral_id) ? $referral_id : '')); } ?> <!-- //rmh referral end --> Right after the line: <td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td> </tr> </table></td> </tr> </table></td> </tr> Thanks JR Quote Link to comment Share on other sites More sharing options...
crash3903 Posted March 5, 2008 Share Posted March 5, 2008 (edited) Read the install instructions again - you have missed an edit probably in a functions file Probably this one in includes/functions/general.php ////rmh referral// Returns an array with sources // TABLES: sources function tep_get_sources($sources_id = '') { $sources_array = array(); if (tep_not_null($sources_id)) { $sources = tep_db_query("select sources_name from " . TABLE_SOURCES . " where sources_id = '" . (int)$sources_id . "'"); $sources_values = tep_db_fetch_array($sources); $sources_array = array('sources_name' => $sources_values['sources_name']); } else { $sources = tep_db_query("select sources_id, sources_name from " . TABLE_SOURCES . " order by sources_name"); while ($sources_values = tep_db_fetch_array($sources)) { $sources_array[] = array('sources_id' => $sources_values['sources_id'], 'sources_name' => $sources_values['sources_name']); } } return $sources_array; } Edited March 5, 2008 by crash3903 Quote Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
gaspower Posted March 5, 2008 Author Share Posted March 5, 2008 Thank you for the fast response, I will check. JR Quote 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.