X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   variable values (https://forum.x-cart.com/showthread.php?t=9096)

goodhank 08-26-2004 12:32 PM

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

lyncca 08-26-2004 12:35 PM

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. :)

goodhank 08-26-2004 12:40 PM

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?

Jon 08-26-2004 12:41 PM

^ 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.

goodhank 08-26-2004 12:58 PM

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?

lyncca 08-26-2004 01:05 PM

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!

goodhank 08-26-2004 01:24 PM

Found it, i had to use windows because my linix mozilla browser was not brining up the descriptive windows, thank you for your help

lyncca 08-26-2004 01:28 PM

no problem :)

Jon 08-26-2004 01:31 PM

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?


All times are GMT -8. The time now is 03:39 AM.

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