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

Proper variables to use in language entries

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-28-2007, 09:06 AM
 
jillsybte jillsybte is offline
 

eXpert
  
Join Date: Jun 2006
Location: New York, USA
Posts: 389
 

Question Proper variables to use in language entries

Does anyone know how to enter certain company config variables into language entries? For instance, {{company}} in a language entry will display the company name entered into the Admin-General Settings-Company Options area.

I would like to display/link to my help/support email address in things like my privacy statement, which is one of the language entries, but I would like to use the variable for it.

For my embedded static pages, I put:

Quote:
<a title="Email Us" href="mailto:{$config.Company.support_department}" >{$config.Company.support_department}</a>


into the HTML code for the page and that works. However, the same doesn't work when entered through a language entry. I've tried other things, such as {{support department}} and {{company.support_department}}, but they don't work. They just display them as they are written.

I don't see anything in the manual showing which tags to use in the language entries for various company configuration options. Does anyone know where I can find this information if it exists?

Thanks,
Jill
__________________
X-Cart Gold 4.1.8 (Live)
BCSE Shipping Estimator for FLC Mod
BCSE Shipping Methods per Product Mod
BCSE Customer Review Management Mod
BCSE Catalog Order Form Mod
X-Cart Gold 4.5.2 (Building/Testing)
USA
Reply With Quote
  #2  
Old 09-28-2007, 12:56 PM
 
jillsybte jillsybte is offline
 

eXpert
  
Join Date: Jun 2006
Location: New York, USA
Posts: 389
 

Thumbs up Re: Proper variables to use in language entries

I did some digging and realized where I was going wrong. I had thought there were set variables for some config items, but there aren't. You have to define them in the template. So, for instance, to get my support email address to show up in my privacy statement, I had to do the following.

I had to edit x-cartdir/skin1/help/business.tpl. I changed the following line:

Quote:
{$lng.txt_privacy_statement}

to

Quote:
{$lng.txt_privacy_statement|substitute:"support":$ config.Company.support_department}

Then in the Language Editor for txt_privacy_statement, I placed the variable {{support}} wherever I want the email address to appear. Whatever you put in the quotes after substitute in the template, you have to put between double curly brackets in the language variable.

I answered my own question in case anyone else is ever looking for the same info. I hope it helps someone.

Jill
__________________
X-Cart Gold 4.1.8 (Live)
BCSE Shipping Estimator for FLC Mod
BCSE Shipping Methods per Product Mod
BCSE Customer Review Management Mod
BCSE Catalog Order Form Mod
X-Cart Gold 4.5.2 (Building/Testing)
USA
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 02:52 PM.

   

 
X-Cart forums © 2001-2020