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

Adding a language variable

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-17-2008, 04:34 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Adding a language variable

Must be having one of those days

I need to add a text variable (as highlighted) to the shipping methods template at the checkout on a client's site.

Code:
{* $Id: shipping_methods.tpl,v 1.7.2.11 2007/09/26 10:35:04 ferz Exp $ *} <table cellpadding="5" cellspacing="5" width="100%"> <tr> <td></td> {$lng.txt_delnote} </tr> <tr> <td valign="top" width="30%"> {include file="customer/main/subheader.tpl" title=$lng.lbl_shipping_address} {if $userinfo} {if $userinfo.default_fields.s_address}{$userinfo.s_address}<br />{/if} {if $userinfo.default_fields.s_address_2 and $userinfo.s_address_2} {$userinfo.s_address_2}<br /> {/if} {if $userinfo.default_fields.s_city}{$userinfo.s_city}<br />{/if} {if $userinfo.default_fields.s_county and $config.General.use_counties eq "Y" and $userinfo.s_county}{$userinfo.s_county}<br />{/if} {if $userinfo.default_fields.s_state}{$userinfo.s_statename}<br />{/if} {if $userinfo.default_fields.s_country}{$userinfo.s_countryname}<br />{/if} {if $userinfo.default_fields.s_zipcode}{$userinfo.s_zipcode}{/if} {else} No data {/if} {if $login ne ""} <br /><br /> {include file="buttons/modify.tpl" href="register.php?mode=update&action=cart"} {/if}</td> <td valign="top" width="70%"> {include file="customer/main/subheader.tpl" title=$lng.lbl_delivery}


I've created the txt file but it never shows. What blatantly obvious thing am I missing?

Thanks
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #2  
Old 04-17-2008, 04:52 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Adding a language variable

You've got the language variable outside the table cell, it'll never show. Put it between the <td> and </td>
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-17-2008, 05:02 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: Adding a language variable

Quote:
Originally Posted by balinor
You've got the language variable outside the table cell, it'll never show. Put it between the <td> and </td>

Thanks Balinor, I tried that and it still doesn't show. I created a new cell which now bumps the rest of the page down a little so I know that is working but even placing the txt variable between those tags it still doesn't show.

This is so easy, so I'm stumped why it won't show.

Any other suggestions???
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #4  
Old 04-17-2008, 05:11 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Adding a language variable

You sure you copied the variable exactly as you created it?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 04-17-2008, 05:19 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: Adding a language variable

Yeah mate, I've lost count how many times I've checked it.

I'm going to send a message to Jon at WebsiteCM as I'm using their Ezy checkout, however when using Webmaster mode it tells me that their mod still uses all the standard XCart fastlane checkout templates but just changes some language variables and the way the array is shown.

Perhaps their mod bans anyone from making alterations ??

Thanks for helping out.
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #6  
Old 04-17-2008, 05:21 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Adding a language variable

Na, doubt that. So if you type text in where the language variable is, does that update on the site? And have you cleared your cache?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 04-17-2008, 05:34 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: Adding a language variable

Cleared the cache but still doesn't show. typed in "Delivery Notes" between the TD and /TD tags and that appears so I have no idea why I can't show a variable.

Weird, weird.

I suppose I can just replace Delivery Notes with the text from the variable, but it's ugly doing it that way.
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #8  
Old 04-17-2008, 06:00 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default Re: Adding a language variable

Have you tried using a standard lng variable like {$lng.txt_welcome}, or a similar language variable you're familiar with, in its place? If it printed that would most likely prove whether the var you have created is at fault or not (I would have thought).

Can you search for your language variable directly by inputting the variable name in the filter under languages?

For example, in admin, this page below should give a result... (although you may have some different requirements to be entered below)
Code:
languages.php?language=US&topic=&filter=txt_delnote
Does it contain a value? Is it simple text (no HTML included)?

I know the questions are silly to ask - but you never know.
__________________
Doms
kube v4.1.9
Reply With Quote
  #9  
Old 04-17-2008, 06:26 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: Adding a language variable

Quote:
Originally Posted by kube
Have you tried using a standard lng variable like {$lng.txt_welcome}, or a similar language variable you're familiar with, in its place? If it printed that would most likely prove whether the var you have created is at fault (I would have thought).

Can you search for your language variable directly by inputting the variable name in the filter under languages?
Code:
languages.php?language=US&topic=&filter=txt_delnote
Does it contain a value? Is it simple text (no HTML included)?

I know the questions are silly to ask - but you never know.

Thanks Kube for replying. Yes I can search and find the variable and it has a plain text value with no html. If I include {$lng.txt_welcome} it appears fine, so I created a new variable again and it still won't appear. So I raise the white flag.
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #10  
Old 04-17-2008, 06:55 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default Re: Adding a language variable

*scratches head* What could possibly be doing that?

Can you print the variable, you have created, somewhere else? Like on the home page home.tpl. That would definitely confirm something is up if it did print.
__________________
Doms
kube v4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:41 PM.

   

 
X-Cart forums © 2001-2020