ianric Posted February 10, 2007 Share Posted February 10, 2007 Hi I noticed this after I installed the FEC contrib and I posted in there but I now think it's this contrib that is wrong so apologies for the double post. When I am logged in I can't type in the name and email address boxes but I can in the big enquiry box but I can type in all boxes when I am logged out I have viewed the source of the page and the entry boxes are set to readonly. If the customer is logged in it should prefill the name and email boxes and set them to readonly. That bit is right it just isn't displaying the name and email. The code in the contact us choice contrib is <tr> <td class="main"><?php // prefill first+last name and email address if customer is logged in if (tep_session_is_registered('customer_id')) { $customer_query_raw = "select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id='" . $customer_id . "'"; $customer_query = tep_db_query($customer_query_raw); $customer_array = tep_db_fetch_array($customer_query); echo $customer_array['customers_firstname'] . " " . $customer_array['customers_lastname']; echo $customer_array['customers_email_address']; echo tep_draw_input_field('name', $customer_array['customers_firstname'] . " " . $customer_array['customers_lastname'],'readonly'); echo "</td></tr><tr><td class=\"main\">" . ENTRY_EMAIL . "</td></tr><tr><td class=\"main\">"; echo tep_draw_input_field('email', $customer_array['customers_email_address'],'readonly'); } else { echo tep_draw_input_field('name'); echo "</td></tr><tr><td class=\"main\">" . ENTRY_EMAIL . "</td></tr><tr><td class=\"main\">"; echo tep_draw_input_field('email'); } ?></td> </tr> I have added the bits in red as a test and they are the correct values. I just need them to be in the Name and Email addy boxes. Hope someone can help me Many thanks Ian Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2007 Share Posted February 11, 2007 echo tep_draw_input_field('name', $customer_array['customers_firstname'] . " " . $customer_array['customers_lastname'],'readonly'); remove the readonly comment and it will work. Hi I noticed this after I installed the FEC contrib and I posted in there but I now think it's this contrib that is wrong so apologies for the double post. When I am logged in I can't type in the name and email address boxes but I can in the big enquiry box but I can type in all boxes when I am logged out I have viewed the source of the page and the entry boxes are set to readonly. If the customer is logged in it should prefill the name and email boxes and set them to readonly. That bit is right it just isn't displaying the name and email. The code in the contact us choice contrib is <tr> <td class="main"><?php // prefill first+last name and email address if customer is logged in if (tep_session_is_registered('customer_id')) { $customer_query_raw = "select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id='" . $customer_id . "'"; $customer_query = tep_db_query($customer_query_raw); $customer_array = tep_db_fetch_array($customer_query); echo $customer_array['customers_firstname'] . " " . $customer_array['customers_lastname']; echo $customer_array['customers_email_address']; echo tep_draw_input_field('name', $customer_array['customers_firstname'] . " " . $customer_array['customers_lastname'],'readonly'); echo "</td></tr><tr><td class=\"main\">" . ENTRY_EMAIL . "</td></tr><tr><td class=\"main\">"; echo tep_draw_input_field('email', $customer_array['customers_email_address'],'readonly'); } else { echo tep_draw_input_field('name'); echo "</td></tr><tr><td class=\"main\">" . ENTRY_EMAIL . "</td></tr><tr><td class=\"main\">"; echo tep_draw_input_field('email'); } ?></td> </tr> I have added the bits in red as a test and they are the correct values. I just need them to be in the Name and Email addy boxes. Hope someone can help me Many thanks Ian Link to comment Share on other sites More sharing options...
ianric Posted February 12, 2007 Author Share Posted February 12, 2007 echo tep_draw_input_field('name', $customer_array['customers_firstname'] . " " . $customer_array['customers_lastname'],'readonly'); remove the readonly comment and it will work. Hi Thanks for the reply. That did work but the name and email of the person who is logged in is supposed to show in the boxes and it's this bit that doesn't work. I think that is why it's readonly when you are logged in. Ian Link to comment Share on other sites More sharing options...
ianric Posted February 19, 2007 Author Share Posted February 19, 2007 Hi Thanks for the reply. That did work but the name and email of the person who is logged in is supposed to show in the boxes and it's this bit that doesn't work. I think that is why it's readonly when you are logged in. Ian Hi again Just a little bump. I'd really appreciate some help on this. I have added the code in red above and it is displaying the name and email of my logged in test customer so that bit is correct. What the contrib should do is display the name and email in the input boxes which are then set to readonly. I just can't get them in the boxes and I've tried all weekend. :'( I have now discovered it has nothing to do with the FEC contrib :blush: so please ignore that bit. Hope someone can help TIA Ian Link to comment Share on other sites More sharing options...
ianric Posted February 23, 2007 Author Share Posted February 23, 2007 Hi again Just a little bump. I'd really appreciate some help on this. I have added the code in red above and it is displaying the name and email of my logged in test customer so that bit is correct. What the contrib should do is display the name and email in the input boxes which are then set to readonly. I just can't get them in the boxes and I've tried all weekend. :'( I have now discovered it has nothing to do with the FEC contrib :blush: so please ignore that bit. Hope someone can help TIA Ian Hi again just thought I'd let everyone know that I have solved it. I had the same prob (boxes not filled in) on the edit account page so I created a test account on the OSC demo page just to check and the boxes were filled in. Anyway, after a bit of digging I overwrote my html_output.php file with the default and all is OK. Thanks Ian Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.