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

send_to_friend feature to be a request additional info

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 03-08-2006, 06:14 PM
 
matthew@wallstudios.com.a matthew@wallstudios.com.a is offline
 

Newbie
  
Join Date: Dec 2005
Posts: 5
 

Default send_to_friend feature to be a request additional info

I have just modified the send_to_friend feature to be a request additional info in X-cart Gold 4.0.17.

I don't know if it will be of any use to anyone or not. I'm new to this so I'm sure there are better ways of doing this or things that could be changed to make it better so any feed back would be good.

I have based this on a mod that was done by Shan to add a text field to the send_to_friend
http://forum.x-cart.com/viewtopic.php?t=15657&highlight=sendtofriend

there are three main files that need to be modified.

skin1/customer/main/send_to_friend.tpl
skin1/mail/html/send2friend.tpl
send_to_friend.php

this mod was done on X-cart Gold 4.0.17 with the tabs mod as well.

before you try backup all files that need to be changed.

you will also need to change the language lbl_recommendation to something like "Website Information Request"
if you don't use HTML for you emails you will also need change skin1/mail/send2friend.tpl

Hope this makes sense.
you need to add your email address details as well. Change "info@your-email-address.com.au"> to where ever you want it to go

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 $ *} {* WALLSTUDIOS - REQUEST INFO *} <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_lastname', "{$lng.lbl_last_name|strip_tags|replace:'"':'\"'}", false); requiredFields[2] = new Array('send_from', "{$lng.lbl_send_your_email|strip_tags|replace:'"':'\"'}", false); requiredFields[3] = new Array('send_to', "{$lng.lbl_sent_recipient_email|strip_tags|replace:'"':'\"'}", false); requiredFields[4] = new Array('send_company', "{$lng.lbl_company|strip_tags|replace:'"':'\"'}", false); requiredFields[5] = new Array('send_phone', "{$lng.lbl_phone|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}"> <INPUT type="hidden" name="email" id="send_to" value="info@your-email-address.com.au"> <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_last_name}:</TD> <TD><FONT class="Star">*</FONT></TD> <TD><INPUT id="send_lastname" type="text" size="45" name="lastname"></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_company}:</TD> <TD><FONT class="Star">*</FONT></TD> <TD><INPUT id="send_company" type="text" size="45" name="company"></TD> </TR> <TR> <TD class="FormButton">{$lng.lbl_phone}:</TD> <TD><FONT class="Star">*</FONT></TD> <TD><INPUT id="send_phone" type="text" size="45" name="phone"></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/send2friend.tpl

Code:
{* $Id: send2friend.tpl,v 1.2.2.1 2004/10/21 07:51:07 max Exp $ *} {config_load file="$skin_config"} {* wallstudios -INFO REQUEST ADDED *} </p> INFORMATION REQUEST FROM WEBSITE!! </p> <table width="549" border="0" cellspacing="0" cellpadding="3"> <tr> <td width="145">NAME:</td> <td width="404">{$name} </td> </tr> <tr> <td>SURNAME:</td> <td>{$lastname}</td> </tr> <tr> <td>COMPANY NAME:</td> <td>{$company}</td> </tr> <tr> <td>EMAIL: </td> <td>{$from}</td> </tr> <tr> <td>PRODUCT ID:</td> <td>{$product.productcode} <FONT size="1"> </FONT></td> </tr> <tr> <td height="46">MESSAGE</td> <td>{$msg}</td> </tr> </table> Has Requested additional information on:</p> {$product.product} - {$lng.lbl_price}: {include file="currency.tpl" value=$product.taxed_price} {$product.descr}{$product.productcode} <FONT size="1"> </FONT> {$lng.eml_please_click_link}</p> = {$catalogs.customer}/product.php?productid={$product.productid} {include file="mail/html/signature.tpl"}</p>


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 ("lastname", $lastname); $mail_smarty->assign ("msg", $msg); $mail_smarty->assign ("from", $from); $mail_smarty->assign ("company", $company); 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); } ?>
__________________
lc 2.2.21
Reply With Quote
  #2  
Old 05-20-2006, 08:16 PM
 
slade slade is offline
 

Advanced Member
  
Join Date: Jun 2005
Location: new zealand
Posts: 64
 

Default

hey great mod now my customers will be able to ask a qustion about a product they are interested in thankyou.
__________________
www.supremeroofing.co.nz
Reply With Quote
  #3  
Old 05-20-2006, 08:52 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Nice!, I know awhile back my old 3.5.x send to friend mod, someone tweaked for the very same purpose. Defiantly something X-Cart should consider to add an option so you can easily change it from send to friend to enquire about product. Kudos!
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #4  
Old 07-03-2006, 02:23 PM
 
Jerrad Jerrad is offline
 

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

Default

This seems like a great mod and exactly what I'm looking for!
Only problem is that I'm using the send_to_friend feature...

So, I'm wondering if anyone knows a way to get this working without losing the send_to_friend feature?

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
  #5  
Old 07-30-2006, 09:35 PM
 
alru111 alru111 is offline
 

eXpert
  
Join Date: Dec 2005
Posts: 244
 

Default

this seems to work fine.
I would make it a pop up and get rid of that prehistoric confirmation window (dialogue.tpl)
Would be nice to add a 'sign up for updates on this product' option that would involve a couple of db queries.
__________________
X-Cart version 4.0.19
Reply With Quote
  #6  
Old 07-31-2006, 01:31 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,052
 

Default

Quote:
So, I'm wondering if anyone knows a way to get this working without losing the send_to_friend feature?

Are you still looking for this?
If so, is this the kind of thing you need? for example:
http://www.japangarden.co.uk/-Venetian-Screen-SPECIAL-OFFER-pr-481.html
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #7  
Old 07-31-2006, 01:39 PM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default

hey paul,

thats exactly what im looking for!

can you help out?
__________________
X-Cart 4.0.18 DBest
Reply With Quote
  #8  
Old 08-01-2006, 01:08 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,052
 

Default

Hi,

sent you a PM with some details.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #9  
Old 05-01-2007, 07:40 PM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default Re: send_to_friend feature to be a request additional info

thanks!
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
  #10  
Old 05-28-2007, 11:25 AM
 
mmonger mmonger is offline
 

Member
  
Join Date: May 2004
Location: CA
Posts: 28
 

Default Re: send_to_friend feature to be a request additional info

Regarding the sendtofriend.php script (the original):

We need to get an email (i.e. to webmaster@domain.com) of the email that was sent from a visitor on the board. Is there a way to, I guess, CC: us on what was sent? There currently appears to be no way to see what people are sending to themselves or their friends.

Any help would be appreciated...

Thanks in advance!
__________________
X-Cart Pro v3.5.12 (FreeBSD), Apache 1.3.31, X-Conf, X-AOM, X-FancyCat, Rec. Viewed, MM Pro, Stock Not., News Module, Recently Viewed, Banner/Ad, PHP 4.3.9, MySQL server 3.23.54, Perl 5.00503
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 08:19 PM.

   

 
X-Cart forums © 2001-2020