Guest Posted May 19, 2003 Posted May 19, 2003 Hi, I'm a newbie and trying to add telephone number and company to the delivery address. I have searched the forum, and found lots of great posts, so by now I have added these fields to 'php myadmin' (address book table and orders table), and also modifed the address_book files and some of the checkout files. The good news is that these new fields are now stored in the address book records, so I have half of it done! But now, I just can't seem to get these new fields to appear in the delivery address, even though I THINK I added these fields in every every file that references the other address fields that are already displayed, and I have even modified some of the less obvious files (to me), such as general.php and orders.php. I don't get any errors, but the fields still don't display. Perhaps I need to do something with the address format in the orders table, but I don't have a clue how that works. Does anyone have any suggestions? (And sorry if I am overlooking some other posts - I really did do a lot of searching!) Thanks
Silencer Posted May 19, 2003 Posted May 19, 2003 Standart OSC is already use Company field in all adresses, or i miss something? There is always more than one way to do it. And always Keep It Simple, Stupid.
Guest Posted May 19, 2003 Posted May 19, 2003 You are right -- delivery_company was already in the orders table. And company may have been in the address book at the begininning, but it originally wasn't displaying -- now it is. But I still can't get company (or phone number, which is a bigger problem) to show up in the actual delivery address during checkout. Do you know how I can get these fields to show up in the delivery address? Thank you!
Silencer Posted May 19, 2003 Posted May 19, 2003 Sorry for asking, but have you enable "Company' field in 'Admin - Configuartion - Customer Details'? There is always more than one way to do it. And always Keep It Simple, Stupid.
Guest Posted May 20, 2003 Posted May 20, 2003 Thanks for asking! I am not sure what you mean, though. In the admin panel > configuration, I don't see an option for 'customer details.' (In the Min values section, company and telephone do have min values set.) In the file structure, under 'admin' the configuration.php doesn't seem to have 'customer details either' -- but your question got me checking all the files in admin and I made sure that company and telephone were added everywhere the other address fields were, in all the files (as needed). It took a while...but I still can't change the delivery address! Do you know anything about delivery_address_format_id? Such as, what is it? How does it get changed? Thanks!
Silencer Posted May 21, 2003 Posted May 21, 2003 It's weird, default osc installation have a "Customer Details" in admin menu (between Images and Shipping/Packaging). May be you disable it by accident? 'format_address_id' refers to table address_format table, which define different adress writing rules for diferrent countries (function tep_address_format use it). Don't know where to get description how to records in this table define address format, but really it's self-explained: $firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country $firstname and $lastname - forms full name $cr - mean 'new string' $streets - is street + suburb (if suburb not empty) $cr - new string again all other variables are selfexplained, except $statecomma - state field plus comma (,) So, you can redefine address format as you need, but you can't just add new field - you need rewrite tep_address_format function. Sorry if i can't describe all this clearly but i just woke up :) There is always more than one way to do it. And always Keep It Simple, Stupid.
Guest Posted May 21, 2003 Posted May 21, 2003 Thank you - your info was very helpful! I now fixed the address_format in the address_format table (value 2 for the US). So now phone number and company are showing up in delivery addresses that are selected from the Address Book. :D But if the delivery address is the customer, phone number still doesn't display - very odd! :? I have gone through the files so many times, trying to see what's wrong with the customer address, but I still can't figure it out! I will keep trying. (In my orders_table, I have fields for customers_address_format_id and delivery_address_format_id -- but I can't figure out where they are defined.) I definitely don't have a Customer Details listing in the admin panel. I didn't install this myself, and I can't seem to find where it could have been disabled. Again, I'll keep searching! Thanks again.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.