X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add a field to "Send to Friend" (https://forum.x-cart.com/showthread.php?t=53335)

gita 04-18-2010 06:04 AM

Add a field to "Send to Friend"
 
Does anyone know how to add another field to "Send to Friend"?
In many online stores, you can add a personal message to the friend - perhaps telling why you think he/she might enjoy or be interested in that particular product.
My client would like to add "Add Personal Message" to the "send to a friend" but I have no idea how to start working on this.
Any help would be appreciated.

Thank you
Gita

TheWrongGrape 06-09-2010 05:15 PM

Re: Add a field to "Send to Friend"
 
Just did this for my site running 4.3.1

In send_to_friend.php, add this code around line 78 below $mail_smarty->assign ("product", $product_info);
Code:

$mail_smarty->assign ("msg", $msg);

In skin1/customer/main/send_to_friend.tpl add a new row before the row containing the submit button:
Code:

    <tr>
      <td class="data-name"><label for="msg">Optional Message</label>:</td>
      <td></td>
      <td>
        <textarea id="msg" type="textarea" name="msg" /></textarea>
      </td>
    </tr>

Style and size the textarea however you like.

Lastly, in either your HTML or text email tpl file (I use skin1/mail/html/send2friend.tpl), add:
Code:

{if $msg}
$msg
<br/>
{/if}


Hope this helps. Kudos to Shan's old post for giving me the help I needed.


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

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