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)
-   -   Send to Friend on product pages. (https://forum.x-cart.com/showthread.php?t=216)

EnriqueHavoc 10-21-2004 04:12 PM

this is making me scratch my head... http://www.motionzoo.com/forum/images/smilies/more/headscratch.gif

i unzipped the original, unedited 4.0.0 installation and products.tpl contains no references to "send to friend"

product.tpl is calling it through the cartlab-tabs.tpl include so it seems like it should be working...

are you really sure theres no option somewhere to turn it on/off?

EnriqueHavoc 10-21-2004 04:43 PM

well i dont know if there is a better way to do it with a conditional to make it work with Boomers tabbed product menu mod, but i added

Quote:

[*]Send to Friend

to cartlab-tabs.tpl and it shows up now

EnriqueHavoc 10-21-2004 04:48 PM

also now that send to friend is part of the default xcart, is there any way to stop people from abusing this and spamming 10000 emails through it?

shan 10-22-2004 04:14 AM

Sorry, yeh product.tpl

EnriqueHavoc, have you seen the send to friend being spammed ? if so this needs to be fixed

EnriqueHavoc 10-22-2004 11:49 AM

nope- i havent seen it be spammed, but i just suspect it could be abused.

doersam@hotmail.com 10-23-2004 09:07 PM

I can't seem to get this to work in my 3.5.10 test shop. When you click on the Send-To-A-Friend link, I get a blank page with a url like this:

http://domain-name.com/customer/sendtofriend.php?mode=update&productid=16164

Any ideas where I might have messed up?

dashonice 06-23-2005 05:29 PM

hi guys,

I have 4.12 installed which has send to friend by default, but I like the fuctionality of a text link instead of it filling up the product page. Any ideas how to link to send to friend? I have tried
Code:

<A href="send_to_friend.php?mode=update&productid={$product.productid}">
with unsucessful results. It just takes me back to the home page. Any help would be appreciated. Thanks.

bardolino 03-14-2006 11:23 AM

I really like this mod, much more than the out of the box functionality of 4.x. Is there anyway to make this work on a 4.x installation?

markwhoo 03-14-2006 01:12 PM

Quote:

Originally Posted by bardolino
I really like this mod, much more than the out of the box functionality of 4.x. Is there anyway to make this work on a 4.x installation?


Install it and comment out the out of can mod and now you only use the custom mod.

then it is done.

Lionel 03-14-2006 02:54 PM

Quote:

Originally Posted by markwhoo
Quote:

Originally Posted by bardolino
I really like this mod, much more than the out of the box functionality of 4.x. Is there anyway to make this work on a 4.x installation?


Install it and comment out the out of can mod and now you only use the custom mod.

then it is done.


That did not work for me. I had to do my own sendtofriend.php page, by simply including current can.

Code:

<?php
#
# altered Send to Friend Mod 4.18
#

require "./auth.php";
require $xcart_dir."/include/categories.php";
if($active_modules["Manufacturers"])
    include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php";
if($active_modules["Bestsellers"])
  include "modules/Bestsellers/bestsellers.php";

$product_info = func_select_product($productid, $user_account['membership']);
$cat = $product_info["categoryid"];

$userinfo = func_userinfo($login,$login_type);

include "send_to_friend.php";

$smarty->assign("userinfo",$userinfo);
$smarty->assign("fillerror",$fillerror);
$smarty->assign("main","send_to_friend");
$location[] = array(func_get_langvar_by_name("lbl_send_to_friend", ""));
$smarty->assign("location",$location);
$smarty->assign("product",$product_info);

func_display("customer/home.tpl",$smarty);

?>


and since I display image of item to be sent in that send page, here is my send_to_friend.tpl

Code:

{* $Id: send_to_friend.tpl,v 1.6.2.2 2004/12/10 13:14:52 max Exp $ *}

The product you have selected to send to your friend:


<table><tr>
<td><a href=product.php?productid={$smarty.get.productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$smarty.get.productid image_x=100 product=$products[product].product}</a></td>
<td></td>
<td>Product: <font class="red">{$product.product|escape}</font>


{$product.descr|truncate:100:"...":true}</td>
</tr></table>


<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="44" rows="12"></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%"}


I had the textarea mod already installed. This turned out to be better. It simply does not display the outgoing template.


All times are GMT -8. The time now is 05:19 PM.

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