X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Adding an extra field within 'Send to a Friend' Form (https://forum.x-cart.com/showthread.php?t=29002)

chamberinternet 02-19-2007 02:04 AM

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


All times are GMT -8. The time now is 06:23 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.