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

send_to_friend.tpl as pop-up window

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-26-2007, 11:20 AM
 
Serdar Serdar is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 36
 

Default send_to_friend.tpl as pop-up window

Hi all,
I am trying to make send to friend to be shown in a pop-up window. I am trying to put a link says "suggest this product" and when you click on it Ajax popup should open and you should see send_to_friend.tpl in there. My script is ready for popup window but i dont know how to apply that to .tpl file.

I need to make the link something like this

<a href="customer/main/send_to_friend.tpl"
onclick="return show_hide_box(this, 200, 270, '2px solid')">
suggest this product
</a>


Thanks in advance,
Serdar
__________________
X-Cart Gold Version 4.1.3
Reply With Quote
  #2  
Old 02-26-2007, 04:55 PM
 
phpmattk phpmattk is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 44
 

Default Re: send_to_friend.tpl as pop-up window

Don't know how this would involve asynchronous java and xml. Joking aside, you'll have to create a page somewhere called emailtofriend.php, and include the required files (look at one of the other .php pages to see how its done), then at the bottom of the page, do a

$smarty->display("blah/send_to_friend.tpl");

You'll probably have to find some way to pass the url of the page you want to email to the popup page with the form on it. I believe when the send to friend is included, it will send the url of the page its on (ie sendtofriend.php), rather than the page on which your popup link was clicked.
__________________
-matt
version 4.1.5
Reply With Quote
  #3  
Old 02-27-2007, 06:11 PM
 
Serdar Serdar is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 36
 

Default Re: send_to_friend.tpl as pop-up window

Thanks for the answer but it didn't work I dont know why. I managed the link that anchor to send_to_friend.php which is located under xcart directory. However when I click the link it takes me to the home i believe it is because of the line below

if ( !defined('XCART_START') ) { header("Location: home.php"); die("Access denied"); }

I am not sure what is not defined here, so I can't make the tpl to show actual send_to_friend.tpl.

Thanks,
Serdar
__________________
X-Cart Gold Version 4.1.3
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 05:09 AM.

   

 
X-Cart forums © 2001-2020