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

variable values

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-26-2004, 12:32 PM
 
goodhank goodhank is offline
 

Member
  
Join Date: Aug 2004
Posts: 11
 

Default variable values

I am not able to find out where the actual values for the variables comes from.
for example in the skin1/customer/main/welcome.tpl template, line 7;

{$lng.txt_welcome}

Is the default welcome text, other than just replacing the whole file or replacing the line, where can i replace the default value so that i can leave the template file unchanged.

Any information is much appreciated thank you
__________________
ver 4.0.0 pro, on linux
Reply With Quote
  #2  
Old 08-26-2004, 12:35 PM
  lyncca's Avatar 
lyncca lyncca is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Fort Worth, Texas
Posts: 455
 

Default

Go to Languages in admin, do english in the dropdown and then you can do a search for labels and text further down the page.
Reply With Quote
  #3  
Old 08-26-2004, 12:40 PM
 
goodhank goodhank is offline
 

Member
  
Join Date: Aug 2004
Posts: 11
 

Default

holy shnikeys! that easy eh!!!!! i would kiss you if i could. Alright now to satisfy the nerd in me, where are those valuse stored, in the database somewhere?
__________________
ver 4.0.0 pro, on linux
Reply With Quote
  #4  
Old 08-26-2004, 12:41 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

^ Like she said, language variables are stored in the language database. All variables that start with $lng. are stored there.

Other variables are assigned from the php scripts which are then passed to smarty. Smarty also has some built in variables.
Reply With Quote
  #5  
Old 08-26-2004, 12:58 PM
 
goodhank goodhank is offline
 

Member
  
Join Date: Aug 2004
Posts: 11
 

Default

ok 1 more, line 10 of skin1/menu.tpl :

<FONT class="VertMenuBoxNewsTitle">{$menu_title}</FONT></TD>

this provides the title for the menus like categories, specials, users online, etc. Now lets say i want to change the title on only the categories menu, where is this value comming from?
__________________
ver 4.0.0 pro, on linux
Reply With Quote
  #6  
Old 08-26-2004, 01:05 PM
  lyncca's Avatar 
lyncca lyncca is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Fort Worth, Texas
Posts: 455
 

Default

I'm not positive about version 4.0 but in 3.5 its called "lbl_categories" under languages. Most everything is under languages.

Another thing you can use is webmaster mode. Its very handy in that it puts a popup window and you just scrolldown it until you find the piece of code you see hilite in your cart, then click it and the template pops up!
Reply With Quote
  #7  
Old 08-26-2004, 01:24 PM
 
goodhank goodhank is offline
 

Member
  
Join Date: Aug 2004
Posts: 11
 

Default

Found it, i had to use windows because my linix mozilla browser was not brining up the descriptive windows, thank you for your help
__________________
ver 4.0.0 pro, on linux
Reply With Quote
  #8  
Old 08-26-2004, 01:28 PM
  lyncca's Avatar 
lyncca lyncca is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Fort Worth, Texas
Posts: 455
 

Default

no problem
Reply With Quote
  #9  
Old 08-26-2004, 01:31 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Look at skin1/customer/categories.tpl

You'll see a capture start:

Code:
{capture name=menu}

A bunch of junk in the middle, and then a capture end:

Code:
{/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }


This code calls menu.tpl and passes the variable menu_title to it.

Menu.tpl then puts a frame around all the junk between capture start and capture end using the menu_title variable that's passed to it.

Make sense?
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 10:29 PM.

   

 
X-Cart forums © 2001-2020