Jump to content

Adds an extra commentbox at checkout.


Recommended Posts

Name: extra_comments_box_at_checkout.zip

Version: 1.0

Author: Stijn Jammaers

Short Description: Adds an extra commentbox at checkout.

Long Description:

I needed a box where customers could tell me on wich day i must deliver the orders. So here's an extra message box. viewable in admin, in the frontend & in the email.

[Download File]

Link to comment
Share on other sites

  • 4 months later...

  • 4 months later...
  • 10 months later...

hi storage dump

try this mate

//*****************************************

// MOD SECOND CUSTOMERS COMMENTS BOX TEXT

//*****************************************

$la_mod2_order_cust_comments = "<b>commentsbox2 message"; (in order)

$la_mod2_your_comments_none = "commentsbox2 message "; (in order & invoice)

$la_mod2_cust_no_coms = "commentsbox2 message"; (in admin view orders no comments left)

$la_mod2_view_your_comments = "commentsbox 2 message"; (in customer view orders)

$la_mod2_view_cust_comms = "commentsbox2 message; (in order)

-----> special note :

do the same in the other language.inc.php files & translate all the words between " "

save your file

#################################################################

# STEP 1

#################################################################

ADD customer_comments2 COLUMN TO STORE_ORDER_SUM TABLE

(using phpmyadmin OR whatever you use to modify your database tables)

Field Name = customer_comments2

Field Type = text, mediumtext, or longtext (your choice)

Here's an example of the column insert code via phpmyadmin:

ALTER TABLE `store_order_sum` ADD `customer_comments2` LONGTEXT NOT NULL;

SAVE YOUR FILE

####################################

# STEP 2

####################################

OPEN

order.php

FIND

<tr>

<td valign=\"top\" align=\"right\">$la_order_cust_comments</td>

<td valign=\"top\" align=\"right\"><textarea name=\"customer_comments\" cols=\"30\" rows=\"3\" value=\"\"></textarea></td></td>

</tr>

ADD AFTER

<tr>

<td valign=\"top\" align=\"right\">$la_mod2_order_cust_comments</td>

<td valign=\"top\" align=\"right\"><textarea name=\"customer_comments2\" cols=\"30\" rows=\"1\" value=\"\"></textarea></td></td>

</tr>

SAVE YOUR FILE

####################################

# STEP 3

####################################

OPEN

secure.php

FIND

// todays time

$time = date("H:i");

$customer_comments = addslashes($customer_comments);

ADD AFTER

$customer_comments2 = addslashes($customer_comments2);

FIND

// BUILD ORDER SUMMARY IN DATABASE

$order_sum = mysql_query("insert into ".$prefix."store_order_sum set cart_order_id='$cart_order_id', name='$name', add_1='$add_1', add_2='$add_2', town='$town', county='$county', postcode='$postcode', country='$country', name_d='$name_d', add_1_d='$add_1_d', add_2_d='$add_2_d', town_d='$town_d', county_d='$county_d', postcode_d='$postcode_d', country_d='$country_d', phone='$phone', prod_total='$payable', total_tax='$pre_total_tax', total_ship='$total_ship', ip='$ip', date='$date', time='$time', email='$email', subtotal='$cart_total', gateway='$gateway', customer_comments='$customer_comments'");

AND ADD THE COMMENTS2 FIELD AT THE END OF THE INSERT STATEMENT LIKE SO:

$order_sum = mysql_query("insert into ".$prefix."store_order_sum set cart_order_id='$cart_order_id',.........customer_comments='$customer_comments',customer_comments2='$customer_comments2'");

SAVE YOUR FILE

####################################

# STEP 4

####################################

OPEN

view_order.php

FIND

$gateway=$row["gateway"];

ADD AFTER

$customer_comments2=$row["customer_comments2"];

$customer_comments2 = stripslashes($customer_comments2);

if(empty($customer_comments2))

{

$customer_comments2 = $la_mod2_your_comments_none;

}

FIND

<td><b>$la_view_orders_grand_tot</b></td>

<td width=\"100\"><b>$currency$prod_total</b></td>

<tr>

<td></td>

<td width=\"100\">---------------</td>

</tr>

</table>

</td>

</tr>

ADD AFTER

<tr>

<td bgcolor=\"$colour_1\" colspan=\"2\" align=\"left\" valign=\"top\"><b>$la_mod2_view_your_comments</b><br><br>\"$customer_comments2\"<br></td></tr>

SAVE YOUR FILE

####################################

# STEP 5

####################################

OPEN

admin/orders.php

FIND

$gateway=$row["gateway"];

ADD AFTER

$customer_comments2=$row["customer_comments2"];

$customer_comments2 = stripslashes($customer_comments2);

if(empty($customer_comments2)){

$customer_comments2 = $la_mod2_cust_no_coms;}

FIND

<tr>

<td><b>$la_view_orders_grand_tot</b></td>

<td width=\"100\"><b>$currency$prod_total</b></td>

<tr>

<td></td>

<td width=\"100\">---------------</td>

</tr>

</tr>

</table><br>

</td>

ADD AFTER

</tr>

<tr><td bgcolor=\"$colour_1\" colspan=\"2\" align=\"left\" valign=\"top\"><b>$la_mod2_view_cust_comms</b><br><br>\"$customer_comments2\"</td></tr>

SAVE YOUR FILE

####################################

# STEP 6

####################################

OPEN

confirmed.php

FIND (in the // get order summary information

$gateway=$row["gateway"];

ADD AFTER

$customer_comments2=$row["customer_comments2"];

$customer_comments2 = stripslashes($customer_comments2);

if(empty($customer_comments2))

{

$customer_comments2 = $la_mod2_your_comments_none;

}

FIND

$email_content .= "$la_view_cust_comms \"$customer_comments\"\n";

ADD AFTER

$email_content .= "$la_mod2_view_cust_comms \"$customer_comments2\"\n";

FIND (in the // // printable order form

$gateway=$row["gateway"];

ADD AFTER

$customer_comments2=$row["customer_comments2"];

$customer_comments2 = stripslashes($customer_comments2);

if(empty($customer_comments2))

{

$customer_comments2 = $la_mod2_your_comments_none;

}

FIND

<tr>

<td><b>$la_view_orders_grand_tot</b></td>

<td width=\"100\"><b>$currency$prod_total</b></td>

<tr>

<td></td>

<td width=\"100\">---------------</td>

</tr>

</table><br>

</td>

</tr>

ADD AFTER

<tr>

<td bgcolor=\"#ffffff\" colspan=\"2\" align=\"left\" valign=\"top\"><b>$la_mod2_view_your_comments</b><br><br>\"$customer_comments2\"</td></tr>

SAVE YOUR FILE

####################################

# STEP 7

####################################

upload the modified files and you have an extra message box !

hope this helps i will upload zip file proper 2nite.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...
Guest EverythingWeb

2 year old thread. resurrected. lovely.

ricx,

CC3 has a 'Notes' feature built in as standard and is on the payment choice page, so there is no mod required.

I am now closing this topic, as it really doesn't need to still be open.

Thanks.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...