View Single Post
  #1  
Old 01-04-2005, 11:25 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default Adding a message text area to tell-a-friend...

I'm trying to add a text area into tell-a-friend, where the customer can
write a message for the person which receives the email.
Without any luck, by the way...

I'm looking for something simular like this:
http://www.cartmods.com/product.php?productid=94

I copied the messagebox from the contact-us form into the tell-a-friend form. I did the same for the email template.
The tell-a-friend form looks fine and seems to work also. But in the email that has been send out, the message part is missing...

Here are the 2 template's i "modified".
customer/main/send_to_friend.tpl
Code:
{* $Id: send_to_friend.tpl,v 1.6 2004/06/24 06:04:34 max Exp $ *} <SCRIPT type="text/javascript" language="JavaScript 1.2"> var requiredFields = new Array(); requiredFields[0] = new Array('send_name', '{$lng.lbl_send_your_name|strip_tags}', false); requiredFields[1] = new Array('send_from', '{$lng.lbl_send_your_email|strip_tags}', false); requiredFields[2] = new Array('send_to', '{$lng.lbl_sent_recipient_email|strip_tags|replace:"'":"\'"}', false); </SCRIPT> {include file="check_required_fields_js.tpl"} {include file="check_email_script.tpl"} {capture name=dialog} <font face="Verdana" color="#5D5D5D" style="font-size: 8pt">Wilt u iemand anders attent maken op bovenstaand artikel? Vul onderstaand formulier in en deze persoon krijgt via een mailtje dit artikel te zien. Leuk om een ander op de hoogte te brengen van de (aanbiedingen en nieuwe) artikelen van Leukstewinkel.nl! U heeft ook nog de mogelijkheid om een persoonlijke boodschap te vermelden. </font> </p> <TABLE border="0"> <FORM action="product.php?mode=send" method="post" name="send"> <INPUT type="hidden" name="productid" value="{$product.productid}"> <TR> <TD class="FormButton">{$lng.lbl_send_your_name}:</TD> <TD><FONT class="Star">*</FONT></TD> <TD><INPUT id="send_name" type="text" size="45" name="name"></TD> </TR> <TR> <TD class="FormButton">{$lng.lbl_send_your_email}:</TD> <TD><FONT class="Star">*</FONT></TD> <TD><INPUT id="send_from" type="text" size="45" name="from" onchange="javascript: checkEmailAddress(this);"></TD> </TR> <TR> <TD class="FormButton">{$lng.lbl_sent_recipient_email}:</TD> <TD><FONT class="Star">*</FONT></TD> <TD><INPUT id="send_to" type="text" size="45" name="email" onchange="javascript: checkEmailAddress(this);"></TD> </TR> <TR valign="middle"> <TD class="FormButton" valign="top">{$lng.lbl_message}:</TD> <TD></TD> <TD nowrap> <TEXTAREA cols="44" rows="8" name="body">{$contact.body}</TEXTAREA> </TD> </TR> <TR> <TD colspan="3"> {include file="buttons/button.tpl" style="button" button_title=$lng.lbl_send_to_friend href="javascript: if(checkRequired('')) document.send.submit();"}</TD> </TR> </FORM> </TABLE> {/capture} {include file="dialog_new.tpl" title=$lng.lbl_send_to_friend content=$smarty.capture.dialog extra="width=100%"}

mail/html/send2friend.tpl
Code:
{* $Id: send2friend.tpl,v 1.2.2.1 2004/10/21 07:51:07 max Exp $ *} {config_load file="$skin_config"} {include file="mail/html/mail_header.tpl"} {$lng.lbl_hello} {$name} {$lng.eml_has_recommended}: {$lng.lbl_message}:{$contact.body} {$product.product} <HR> {$product.descr} {$lng.lbl_price}: {include file="currency.tpl" value=$product.taxed_price} {$lng.eml_please_click_link}: {$catalogs.customer}/product.php?productid={$product.productid} {include file="mail/html/signature.tpl"}

I'm sure i'm doing something stupid, therefore i hope somebody
can point me in the right direction. And if possible; also show me how
to add a friend's name field into tell-a-friend.

Many, many thanks in advance!!
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote