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

How to let Javascript popup HTML pages read $lng.lbl_xxx?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-02-2003, 06:11 PM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default How to let Javascript popup HTML pages read $lng.lbl_xxx?

I'd like to ask how one is able to change the languages in any extra html pages we did, that opens on a new screen with javascript. We've created a few HTML info pages in English, but I'd like to replace all the text with $lng lables for the future alterations.

Would be great to be able to include {$ImagesDir} paths to the pure HTML popup pages as well!

Thanks in advance everyone.
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
  #2  
Old 04-06-2003, 11:36 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Yes this can be done.

The basic process is as follows:

- the pop up should be a php file with an added variable that dictates what to display
- the php file will call smarty and other includes as per home.php
- the php file assign a template to display.

See help.php for an example

- create a main template (the one referred to above) that includes other templates for the content. (help/index.tpl for an example)
- other templates hold the lanaguage placeholders. (see help/about.tpl)
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 04-07-2003, 06:49 PM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default

Thanks Funkydunk!

Very precise and exactly what I was looking for!

You're a saint.
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
  #4  
Old 09-23-2004, 04:38 AM
 
keavy keavy is offline
 

Member
  
Join Date: Apr 2004
Posts: 27
 

Default

Hi,

I'm trying to do the same. I have want the send to friend section open in a popup. So I made a php file - send_to_friend_window.php and have the following in that:
Code:
require "./auth.php"; require $xcart_dir.DIR_CUSTOMER."/send_to_friend.php"; # Assign the current location line $smarty->assign("location", $location); func_display("customer/main/send_to_friend.tpl",$smarty);

when the popup opens it briefly displays a message about redirection, then loads the page: error_message.php?access_denied

any guidance on what I'm doing wrong would be most appreciated
__________________
--
building with v4.0.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 11:09 PM.

   

 
X-Cart forums © 2001-2020