Guest Posted August 25, 2006 Share Posted August 25, 2006 I'm having fun trying to convert the customer info fields to suit UK use. I've successfully added fields (eg. street_address_2) to the database with phpadmin, however I'm having a few problems with php sending and getting from the database. For instance, when trying to put the extra field into create_account.php, I've just duplicated the code... <tr> <td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td> <td class="main"><?php echo tep_draw_input_field('street_address') . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_STREET_ADDRESS2; ?></td> <td class="main"><?php echo tep_draw_input_field('street_address2') . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS2_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS2_TEXT . '</span>': ''); ?></td> </tr> When the field come up on the create account page, the text next to the street address reads "Street address" whilst the next one reads "STREET_ADDRESS2". I don't understand why duplicated echo codes produce different results. Can anyone help? Link to comment Share on other sites More sharing options...
brianstorm Posted August 25, 2006 Share Posted August 25, 2006 ENTRY_STREET_ADDRESS; is a placeholder which is defined in the languages folder... you'v created a new placholder without defining a corresponding entry in the languages folder.... search for ENTRY_STREET_ADDRESS in /includes/languages/english.php and the english folder in there and define your new placeholder.... creating extra fields also means altering the db plus a load of code which i would'nt recommend unless you really really weant to make life complictaed.... itis possible to chnage values dispplayed in admin --> configuration i think.... with ten thousand dollars we'll all be millionaires Link to comment Share on other sites More sharing options...
Guest Posted August 25, 2006 Share Posted August 25, 2006 ENTRY_STREET_ADDRESS; is a placeholder which is defined in the languages folder... you'v created a new placholder without defining a corresponding entry in the languages folder.... search for ENTRY_STREET_ADDRESS in /includes/languages/english.php and the english folder in there and define your new placeholder....creating extra fields also means altering the db plus a load of code which i would'nt recommend unless you really really weant to make life complictaed.... itis possible to chnage values dispplayed in admin --> configuration i think.... Perfect, lol. Now that makes a lot more sense! What I'm missing now is how the from writes to the database. I've created the extra field, and added all the php code to give me the extra field in all the various outputs, but when I've checked the database, the extra field I have created is empty. I assume that somewhere in 'create_account.php' there is a function I'm missing. Could you help me again please? Link to comment Share on other sites More sharing options...
♥Vger Posted August 25, 2006 Share Posted August 25, 2006 You're missing an awful lot. It's not just create_account, but account, account_edit, and the javascript validation for them. That's just the catalog side of things, because it also has to tie in with the admin files as well. And that's just off the top of my head - there are probably more that have to be edited. A much simpler way would have been to edit 'Suburb' in includes/languages/english.php and in admin/includes/languages/english.php to read 'Address Line 2:' If you don't understand how php and osCommerce work then you really need to rethink your initial plan. Vger Link to comment Share on other sites More sharing options...
Guest Posted August 26, 2006 Share Posted August 26, 2006 You're missing an awful lot. It's not just create_account, but account, account_edit, and the javascript validation for them. That's just the catalog side of things, because it also has to tie in with the admin files as well. And that's just off the top of my head - there are probably more that have to be edited. A much simpler way would have been to edit 'Suburb' in includes/languages/english.php and in admin/includes/languages/english.php to read 'Address Line 2:' If you don't understand how php and osCommerce work then you really need to rethink your initial plan. Vger I feel a little bit told off now... :blink: One of the reasosn I have done this is to learn how php and oscommerce works because I drew the short straw and am having to install oscommerce as my company's online shop, complete with credit card payments through secpay. As it is, it's way too Americanised for me to be happy letting our customers use it. I know I can buy off the shelf UK-modified versions of oscommerce, but I'll be buggered if I'm gong to pay hundreds of pounds for something when it's actually fun to sort out for myself. You know there's nothing like taking evrything to bits to teach you how something works. I've learnt more in the last few days than I have done in ages. I've got a list of the files that need modifying, and I know there are shortcuts, but this plan has really got me me and I want to carry it through. By the time I'm finished, I'll both really understand the software and also have something which others might find useful. So my question remains... lol. Where is the code which writes the customer information to the mysql database? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.