♥yesudo Posted February 13, 2004 Share Posted February 13, 2004 THE SECOND FUNCTION BELOW IS NOT BEING RECOGNISED - error message function not defined - anyone know what I am doing wrong or if i need to edit another file? THANX. BACKGROUND: I am adding a new field to the customer create account process asking them where they heard about us and they can choose from a list of options. FIRST FUNCTION CALL: - file create_account.php <?php echo tep_get_source_list('source') . ' ' . (tep_not_null(ENTRY_SOURCE_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_TEXT . '</span>': ''); ?> FIRST FUNCTION DEFINITION AND SECOND FUNCTION CALL: - file includes/functions/html_output.php //// // Creates a pull-down list of customer_sources function tep_get_source_list($name, $selected = '', $parameters = '') { $sources_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $sources = tep_get_sources(); for ($i=0, $n=sizeof($sources); $i<$n; $i++) { $sources_array[] = array('id' => $sources[$i]['source_id'], 'text' => $sources[$i]['source_name']); } return tep_draw_pull_down_menu($name, $sources_array, $selected, $parameters); } SECOND FUNCTION DEFINITION:file includes/functions/general.php //// // Returns an array with source // TABLES: customer_source function tep_get_sources($source_id='') { $sources_array = array(); if (tep_not_null($source_id)) { $sources = tep_db_query("select source_name from " . TABLE_CUSTOMER_SOURCE . " where source_id = '" . (int)$source_id . "'"); $sources = tep_db_fetch_array($sources); $sources_array = array('source_name' => $sources_values['source_name']); } else { $sources = tep_db_query("select source_id, source_name from " . TABLE_CUSTOMER_SOURCE . " order by source_name"); while ($sources_values = tep_db_fetch_array($sources)) { $sources_array[] = array('source_id' => $sources_values['source_id'], 'source_name' => $sources_values['source_name']); } } return $sources_array; } Your online success is Paramount. Link to comment Share on other sites More sharing options...
♥yesudo Posted February 16, 2004 Author Share Posted February 16, 2004 Hello - apologies for bringing this up again but is there really no one who knows the answer to this? It is bound to be something simple I am doing wrong but need a fresh pair of eyes/braincells :D to assist. Your online success is Paramount. Link to comment Share on other sites More sharing options...
♥yesudo Posted February 19, 2004 Author Share Posted February 19, 2004 anyone......................................please help me Your online success is Paramount. Link to comment Share on other sites More sharing options...
ptrau Posted February 19, 2004 Share Posted February 19, 2004 I am trying to do the same thing: my post I hope someone can figure this out for the both of us. I know I have seen this request many times. Hopefully, the work we have already done will make it easier for the pros to give us feedback rather than them having to start from scratch. I had the same function call errors which is why I took a different approach (out of sheer ignorance) "Aliiiiive, it's alive, it's ALIIIIIIIIIIIIIVE!!!" Link to comment Share on other sites More sharing options...
bloodshoteyes Posted February 19, 2004 Share Posted February 19, 2004 You might try breaking the function off the same line as the Commented Tables: From //// // Returns an array with source // TABLES: customer_source function tep_get_sources($source_id='') { To //// // Returns an array with source // TABLES: customer_source function tep_get_sources($source_id='') { for starters Mike Link to comment Share on other sites More sharing options...
♥yesudo Posted February 19, 2004 Author Share Posted February 19, 2004 You might try breaking the function off the same line as the Commented Tables:From //// // Returns an array with source // TABLES: customer_source function tep_get_sources($source_id='') { To //// // Returns an array with source // TABLES: customer_source function tep_get_sources($source_id='') { for starters Mike Mike......................IS A STAR. Your online success is Paramount. Link to comment Share on other sites More sharing options...
ptrau Posted February 19, 2004 Share Posted February 19, 2004 did it work???? "Aliiiiive, it's alive, it's ALIIIIIIIIIIIIIVE!!!" Link to comment Share on other sites More sharing options...
♥yesudo Posted February 19, 2004 Author Share Posted February 19, 2004 did it work???? yep - checkout: http://www.yesudo.com/test/create_account.php this draws the dropdown list from a table - is this what you need/want? Your online success is Paramount. Link to comment Share on other sites More sharing options...
ptrau Posted February 19, 2004 Share Posted February 19, 2004 yes....can you please post the code/instructions...that is AWESOME UDAMAN "Aliiiiive, it's alive, it's ALIIIIIIIIIIIIIVE!!!" Link to comment Share on other sites More sharing options...
♥yesudo Posted February 19, 2004 Author Share Posted February 19, 2004 pm'd you Paul Your online success is Paramount. Link to comment Share on other sites More sharing options...
♥yesudo Posted February 19, 2004 Author Share Posted February 19, 2004 Just to kink into other thread: http://www.oscommerce.com/forums/index.php?sho...=0entry312789 Your online success is Paramount. Link to comment Share on other sites More sharing options...
Guest Posted February 19, 2004 Share Posted February 19, 2004 Please, I am searching for this contribution for a long time. is it possible that you post the things what to do to make it? Link to comment Share on other sites More sharing options...
ptrau Posted February 19, 2004 Share Posted February 19, 2004 thank you........ "Aliiiiive, it's alive, it's ALIIIIIIIIIIIIIVE!!!" Link to comment Share on other sites More sharing options...
Guest Posted February 19, 2004 Share Posted February 19, 2004 Please, I am searching for this contribution for a long time. is it possible that you post the things what to do to make it? Can you post it to me also? Link to comment Share on other sites More sharing options...
♥yesudo Posted February 19, 2004 Author Share Posted February 19, 2004 Please, I am searching for this contribution for a long time. is it possible that you post the things what to do to make it? Can you post it to me also? no probs - will be available tomorrow. Your online success is Paramount. Link to comment Share on other sites More sharing options...
♥yesudo Posted February 20, 2004 Author Share Posted February 20, 2004 Released: http://www.oscommerce.com/community/contributions,1888 Example can be seen here: http://www.yesudo.com/create_account.php Your online success is Paramount. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.