![]() |
Re: send_to_friend.tpl pop up
I have a simple solution I use.
add this to the end of send_to_friend.php before the final } func_header_location("thankyoupage.php"); this will load thankyoupage.php after a succesful submit. you can stylize this page all you like. |
Re: send_to_friend.tpl pop up
Thank you, Luxor!
|
Re: send_to_friend.tpl pop up
Here are the steps that I followed to get this working in 4.1.9 based on other posts in this thread. I just thought someone else might find it helpful to have everything in one place. Let me know if I missed anything. ;)
1. Place pop-up link somewhere in skin1/customer/main/product.tpl Code:
<A HREF="javascript:popUp('product.php?productid={$product.productid}&mode=showsend')">Email A Friend</A> 2. Place this pop-up script in <head> section of skin1/customer/home.tpl (just a free script I found online - credits are in place): Code:
{literal} 3. In send_to_friend.php: Add: Code:
if($mode=='showsend'){ Replace (only if you want a custom thank you page): Code:
func_header_location("product.php?productid=".$productid); 4. In product.php: Replace: Code:
func_display("customer/home.tpl",$smarty); with: Code:
if ($main == 'showstf') 5. Alter your skin1/customer/main/send_to_friend.tpl file to have the look and feel that you want. Mine looks like this: Code:
{* $Id: send_to_friend.tpl,v 1.11.2.5 2007/04/05 10:17:48 twice Exp $ *} 6. If you want a custom thank you page, create a new file called thankyou.php and upload it to the root x-cart directory. |
Re: send_to_friend.tpl pop up
Here's a quick question if anyone knows - I'm now attempting to turn the pop up link into a button, but it isn't working because I have brackets within brackets:
Code:
{include file="buttons/email_a_friend.tpl" style="button" href="javascript:popUp('product.php?productid={$product.productid}&mode=showsend')"} Is there a way around this? :) |
Re: send_to_friend.tpl pop up
maybe try...
Code:
{include file="buttons/email_a_friend.tpl" style="button" href="javascript:popUp('product.php?productid=`$product.productid`&mode=showsend')"} |
Re: send_to_friend.tpl pop up
Thank you, Phil! That works!! :) Woo hoo!
|
Re: send_to_friend.tpl pop up
I'm having trouble with this code in 4.1.10. My popup window just displays the product page, no "Send To Friend " template. Should it work in 4.1.10?
|
Re: send_to_friend.tpl pop up
Thanks for the mod.
There are a couple of changes I had to make to Andrea's summary in post #13 to get it to work for me. 1 - The code for product.php needs to add the ".tpl" after: func_display("customer/main/send_to_friend.tpl",$smarty); (Soleag - this could explain it not working for you if you used this code) 2. In the modified code for skin1/customer/main/send_to_friend.tpl, the send button did not work for me, I believe, because some javascript is missing. I added this before the </head>: Code:
<script src="/skin1/common.js" language="JavaScript" type="text/javascript"></script> This could be because I am using a shadowbox and not the popup javascript. Maybe the popup still finds the common.js with a popup. I'm not sure. |
Re: send_to_friend.tpl pop up
Hi, not sure what I’m doing wrong but for some reason my popup window displays template of product page instead of sent_to_friend. Could anybody help me with it. Many thanks
|
Re: send_to_friend.tpl pop up
Check the 4th step in post 13 of this thread.
Quote:
|
All times are GMT -8. The time now is 12:20 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.