View Single Post
  #2  
Old 01-04-2005, 03:49 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

heres the one that I did in 4.0.9


skin1/customer/main/send_to_friend.tpl

Code:
{* $Id: send_to_friend.tpl,v 1.6.2.2 2004/12/10 13:14:52 max Exp $ *} {* SHAN - MSG FIELD ADDED *} <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|replace:'"':'\"'}", false); requiredFields[1] = new Array('send_from', "{$lng.lbl_send_your_email|strip_tags|replace:'"':'\"'}", 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} <TABLE border="0"> <FORM action="product.php" method="post" name="send"> <INPUT type="hidden" name="mode" value="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> <TD class="FormButton" valign="top">Add A Message:</TD> <TD><FONT class="Star"></FONT></TD> <TD><textarea name="msg" id="msg" cols="40" rows="4"></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.tpl" title=$lng.lbl_send_to_friend content=$smarty.capture.dialog extra="width=100%"}


skin1/mail/html/sendtofriend.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"} {* SHAN - MSG FIELD ADDED *} {$name} {$lng.eml_has_recommended}: {$product.product} - {$lng.lbl_price}: {include file="currency.tpl" value=$product.taxed_price} {$product.descr} {$lng.eml_please_click_link} {if $msg} {$name} also added a message for you ...... {$msg} {/if}="{$catalogs.customer}/product.php?productid={$product.productid}">{$catalogs.customer}/product.php?productid={$product.productid}</A> {include file="mail/html/signature.tpl"}

send_to_friend.php

Code:
# # $Id: send_to_friend.php,v 1.1.2.1 2004/10/14 06:15:50 max Exp $ # if ( !defined('XCART_START') ) { header("Location: home.php"); die("Access denied"); } if(!$productid) func_header_location ("error_message.php?access_denied&id=48"); if($mode == 'send') { if($email && $from && $name) { $mail_smarty->assign ("product", $product_info); $mail_smarty->assign ("name", $name); $mail_smarty->assign ("msg", $msg); func_send_mail ($email, "mail/send2friend_subj.tpl", "mail/send2friend.tpl", $from, false); $top_message["content"] = func_get_langvar_by_name("txt_recommendation_sent"); } else { $top_message["content"] = func_get_langvar_by_name("err_filling_form"); $top_message["type"] = "E"; } func_header_location("product.php?productid=".$productid); } ?>
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote