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

show image by language

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-18-2006, 08:30 AM
 
kenwood kenwood is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 34
 

Default show image by language

how can i change an image on frontpage or in menue based on different languages?
__________________
XCart Gold [Linux] Version 4.0.18 - 7Dana Design - Germany (Cologne)
Reply With Quote
  #2  
Old 04-06-2006, 04:52 AM
 
simitpatel simitpatel is offline
 

Newbie
  
Join Date: Sep 2005
Posts: 7
 

Default

you can use if statements around the code for the image. for example:

{if $store_language eq "US"}
[img]image1.gif[/img]
{/if}

{if $store_language eq "JP"}
[img]image2.gif[/img]
{/if}
__________________
software: x-cart pro, Version 4.0.15
operating system: FreeBSD 5.4
Reply With Quote
  #3  
Old 04-24-2006, 02:28 AM
 
kenwood kenwood is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 34
 

Default

thanx
__________________
XCart Gold [Linux] Version 4.0.18 - 7Dana Design - Germany (Cologne)
Reply With Quote
  #4  
Old 06-21-2006, 02:31 PM
  just_me's Avatar 
just_me just_me is offline
 

Advanced Member
  
Join Date: Oct 2005
Location: Spain
Posts: 69
 

Default Great tweek

I have been looking for this tweek for the "save_money.gif" for some time. I now have got the product page completely multilingual (SP,FR,US). Thanks.
__________________
Cordially,
Just me
X-Cart Gold
Version 4.2.3
Multilingual shop: Spanish, French and US English
Reply With Quote
  #5  
Old 07-04-2006, 01:17 PM
 
webtron webtron is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 64
 

Default

just_me and simitpatel,

In what file do you put that code?

And before and after what text exactly?

If you copy and paste how the code looks on the file it would be great.

Thanks!
__________________
Thanks to for your comments/help.
X-cart Version 4.0.17
Reply With Quote
  #6  
Old 07-05-2006, 11:43 AM
  just_me's Avatar 
just_me just_me is offline
 

Advanced Member
  
Join Date: Oct 2005
Location: Spain
Posts: 69
 

Default making the neat save _money.gif be language compatible

Sure, I'd be happy to help. I put the code in here: /customer/main/product.tpl
Find
Code:
{if $active_modules.Feature_Comparison ne ""} {include file="modules/Feature_Comparison/product_buttons.tpl"} {/if} </TD> </TR></TABLE> </TD> <TD align="right" valign="top" width="60"> {if $product.taxed_price gt 0 and $product.list_price gt 0 and $product.taxed_price lt $product.list_price}<TABLE border="0" width="60"><TR>

Just below it you'll see the code we want to make language friendly:
Code:
<TD width="55" height="56" class="SaveMoneyLabel" background="{$ImagesDir}/save_money.gif" align="center" valign="middle">

We made duplicate save_money.gifs in the languages needed and uploaded them to the xcart image file. It's the same file where the original save_money.gif is also located. Then we replaced the standard code with this new code repeating it for our three languages:

Code:
{if $store_language eq "US"} <TD width="55" height="56" class="SaveMoneyLabel" background="{$ImagesDir}/save_money.gif" align="center" valign="middle">{/if} {if $store_language eq "AR"} <TD width="55" height="56" class="SaveMoneyLabel" background="{$ImagesDir}/save_money_es.gif" align="center" valign="middle">{/if} {if $store_language eq "FR"} <TD width="55" height="56" class="SaveMoneyLabel" background="{$ImagesDir}/save_money_fr.gif" align="center" valign="middle">{/if}
__________________
Cordially,
Just me
X-Cart Gold
Version 4.2.3
Multilingual shop: Spanish, French and US English
Reply With Quote
  #7  
Old 07-06-2006, 07:14 AM
 
webtron webtron is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 64
 

Default

Just_me,

You're awsome! Thanks!
__________________
Thanks to for your comments/help.
X-cart Version 4.0.17
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 04:06 AM.

   

 
X-Cart forums © 2001-2020