Jump to content
Sign in to follow this  
nana

beta release extra questions

Recommended Posts

i wanted to thank cczernia for writing and posting the documentation

also 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..

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 e_piz@yahoo.com

 

thx a lot

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

:)


Patty

Share this post


Link to post
Share on other sites

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 e_piz@yahoo.com

 

thx a lot


Patty

Share this post


Link to post
Share on other sites
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>


Shade and Sweet Water

Chris Czerniak

Share this post


Link to post
Share on other sites

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:


Patty

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 by Patty

Patty

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

It's been asked before but I didn't find any answer: can the extra fields be shown on the confirmation e-mail??


Patty

Share this post


Link to post
Share on other sites

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.


Patty

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thank you so much for the e-mail code, Frank! :thumbsup:

Just a dumb question: where to place it??? :blush:


Patty

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

:)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×