Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Adding an extra field within 'Send to a Friend' Form

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 02-19-2007, 02:04 AM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,470
 

Default Adding an extra field within 'Send to a Friend' Form

Hello ...

Not sure if this has been already posted within the forum ...

My client wanted an extra field adding to the 'Send to a Friend' form. (In this case it was Recepients Name)

The way i got around it was as follows (This is for version 4.1.5, should be ok for other 4.1.x installations)

1) Added an extra Lang Variable - lbl_recepients_name = Recepients Name

2) Open /skin1/customer/main/send_to_friend.tpl and as in the extra field like below:

Quote:
<td class="FormButton">{$lng.lbl_recepients_name}:</td>
<td><input id="recepients_name" type="text" size="45" name="recepients_name" value="{$send_to_friend_info.recepients_name|escap e}"/></td>

3) Open /send_to_friend.php and make the following addtions...

- Search for: $mail_smarty->assign ("name", $name); and add the following line after it: $mail_smarty->assign ("recepients_name", $recepients_name);

- Search for: $send_to_friend_info['name'] = $name; and add the following line after it: $send_to_friend_info['recepients_name'] = $recepients_name;

4) Open /skin1/mail/html/send2friend.tpl (or /skin1/mail/send2friend.tpl for text based emails) and include {$recepients_name} after {$lng.eml_hello}

Thats it.

Hope this helps...

Regards

Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:52 PM.

   

 
X-Cart forums © 2001-2020