♥geoffreywalton Posted December 30, 2007 Posted December 30, 2007 OK so we have a titles table holding 7 standard titles. When you place an order the 3 titles are populated with Mr Mrs etc not the codes. Now lets start on line 35, 1. Does it look like this? $order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); Need to get the title returned here, after replacing the variable fields, you can test it works in a sql tab in phpmyadmin. Change the order no I have used below to one created since the changes have been made. select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '1' Test this in phpmyadmin. 2. Did it work and give a result? As you can see none of the name titles are there. "orders added customers_title billing_title delivery_title" Lets start by getting customer title code retrieved by the sql and test it. Post this on an sql tab in phpmyadmin and run it. select customers_id, customers_title, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '1' 3. Does it show the extra field? Yes - Add in the other 2 fields and test it. 4. Are all the titles shown in the results? Yes - update your order.php. 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 ======>>>>>.
warrenerjm Posted December 30, 2007 Author Posted December 30, 2007 OK so we have a titles table holding 7 standard titles. When you place an order the 3 titles are populated with Mr Mrs etc not the codes. Now lets start on line 35, 1. Does it look like this? $order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); Need to get the title returned here, after replacing the variable fields, you can test it works in a sql tab in phpmyadmin. Change the order no I have used below to one created since the changes have been made. select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '1' Test this in phpmyadmin. 2. Did it work and give a result? As you can see none of the name titles are there. "orders added customers_title billing_title delivery_title" Lets start by getting customer title code retrieved by the sql and test it. Post this on an sql tab in phpmyadmin and run it. select customers_id, customers_title, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '1' 3. Does it show the extra field? Yes - Add in the other 2 fields and test it. 4. Are all the titles shown in the results? Yes - update your order.php. :huh: You have completely lost me now! You sound like you are working this through, or answering your own questions :lol: ps VERY nervous of sql So what files do you think I need to amend please? full path please as I've already proven that I get confused >_< Julie :thumbsup:
♥geoffreywalton Posted December 30, 2007 Posted December 30, 2007 Yes, you are right, this is a step by step approach. Look at your copy of orders.php, at line 35, then follow the steps outlined. Hopefully as you do so, you will learn a few things, e.g. how to run sql commands. Nothing will go wrong unless you start clicking on buttons with the word delete, drop or empty on them. (you can paste sql into sql boxes and run them but if you stick to select commands it will be OK. If at any stage the answer to one of the questions is No then something is not quite right and with a bit of hacking we should get back on track. Right at the end if each one works then you can update orders.php, of which you have a backup copy. So even if it goes wrong you can restore it. 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 ======>>>>>.
warrenerjm Posted December 30, 2007 Author Posted December 30, 2007 Yes, you are right, this is a step by step approach. Look at your copy of orders.php, at line 35, then follow the steps outlined. OK this is from catalog/includes/classes/orders.php but I thought you originally said catalog/admin/includes/classes/orders.php ? Which one am I working on please? :D
♥geoffreywalton Posted December 31, 2007 Posted December 31, 2007 Whoops, I used the code you posted rather than admin/include/classes Line 27 $order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); So follow these steps if it doesn't work or any answer is no, we will need to do a little work 1. Do you have a titles table holding 7 standard titles. 2. When you place an order the 3 titles are populated with Mr Mrs etc not the codes. Now lets start on line 27, 3. Does it look like this? $order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); We need to get the title returned here, so after replacing the variable fields, you can test it works in a sql tab in phpmyadmin. Change the order no I have used below to one created since the changes have been made. select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '1' Test this in phpmyadmin by pasting it into the box that appears when you select sql. 4. Did it work and give a result? As you can see none of the name titles are there. "orders added customers_title billing_title delivery_title" Lets start by getting customer title code retrieved by the sql and test it. Post this on an sql tab in phpmyadmin and run it. select customers_title, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '1' 5. Does it show the extra field? Yes - Now you can do some work and add in the other 2 fields and test it. 6. Are all the titles shown in the results? Yes - update your order.php. 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 ======>>>>>.
warrenerjm Posted December 31, 2007 Author Posted December 31, 2007 Whoops, I used the code you posted rather than admin/include/classes Line 27 $order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); So follow these steps if it doesn't work or any answer is no, we will need to do a little work 1. Do you have a titles table holding 7 standard titles. 2. When you place an order the 3 titles are populated with Mr Mrs etc not the codes. Now lets start on line 27, 3. Does it look like this? $order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); We need to get the title returned here, so after replacing the variable fields, you can test it works in a sql tab in phpmyadmin. Change the order no I have used below to one created since the changes have been made. select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '1' Test this in phpmyadmin by pasting it into the box that appears when you select sql. 4. Did it work and give a result? As you can see none of the name titles are there. "orders added customers_title billing_title delivery_title" Lets start by getting customer title code retrieved by the sql and test it. Post this on an sql tab in phpmyadmin and run it. select customers_title, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '1' 5. Does it show the extra field? Yes - Now you can do some work and add in the other 2 fields and test it. 6. Are all the titles shown in the results? Yes - update your order.php. :D :D :D :D :thumbsup: You have been so patient & guess what it worked! I have learnt abit about the database as you said. Thank you. Now I have a title on the invoice too. :thumbsup: As you solved it, do you want to update the contribution? This was the only line that needed updating, as I haven't touched any other files such as the general.php Thanks once again Julie
♥geoffreywalton Posted December 31, 2007 Posted December 31, 2007 No the honour is down to you, I just wrote 15 odd tips, and some of them were very odd, to help get you there. Feel free to mention my name, lazy aren't I? Isn't much more satisfying to work it through, than for someone to go "add this code there"? No - don't answer that because sometimes that's all you want. Good thing the titles are held as text not codes or you would have been delving into the murky world of left joins. Here's hoping sql doesn't hold so many fears for you and if I spot any interesting outfits tonight I'll keep you informed. Have a Happy New Year 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 ======>>>>>.
warrenerjm Posted December 31, 2007 Author Posted December 31, 2007 No the honour is down to you, I just wrote 15 odd tips, and some of them were very odd, to help get you there. Feel free to mention my name, lazy aren't I? Isn't much more satisfying to work it through, than for someone to go "add this code there"? No - don't answer that because sometimes that's all you want. Good thing the titles are held as text not codes or you would have been delving into the murky world of left joins. Here's hoping sql doesn't hold so many fears for you and if I spot any interesting outfits tonight I'll keep you informed. Have a Happy New Year :blink: Ok two firsts in one day! murky world of left joins :huh: Happy New Year...Enjoy ;)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.