Snowy_River Posted December 3, 2008 Share Posted December 3, 2008 Hello, This may seem like quite a novice question, and if so I apologize. However, how is one to learn if one doesn't ask, right? So, the first thing that the install instructions say is "Run the file install.sql" (which I think should be "install_first.sql"). I'm afraid I don't quite know what to do here. My website is hosted and had an automated setup process for osC. I can access my site through FTP and cPanel X web based control panel. I'm really not sure where I need to go and what I need to do to run this file. The rest seems fairly straight forward, but this step seems to be eluding me. Quote Link to comment Share on other sites More sharing options...
crapu Posted January 6, 2009 Share Posted January 6, 2009 Hello! Please tell me for what version of Oscommerce is this contribution? I am using Oscommerce 2.2 MS2. Will I have any problems if I install it? Thank you very much. Manu Quote Link to comment Share on other sites More sharing options...
Snowy_River Posted January 8, 2009 Share Posted January 8, 2009 Hello, This may seem like quite a novice question, and if so I apologize. However, how is one to learn if one doesn't ask, right? So, the first thing that the install instructions say is "Run the file install.sql" (which I think should be "install_first.sql"). I'm afraid I don't quite know what to do here. My website is hosted and had an automated setup process for osC. I can access my site through FTP and cPanel X web based control panel. I'm really not sure where I need to go and what I need to do to run this file. The rest seems fairly straight forward, but this step seems to be eluding me. Well, after waiting a month and not receiving any reply, I did some searching on the 'net and found my own answer. I'll post it here in case there's anyone else out there who needs this little kick start: The *.sql file is a text file with SQL statements to be executed by the mysql server. You can run it through a tool like phpMyAdmin - just open a query window there and copy and paste the content of that text file in there. phpMyAdmin and possibly other frontends will also allow to upload a *.sql file through the web browser. In phpMyAdmin click on the SQL tab. Quote Link to comment Share on other sites More sharing options...
Snowy_River Posted January 8, 2009 Share Posted January 8, 2009 (edited) Okay, so I now have a new problem. I got everything installed just fine. I was able to add new fields, and it all worked great, until... Oops. I solved my problem. I had placed a line in the wrong spot during install. I was able to catch it, though. Now, here's another issue, though. This one is only cosmetic, but all of the fields seem to have a capital E with a circumflex over them. Like this: Ê Not sure where to look to fix this. Any thoughts? Oh, and by the way, Manu, I'm using osC 2.2 RC2, and it works fine. So, I'd guess that you should be fine, too. Edited January 8, 2009 by Snowy_River Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 8, 2009 Share Posted January 8, 2009 I'd have thought you would have learnt your lesson and used googe to research your problem. Otherwise you could be waiting for another month. Took me 2 minutes to find this link http://www.oscommerce.com/forums/lofiversion/i...php?t43860.html Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
jwhysleep Posted January 27, 2009 Share Posted January 27, 2009 (edited) Trying to get this to be mandatory before going to the next shep added this on checkout_shipping i have tried all that I can. im able to post the field <?php echo tep_get_extra_fields($cInfo->customers_id,$languages_id)?> shows up and in the top i added //START Customers Extra Field if ($error == true) $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ if(strlen($HTTP_POST_VARS['fields_' . $extra_fields['fields_id']])<$extra_fields['fields_size']){ $error = true; $string_error=sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']); $messageStack->add('checkout_shipping', $string_error); } } $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ if(strlen($HTTP_POST_VARS['fields_' . $extra_fields['fields_id']])<$extra_fields['fields_size']){ $error = true; $string_error=sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']); $messageStack->add('create_account', $string_error); } } $extra_fields_query = tep_db_query("select ce.fields_id from " . TABLE_EXTRA_FIELDS . " ce where ce.fields_status=1 "); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ $sql_data_array = array('customers_id' => $customer_id, 'fields_id' => $extra_fields['fields_id'], 'value' => $HTTP_POST_VARS['fields_' . $extra_fields['fields_id']]); tep_db_perform(TABLE_CUSTOMERS_TO_EXTRA_FIELDS, $sql_data_array); } tep_db_query("delete from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id=" . $customer_id); $extra_fields_query = tep_db_query("select ce.fields_id from " . TABLE_EXTRA_FIELDS . " ce where ce.fields_status=1 "); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ $sql_data_array = array('customers_id' => $customer_id, 'fields_id' => $extra_fields['fields_id'], 'value' => $HTTP_POST_VARS['fields_' . $extra_fields['fields_id']]); tep_db_perform(TABLE_CUSTOMERS_TO_EXTRA_FIELDS, $sql_data_array); } //END Customers Extra Field added require('includes/form_check.js.php'); but still when i click continue without entering anything into the field it goes to the next step im stuck any advice would be very helpful!!! Edited January 27, 2009 by jwhysleep Quote Link to comment Share on other sites More sharing options...
jwhysleep Posted February 1, 2009 Share Posted February 1, 2009 (edited) Ok I figured it out first time coder on oscommerce .now got the mandatory to work in Checkout_shipping>> catalog/checkout_shipping add code: ////////////////////////////// // needs to be included earlier to set the success message in the messageStack require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT); $process = false; if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) { $process = true; $error = false; } $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ if(strlen($HTTP_POST_VARS['fields_' . $extra_fields['fields_id']])<$extra_fields['fields_size']){ $error = true; $string_error=sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']); $messageStack->add('create_account', $string_error); } } if ($error == false) { tep_db_perform(TABLE_CUSTOMERS, $sql_data_array); $customer_id = tep_db_insert_id(); $extra_fields_query = tep_db_query("select ce.fields_id from " . TABLE_EXTRA_FIELDS . " ce where ce.fields_status=1 "); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ $sql_data_array = array('customers_id' => $customer_id, 'fields_id' => $extra_fields['fields_id'], 'value' => $HTTP_POST_VARS['fields_' . $extra_fields['fields_id']]); tep_db_perform(TABLE_CUSTOMERS_TO_EXTRA_FIELDS, $sql_data_array); } tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'"); tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())"); if (SESSION_RECREATE == 'True') { tep_session_recreate(); } // restore cart contents $cart->restore_contents(); // build the message content $name = $firstname . ' ' . $lastname; if (ACCOUNT_GENDER == 'true') { if ($gender == 'm') { $email_text = sprintf(EMAIL_GREET_MR, $lastname); } else { $email_text = sprintf(EMAIL_GREET_MS, $lastname); } } else { $email_text = sprintf(EMAIL_GREET_NONE, $firstname); } $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING; tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } Find: <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> Above this add: //START Customers Extra Field tep_db_query("delete from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id=" . $customer_id); $extra_fields_query = tep_db_query("select ce.fields_id from " . TABLE_EXTRA_FIELDS . " ce where ce.fields_status=1 "); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ $sql_data_array = array('customers_id' => $customer_id, 'fields_id' => $extra_fields['fields_id'], 'value' => $HTTP_POST_VARS['fields_' . $extra_fields['fields_id']]); tep_db_perform(TABLE_CUSTOMERS_TO_EXTRA_FIELDS, $sql_data_array); } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING); $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); ?> Find <!-- body_text //--> Compare this code to get it to return to the next step in the shopping cart <td width="100%" valign="top"><?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> FILENAME_CHECKOUT_PAYMENT this is where i want it to direct after i put in the required field thanks mabe an advanced coder can clean up or rewrite better! Edited February 1, 2009 by jwhysleep Quote Link to comment Share on other sites More sharing options...
jwhysleep Posted February 1, 2009 Share Posted February 1, 2009 also comment out on the next page // if no shipping method has been selected, redirect the customer to the shipping method selection page //if (!tep_session_is_registered('shipping')) { // tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); // } if not wont let you go to the next step Quote Link to comment Share on other sites More sharing options...
corywiley Posted February 6, 2009 Share Posted February 6, 2009 Hello, I have tried installing this twice and luckily im still setting up my store and it wasnt a HUGE deal to wipe out everything and do a fresh install after both installation tries did not work correctly. Can anyone please save a package of the files that you have to change and send them to me? The instructions are really hard for me to understand for some reason and cant get this installed even though I really need it. Quote Link to comment Share on other sites More sharing options...
corywiley Posted February 7, 2009 Share Posted February 7, 2009 I installed package as instructed, I have SPPC installed and I had to guess were certain lines would be added instead but when I go into the "tools" menu to create seperate fields and click on it, the page is blank. No errors, just a blank page. I uploaded the extra_fields_manager file(s) in the correct locations but they will just not "show". Any help here? Quote Link to comment Share on other sites More sharing options...
Snowy_River Posted February 7, 2009 Share Posted February 7, 2009 I'd have thought you would have learnt your lesson and used googe to research your problem. Otherwise you could be waiting for another month. Took me 2 minutes to find this link http://www.oscommerce.com/forums/lofiversion/i...php?t43860.html 1. Thank you. The suggestion in that link (together with some searching through the code with invisibles turned on) did the trick. 2. You don't need to be snide. I did try to research my problem using google, and I spent a fair bit more than 2 minutes looking and didn't come up with anything like the link you provided. That you hit on the right keywords to search for so quickly doesn't mean that I didn't try. Quote Link to comment Share on other sites More sharing options...
mdtdesign Posted February 9, 2009 Share Posted February 9, 2009 I installed this contribution and all works fine EXCEPT when I go to the Admin/Customers.php and try to update a customers info - I hit Update and nothing happens -it still stays on the page. Does any one have any idea how to fix this? I have look thru the entire forum and can't find an answer. HELP if you can? Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted February 18, 2009 Share Posted February 18, 2009 Hi allI have problem with Customer extra filelds 4. In catalog/includes/form_check.js.php check_password_new("password_current", "password_new", "password_confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo ENTRY_PASSWORD_ERROR; ?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR; ?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING; ?>"); add after <?php $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ $string_error=sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']);?> check_input("<?php echo 'fields_' . $extra_fields['fields_id']?>", <?php echo $extra_fields['fields_id']-1;?>, "<?php echo $string_error; ?>"); <? }?> But when I try create my account, I have this error Parse error: syntax error, unexpected $end in c:\*\*\www\catalog\includes\form_check.js.php on line 140 I admin area all works great ... I have the same error. I found a previous post saying to change $string_error=sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']);?> check_input("<?php echo 'fields_' . $extra_fields['fields_id']?>", <?php echo $extra_fields['fields_id']-1;?>, "<?php echo $string_error; ?>"); <? }?> BY $string_error=sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']);?> check_input("<?php echo 'fields_' . $extra_fields['fields_id']?>", <?php echo $extra_fields['fields_<u>size</u>']-1;?>, "<?php echo $string_error; ?>"); <? }?> But I have the same error. Does any body may post this part of the code he uses with no problem so I could find what's wrong . NB : I dowloaded the customers_extra_fields_EXTENDED, start with install_first.html (with no known problem) then I followed Instrictuction of English Install Update . Ther I couldn't do this instruction : #### FIND #### 'fields_size' => $fields_size); #### REPLACE WITH #### 'fields_size' => $fields_size, 'fields_required_email' => $fields_required_email); Because I was not able to find 'fields_size' => $fields_size in extrafields.php Should I write it anyway and where. PS : using osCommerce Online Merchant v2.2 RC1 W3C Valid FR (on a brand new installation) Quote Link to comment Share on other sites More sharing options...
Guest Posted February 18, 2009 Share Posted February 18, 2009 I have the same error. I finaly could install the contrib after many installations and finding answers to each issue I got. Thanks a lot for this contrib. Quote Link to comment Share on other sites More sharing options...
jacven Posted February 24, 2009 Share Posted February 24, 2009 I also would like to know if these extra fields will show up on the invoice/packing slip/preview pages. I need things like year/make/model on each order. Can anybody shed some light?? Thanks in advance Jeff anyone please? Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted February 24, 2009 Share Posted February 24, 2009 (edited) 1. Thank you. The suggestion in that link (together with some searching through the code with invisibles turned on) did the trick.2. You don't need to be snide. I did try to research my problem using google, and I spent a fair bit more than 2 minutes looking and didn't come up with anything like the link you provided. That you hit on the right keywords to search for so quickly doesn't mean that I didn't try. Sorry, should have put a smiley face in there so here is one now. :-) Here is my secret search method site:forum.oscommerce.com "geoffrey is great" Unfortunately you have to replace "geoffrey is great" with something relevant to your problem. Edited February 24, 2009 by geoffreywalton Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted February 24, 2009 Share Posted February 24, 2009 anyone please? Unless you amend the code to make it appear it will not appear. This could be done as part of the contribution otherwise you will need to code it up. Find the code to create the documents you are interested in. Then use the sql added to the customer account screens to get the data and then add it to the document layouts. Are you sure you should not be using product extra fields contribution? Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
dummy_2 Posted February 26, 2009 Share Posted February 26, 2009 Hi all, I've installed this contri and it's working perfect (RC2.2). BUT.... I've installed "admin create account" too and I can't get the extra fields working in this contri. I think I need to change the admin/includes/modules/account_details.php and I tried to copy stuff from create_account.php but that's not working correctly... the input field i made is shown and I don't have errors, but when I save the new customer, the new field is not saved... Can anyone help me to fix this please? Here is the account_details.php code: the "// start Customers Extra Fields // end Customers Extra Fields" are copied from create_account.php but not on the right spot I guess and the file is completely different... <?php /* $Id: account_details.php,v 1 2003/08/24 23:22:27 frankl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License Admin Create Account */ $newsletter_array = array(array('id' => '1', 'text' => ENTRY_NEWSLETTER_YES), array('id' => '0', 'text' => ENTRY_NEWSLETTER_NO)); function sbs_get_zone_name($country_id, $zone_id) { $zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . $country_id . "' and zone_id = '" . $zone_id . "'"); if (tep_db_num_rows($zone_query)) { $zone = tep_db_fetch_array($zone_query); return $zone['zone_name']; } else { return $default_zone; } } // Returns an array with countries // TABLES: countries function sbs_get_countries($countries_id = '', $with_iso_codes = false) { $countries_array = array(); if ($countries_id) { if ($with_iso_codes) { $countries = tep_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . $countries_id . "' order by countries_name"); $countries_values = tep_db_fetch_array($countries); $countries_array = array('countries_name' => $countries_values['countries_name'], 'countries_iso_code_2' => $countries_values['countries_iso_code_2'], 'countries_iso_code_3' => $countries_values['countries_iso_code_3']); } else { $countries = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . $countries_id . "'"); $countries_values = tep_db_fetch_array($countries); $countries_array = array('countries_name' => $countries_values['countries_name']); } } else { $countries = tep_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " order by countries_name"); while ($countries_values = tep_db_fetch_array($countries)) { $countries_array[] = array('countries_id' => $countries_values['countries_id'], 'countries_name' => $countries_values['countries_name']); } } return $countries_array; } //// function sbs_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries = sbs_get_countries(); $size = sizeof($countries); for ($i=0; $i<$size; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } // start Customers Extra Fields $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where ce.fields_status=1 and ce.fields_required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id =" . $languages_id); while($extra_fields = tep_db_fetch_array($extra_fields_query)){ if(strlen($HTTP_POST_VARS['fields_' . $extra_fields['fields_id']])<$extra_fields['fields_size']){ $error = true; $string_error=sprintf(ENTRY_EXTRA_FIELDS_ERROR,$extra_fields['fields_name'],$extra_fields['fields_size']); $messageStack->add('create_account', $string_error); } } // end Customers Extra Fields // start Customers Extra Fields $customers_id = (int)$customer_id; $extra_fields_query = tep_db_query("select ce.fields_id from " . TABLE_EXTRA_FIELDS . " ce where ce.fields_status=1 "); while($extra_fields = tep_db_fetch_array($extra_fields_query)) { if(isset($HTTP_POST_VARS['fields_' . $extra_fields['fields_id']])){ $sql_data_array = array('customers_id' => (int)$customers_id, 'fields_id' => $extra_fields['fields_id'], 'value' => $HTTP_POST_VARS['fields_' . $extra_fields['fields_id']]); } else { $sql_data_array = array('customers_id' => (int)$customers_id, 'fields_id' => $extra_fields['fields_id']); } } // end Customers Extra Fields //// // Alias function to tep_get_countries, which also returns the countries iso codes /* function tep_get_countries_with_iso_codes($countries_id) { return tep_get_countries($countries_id, true); }*/ ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="formAreaTitle"><?php echo CATEGORY_PERSONAL; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <?php if (ACCOUNT_GENDER == 'true') { $male = ($account['customers_gender'] == 'm') ? true : false; $female = ($account['customers_gender'] == 'f') ? true : false; ?> <tr> <td class="main"> <?php echo ENTRY_GENDER; ?></td> <td class="main"> <?php if ($is_read_only) { echo ($account['customers_gender'] == 'm') ? MALE : FEMALE; } elseif ($error) { if ($entry_gender_error) { echo tep_draw_radio_field('gender', 'm', $male) . ' ' . MALE . ' ' . tep_draw_radio_field('gender', 'f', $female) . ' ' . FEMALE . ' ' . ENTRY_GENDER_ERROR; } else { echo ($gender == 'm') ? MALE : FEMALE; echo tep_draw_hidden_field('gender'); } } else { echo tep_draw_radio_field('gender', 'm', $male) . ' ' . MALE . ' ' . tep_draw_radio_field('gender', 'f', $female) . ' ' . FEMALE . ' '; } ?></td> </tr> <?php } ?> <tr> <td class="main"> <?php echo ENTRY_FIRST_NAME; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['customers_firstname']; } elseif ($error) { if ($entry_firstname_error) { echo tep_draw_input_field('firstname') . ' ' . ENTRY_FIRST_NAME_ERROR; } else { echo $firstname . tep_draw_hidden_field('firstname'); } } else { echo tep_draw_input_field('firstname', $account['customers_firstname']) . ' '; } ?></td> </tr> <tr> <td class="main"> <?php echo ENTRY_LAST_NAME; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['customers_lastname']; } elseif ($error) { if ($entry_lastname_error) { echo tep_draw_input_field('lastname') . ' ' . ENTRY_LAST_NAME_ERROR; } else { echo $lastname . tep_draw_hidden_field('lastname'); } } else { echo tep_draw_input_field('lastname', $account['customers_lastname']) . ' '; } ?></td> </tr> <?php if (ACCOUNT_DOB == 'true') { ?> <tr> <td class="main"> <?php echo ENTRY_DATE_OF_BIRTH; ?></td> <td class="main"> <?php if ($is_read_only) { echo tep_date_short($account['customers_dob']); } elseif ($error) { if ($entry_date_of_birth_error) { echo tep_draw_input_field('dob') . ' ' . ENTRY_DATE_OF_BIRTH_ERROR; } else { echo $dob . tep_draw_hidden_field('dob'); } } else { echo tep_draw_input_field('dob', tep_date_short($account['customers_dob'])) . ' '; } ?></td> </tr> <?php } ?> <tr> <td class="main"> <?php echo ENTRY_EMAIL_ADDRESS; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['customers_email_address']; } elseif ($error) { if ($entry_email_address_error) { echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR; } elseif ($entry_email_address_check_error) { echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR; } elseif ($entry_email_address_exists) { echo tep_draw_input_field('email_address') . ' ' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS; } else { echo $email_address . tep_draw_hidden_field('email_address'); } } else { echo tep_draw_input_field('email_address', $account['customers_email_address']) . ' '; } ?></td></tr> </table></td> </tr> </table></td> </tr> <?php if (ACCOUNT_COMPANY == 'true') { ?> <tr> <td class="formAreaTitle"><br><?php echo CATEGORY_COMPANY; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo ENTRY_COMPANY; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['entry_company']; } elseif ($error) { if ($entry_company_error) { echo tep_draw_input_field('company') . ' ' . ENTRY_COMPANY_ERROR; } else { echo $company . tep_draw_hidden_field('company'); } } else { echo tep_draw_input_field('company', $account['entry_company']) . ' '; } ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } ?> <tr> <td class="formAreaTitle"><br><?php echo CATEGORY_ADDRESS; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo ENTRY_STREET_ADDRESS; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['entry_street_address']; } elseif ($error) { if ($entry_street_address_error) { echo tep_draw_input_field('street_address') . ' ' . ENTRY_STREET_ADDRESS_ERROR; } else { echo $street_address . tep_draw_hidden_field('street_address'); } } else { echo tep_draw_input_field('street_address', $account['entry_street_address']) . ' '; } ?></td> </tr> <?php if (ACCOUNT_SUBURB == 'true') { ?> <tr> <td class="main"> <?php echo ENTRY_SUBURB; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['entry_suburb']; } elseif ($error) { if ($entry_suburb_error) { echo tep_draw_input_field('suburb') . ' ' . ENTRY_SUBURB_ERROR; } else { echo $suburb . tep_draw_hidden_field('suburb'); } } else { echo tep_draw_input_field('suburb', $account['entry_suburb']) . ' '; } ?></td> </tr> <?php } ?> <tr> <td class="main"> <?php echo ENTRY_POST_CODE; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['entry_postcode']; } elseif ($error) { if ($entry_post_code_error) { echo tep_draw_input_field('postcode') . ' ' . ENTRY_POST_CODE_ERROR; } else { echo $postcode . tep_draw_hidden_field('postcode'); } } else { echo tep_draw_input_field('postcode', $account['entry_postcode']) . ' '; } ?></td> </tr> <tr> <td class="main"> <?php echo ENTRY_CITY; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['entry_city']; } elseif ($error) { if ($entry_city_error) { echo tep_draw_input_field('city') . ' ' . ENTRY_CITY_ERROR; } else { echo $city . tep_draw_hidden_field('city'); } } else { echo tep_draw_input_field('city', $account['entry_city']) . ' '; } ?></td> </tr> <?php if (ACCOUNT_STATE == 'true') { ?> <tr> <td class="main"> <?php echo ENTRY_STATE; ?></td> <td class="main"> <?php $state = sbs_get_zone_name($country, $zone_id); if ($is_read_only) { echo sbs_get_zone_name($account['entry_country_id'], $account['entry_zone_id']); } elseif ($error) { if ($entry_state_error) { if ($entry_state_has_zones) { $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($country) . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('state', $zones_array) . ' ' . ENTRY_STATE_ERROR; } else { echo tep_draw_input_field('state') . ' ' . ENTRY_STATE_ERROR; } } else { echo $state . tep_draw_hidden_field('zone_id') . tep_draw_hidden_field('state'); } } else { echo tep_draw_input_field('state', sbs_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state'])) . ' '; } ?></td> </tr> <?php } ?> <tr> <td class="main"> <?php echo ENTRY_COUNTRY; ?></td> <td class="main"> <?php $account['entry_country_id'] = STORE_COUNTRY; if ($is_read_only) { echo tep_get_country_name($account['entry_country_id']); } elseif ($error) { if ($entry_country_error) { echo sbs_get_country_list('country') . ' ' . ENTRY_COUNTRY_ERROR; } else { echo tep_get_country_name($country) . tep_draw_hidden_field('country'); } } else { echo sbs_get_country_list('country', $account['entry_country_id']) . ' '; } ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td class="formAreaTitle"><br><?php echo CATEGORY_CONTACT; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo ENTRY_TELEPHONE_NUMBER; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['customers_telephone']; } elseif ($error) { if ($entry_telephone_error) { echo tep_draw_input_field('telephone') . ' ' . ENTRY_TELEPHONE_NUMBER_ERROR; } else { echo $telephone . tep_draw_hidden_field('telephone'); } } else { echo tep_draw_input_field('telephone', $account['customers_telephone']) . ' '; } ?></td> </tr> <tr> <td class="main"> <?php echo ENTRY_FAX_NUMBER; ?></td> <td class="main"> <?php if ($is_read_only) { echo $account['customers_fax']; } elseif ($processed) { echo $fax . tep_draw_hidden_field('fax'); } else { echo tep_draw_input_field('fax', $account['customers_fax']) . ' '; } ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td class="formAreaTitle"><br><?php echo CATEGORY_OPTIONS; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo ENTRY_NEWSLETTER; ?></td> <td class="main"> <?php if ($is_read_only) { if ($account['customers_newsletter'] == '1') { echo ENTRY_NEWSLETTER_YES; } else { echo ENTRY_NEWSLETTER_NO; } } elseif ($processed) { if ($newsletter == '1') { echo ENTRY_NEWSLETTER_YES; } else { echo ENTRY_NEWSLETTER_NO; } echo tep_draw_hidden_field('newsletter'); } else { echo tep_draw_pull_down_menu('newsletter', $newsletter_array, $account['customers_newsletter']) . ' '; } ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php/* <?php if (!$is_read_only) { ?> <tr> <td class="formAreaTitle"><br><?php echo CATEGORY_PASSWORD; ?></td> </tr> <tr> <td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea"> <tr> <td class="main"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <?php echo ENTRY_PASSWORD; ?></td> <td class="main"> <?php if ($error) { if ($entry_password_error) { echo tep_draw_password_field('password') . ' ' . ENTRY_PASSWORD_ERROR; } else { echo PASSWORD_HIDDEN . tep_draw_hidden_field('password') . tep_draw_hidden_field('confirmation'); } } else { echo tep_draw_password_field('password') . ' ' . ENTRY_PASSWORD_TEXT; } ?></td> </tr> <?php if ( (!$error) || ($entry_password_error) ) { ?> <tr> <td class="main"> <?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td> <td class="main"> <?php echo tep_draw_password_field('confirmation') . ' ' . ENTRY_PASSWORD_CONFIRMATION_TEXT; ?></td> </tr> <?php } ?> </table></td> </tr> </table></td> </tr> */ ?> <?php // } ?> </table> Best regards, Petra Quote Link to comment Share on other sites More sharing options...
jacven Posted February 26, 2009 Share Posted February 26, 2009 Hello, great contribution, has anyone made work an extra field to show in invoice.php at the administrator? I have added code in this forum, but nothing happens. Thanks in advanced. Quote Link to comment Share on other sites More sharing options...
smalto Posted March 6, 2009 Share Posted March 6, 2009 Hello everybody, This is a terrific contribution and I would like to know if someone can help me in a language matter. The contrib allows to insert the Field Name in different language in the admin but not the drop down values or radio buttons. Does someone know how to make those values sensitive to the different languages ? Thanks a lot, smalto Quote oscommerce 2.2 ms1 with contrib - lilibikini.com - 2005 Link to comment Share on other sites More sharing options...
rhenderson Posted April 3, 2009 Share Posted April 3, 2009 Hi, I have read all 11 pages of the posts here and have seen the question asked several times but have not seen an answer. <?php echo tep_get_extra_fields($cInfo->customers_id,$languages_id)?> But that just displays the entry box, not the data. We need to display the results of the extra_fields i.e. display the data the customer entered into the extra_fields on our order page. Quote Link to comment Share on other sites More sharing options...
fmurga Posted April 15, 2009 Share Posted April 15, 2009 Hello, great contribution, has anyone made work an extra field to show in invoice.php at the administrator? I have added code in this forum, but nothing happens. Thanks in advanced. If you take your time and read carefully, you will find the answer. Take a good look to all posts made in this thread. I have them showing up in the Invoice and Packing Slip.... Read my friend, read carefully and be patient. Quote Link to comment Share on other sites More sharing options...
fmurga Posted April 15, 2009 Share Posted April 15, 2009 Hi, I have read all 11 pages of the posts here and have seen the question asked several times but have not seen an answer. <?php echo tep_get_extra_fields($cInfo->customers_id,$languages_id)?> But that just displays the entry box, not the data. We need to display the results of the extra_fields i.e. display the data the customer entered into the extra_fields on our order page. Ok, here we go. Start reading from here: http://www.oscommerce.com/forums/index.php?s=&...st&p=982750 Then you have to burn some grey matter to adapt it... No big deal actually. Hope it helps you and jacven. Quote Link to comment Share on other sites More sharing options...
fmurga Posted April 15, 2009 Share Posted April 15, 2009 Ok I figured it out first time coder on oscommerce .now got the mandatory to work in Checkout_shipping>> Could you please be more specific as to where you added the first piece of code in the quoted post? I think I missed something. Quote Link to comment Share on other sites More sharing options...
rhenderson Posted April 16, 2009 Share Posted April 16, 2009 Ok, here we go. Start reading from here: http://www.oscommerce.com/forums/index.php?s=&...st&p=982750 Then you have to burn some grey matter to adapt it... No big deal actually. Hope it helps you and jacven. Yes, I actually got it before you posted, but thanks anyway. I just had to read it more than once to wrap myself around it. 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.