e_piz Posted November 17, 2005 Posted November 17, 2005 i wanted to thank cczernia for writing and posting the documentationalso it seems that i forgotten two things these changes should resolve all outstanding issues 1-in checkout_confirmation.php i have not included the red line //extra questions start if (ASK_QUESTION == 'true') { $display_answer = 1; require('display_answer_after_order.php'); } //extra questions end hello, pause for a moment...i'm getting confused, in checkout_confirmation.php it was using this code is it: //extra questions start if (QUESTION_LOCATION == 'orders') require('display_answer_after_order.php'); //extra questions end but why it become: if (ASK_QUESTION == 'true') { $display_answer = 1; require('display_answer_after_order.php'); } //extra questions end in nana explanation...have i be missing something here?? plz help. which file must be rename? when i add: </tr><?php if (ASK_QUESTION == 'true') require('display_answer_box.php'); ?> what comes up is only FIRST_TITLE any suggestion? or if possible someone to explaned me step by step: what i have done is: add an extra question in customer create account.. and what i want is: to display the value/answer from the customer in /admin/customer.php thx for your support.. Quote
nana Posted November 17, 2005 Author Posted November 17, 2005 trying to solve two seperate problems i made a new file that i posted above to disply the result in the admin section just add the new file in the admin section and include it in the admin/invoice.php or admin/orders.php or admin/packingslip.php this will display the answers in the admin section of the shop also to display the answers in the checkout confirmation you must change if (ASK_QUESTION == 'true') require('display_answer_box.php'); to //extra questions start if (ASK_QUESTION == 'true') { $display_answer = 1; require('display_answer_after_order.php'); } //extra questions end this will display the answer in checkout confirmation it adds $display_answer = 1; this line was missing and it would not always show the answers there i hope i made it clear Quote
e_piz Posted November 17, 2005 Posted November 17, 2005 hey... i can't do it...i seem not to know where is my error...hope someone can help me with this. when i put: //extra questions start if (ASK_QUESTION == 'true') { $display_answer = 1; require('display_answer_after_order.php'); } //extra questions end to display the answer...what came out was only this :FIRST_TITLE what i understand is is able to fetch the title from : display_answer_after_order.php but i can't get it why it wont fetch the answer ... need help on this please.. can YM me at [email protected] thx a lot Quote
nana Posted November 17, 2005 Author Posted November 17, 2005 the questions are added individually in all files it is just repeats of the same code if you look in them you should be able to duplicate the codes for as many questions as you want Quote
kanderson Posted November 17, 2005 Posted November 17, 2005 I'm sure this isn't a problem with the Extra Questions contribution, since it seems to work great for everyone else, but I'm hoping you can help me with an issue I'm having. I followed the installation instructions, but I'm afraid I may not have dealt with the SQL database updates correctly. On the "Create Account" page, where my first question should appear, I get this error: HEADING_EXTRA_QUESTIONS 1146 - Table 'dan735_osc1.TABLE_QUESTIONS' doesn't exist select sources_id, sources_name from TABLE_QUESTIONS where question_number =1 order by sources_name [TEP STOP] There is a "questions" table listed in the top level of my SQL osc1 database -- is it in the wrong place? I'm a total n00b, so any help you can give would be appreciated! Thanks in advance. Quote
nana Posted November 17, 2005 Author Posted November 17, 2005 make sure you defined it database_tables.php in both admin/includes and catalog/includes //extra questions start define('TABLE_QUESTIONS', 'questions'); define('TABLE_ANSWERS', 'answers'); //extra questionst end Quote
Patty Posted November 21, 2005 Posted November 21, 2005 First of all, thanks for a great contribution! It's really handy. :thumbsup: You can pretty much stick this line: <?php if (ASK_QUESTION == 'true') require('display_answer_box.php'); ?> in admin to display the answers. It was made for orders, invoice and packing slip but it might work for customers. I imagine this would be useful if you are asking questions in create account. Unfortunatelly it's not that simple to include the answers in customers.php. I'm not a coder, so I don't know how to do that. Could any of you guys shed a light here and help with this issue? It would be very handy to have the answers showing on customers.php, since one can use that for important extra info, like drivers license, for instance. Thank you in advance. :) Quote Patty
Patty Posted November 21, 2005 Posted November 21, 2005 I'm also having the same problem as described below. Answers won't show on confirmation check out or after that on customer's account. The questions are there, but the answers are blank. This is only on the customer's side. Admin seems to be OK. Can somebody help, please??? Thanks! :) hey... i can't do it...i seem not to know where is my error...hope someone can help me with this. when i put: //extra questions start if (ASK_QUESTION == 'true') { $display_answer = 1; require('display_answer_after_order.php'); } //extra questions end to display the answer...what came out was only this :FIRST_TITLE what i understand is is able to fetch the title from : display_answer_after_order.php but i can't get it why it wont fetch the answer ... need help on this please.. can YM me at [email protected] thx a lot Quote Patty
cczernia Posted November 21, 2005 Posted November 21, 2005 First of all, thanks for a great contribution! It's really handy. :thumbsup: Unfortunatelly it's not that simple to include the answers in customers.php. I'm not a coder, so I don't know how to do that. Could any of you guys shed a light here and help with this issue? It would be very handy to have the answers showing on customers.php, since one can use that for important extra info, like drivers license, for instance. Thank you in advance. :) Ok, it seems to work in certain places. I replaced this: <?php if ($action == 'edit' || $action == 'update') { $newsletter_array = array(array('id' => '1', 'text' => ENTRY_NEWSLETTER_YES), array('id' => '0', 'text' => ENTRY_NEWSLETTER_NO)); ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> with this and it worked in customers.php: <?php if ($action == 'edit' || $action == 'update') { $newsletter_array = array(array('id' => '1', 'text' => ENTRY_NEWSLETTER_YES), array('id' => '0', 'text' => ENTRY_NEWSLETTER_NO)); ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td> <?php //extra questions start 11/04/05 if (ASK_QUESTION == 'true') require('display_answer_box.php'); //extra questions end 11/04/05 ?> </td> </tr> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> Quote Shade and Sweet Water Chris Czerniak
Patty Posted November 22, 2005 Posted November 22, 2005 Tks for such a quick reply! I'll try that. :thumbsup: I don't mean to be a pain in the neck, but how hard would it be to make them editable as well on customers.php? :blush: Quote Patty
nana Posted November 22, 2005 Author Posted November 22, 2005 patty i am not sure if that would work in customer.php i have to look at it i will post an answer for you in a day or two Quote
Patty Posted November 23, 2005 Posted November 23, 2005 (edited) Tks, Frank. :) Like in the confirmation check out, only the questions appear, not the answers. It works fine on orders, invoices and pack lists though. I think it would be a good idea to have them editable by admin on customers and also by the client on My account. Anyway, it's a great contribution. Thanks for sharing with us. :) Edited November 23, 2005 by Patty Quote Patty
nprzybilla Posted December 2, 2005 Posted December 2, 2005 Hi, the contribution was easy to install, but I have the problem that it do not saves the answers. I added the question into orders. The questions are shown correctly. Perhaps a hint where I cn search ? I get no errors. Best regards Niels Quote
nana Posted December 2, 2005 Author Posted December 2, 2005 make sure you have done the change to checkout_process.php that is where it is updated in the db if it is functioning in the orders Quote
Patty Posted December 7, 2005 Posted December 7, 2005 It's been asked before but I didn't find any answer: can the extra fields be shown on the confirmation e-mail?? Quote Patty
Patty Posted December 11, 2005 Posted December 11, 2005 Still waiting on a reply about showing the extra questions on the confirmation e-mail. Is it possible? How to do it? Tks for any clues. Quote Patty
nixx Posted December 13, 2005 Posted December 13, 2005 I'm having weird issues upon trying to install this contribution.. this is the error I'm seeing: (when I hit checkout_process.php) Fatal error: main(): Failed opening required 'email_box.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/domain.com/httpdocs/member/checkout_process.php on line 242 I've searched all over for an "email_box.php" .. but I don't seem to have this file.. and It wasn't included in the .ZIP ? Thanks! Quote
nana Posted December 14, 2005 Author Posted December 14, 2005 this is the code for email <?php if (QUESTION_LOCATION == 'orders'){$locID= $insert_id; }else{ $locID=$customers_id; } $extra_questions_query = tep_db_query("select first_answer,second_answer,third_answer, fourth_answer,fifth_answer from " . TABLE_ANSWERS . " where location_id = '" . $locID . "'and location='" .QUESTION_LOCATION . "'" ); $extra_questions = tep_db_fetch_array($extra_questions_query); if (DISPLAY_FIRST_QUESTION == 'true') { $email_order .= $extra_questions['first_answer'] . "\n"; } if (DISPLAY_SECOND_QUESTION == 'true') { $email_order .= $extra_questions['second_answer'] . "\n"; } if (DISPLAY_THIRD_QUESTION == 'true') { $email_order .= $extra_questions['third_answer'] . "\n"; } if (DISPLAY_FOURTH_QUESTION == 'true') { $email_order .= $extra_questions['fourth_answer'] . "\n"; } if (DISPLAY_FIFTH_QUESTION == 'true') { $email_order .= $extra_questions['fifth_answer'] . "\n"; } ?> i have been very busy but i have completed the boxes for updating the answers if it is in account i will post it as soon as i do a little testing Quote
Patty Posted December 18, 2005 Posted December 18, 2005 Thank you so much for the e-mail code, Frank! :thumbsup: Just a dumb question: where to place it??? :blush: Quote Patty
nana Posted December 18, 2005 Author Posted December 18, 2005 you can either make a new box and then include it anywhere in the email in checkout_process.php i would put it before $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . or just put the code right there Quote
Patty Posted December 18, 2005 Posted December 18, 2005 Thank you so much, Frank! I'll try that. ;) Quote Patty
lupole Posted December 19, 2005 Posted December 19, 2005 First of all, thanks for a great contribution! It's really handy. :thumbsup: Unfortunatelly it's not that simple to include the answers in customers.php. I'm not a coder, so I don't know how to do that. Could any of you guys shed a light here and help with this issue? It would be very handy to have the answers showing on customers.php, since one can use that for important extra info, like drivers license, for instance. Thank you in advance. :) Quote
lupole Posted December 19, 2005 Posted December 19, 2005 Patty, In admin/customers.php find this code: <?php if ($processed == true) { if ($cInfo->customers_newsletter == '1') { echo ENTRY_NEWSLETTER_YES; } else { echo ENTRY_NEWSLETTER_NO; } echo tep_draw_hidden_field('customers_newsletter'); } else { echo tep_draw_pull_down_menu('customers_newsletter', $newsletter_array, (($cInfo->customers_newsletter == '1') ? '1' : '0')); } ?></td> </tr> </table></td> </tr> Add this code after: <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="formAreaTitle"><?php echo Questions; ?></td> </tr> <tr> <td class="formArea"><table border="0" cellspacing="2" cellpadding="2"> <?php //extra questions start if (ASK_QUESTION == 'true') {$display_answer = 1; require('display_answer_box.php');} //extra questions end ?> </table> </tr> This should do it for you. Quote
Patty Posted December 19, 2005 Posted December 19, 2005 Thanks you so much! I'll try that. :thumbsup: Quote Patty
Guest Posted January 5, 2006 Posted January 5, 2006 Having some fun and learning with this one! Installed the version 1.5 of this contribution, added the following code (to line 20)as per the doccumentation to "packingslip.php" : //extra questions start if (ASK_QUESTION == 'true') require('display_answer_box.php'); //extra questions end when I run thru an order< I get the following error message on the packing slip: Warning: main(display_answer_box.php): failed to open stream: No such file or directory in /u/m/mymoka/www.missyoucanada.ca/admin/packingslip.php on line 120 Fatal error: main(): Failed opening required 'display_answer_box.php' (include_path='.:') in /u/m/mymoka/www.missyoucanada.ca/admin/packingslip.php on line 120 Any ideas as to what the problem could be? Any help would be appreciated! S McD Quote
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.
Note: Your post will require moderator approval before it will be visible.