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

disable languages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-26-2003, 02:20 PM
  Satyr's Avatar 
Satyr Satyr is offline
 

Member
  
Join Date: Jan 2003
Location: Lexington, KY
Posts: 20
 

Default disable languages

is there an easy way to disable the languages option?
If not, what code do I need to remove out of head.tpl to remove the dropdown box without screwing up the rest of head.tpl?

Thanks in advance
Reply With Quote
  #2  
Old 01-26-2003, 02:26 PM
  Satyr's Avatar 
Satyr Satyr is offline
 

Member
  
Join Date: Jan 2003
Location: Lexington, KY
Posts: 20
 

Default hehe

Of course I fight with it for 2 hours and as soon as I post I figure it out.
For other who might need to know

Code:
{if $main eq "catalog" and $current_category.category eq "" and $all_languages_numba gt 1} <FORM action="home.php" method=GET name=sl_form> <SELECT name=sl onChange="javascript: document.sl_form.submit()"> {section name=ai loop=$all_languages} <OPTION value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION> {/section} </SELECT> </FORM> {else} {/if}

Remove this from head.tpl and the pesky languages drop box goes away
Reply With Quote
  #3  
Old 02-03-2003, 12:04 PM
 
heresmysite heresmysite is offline
 

Newbie
  
Join Date: Jan 2003
Posts: 7
 

Default Leave the code alone...

There's easier way other than removing the section of code from head.tpl. From Admin, enter Languages section. Under "Edit language", select the language you don't want to use and click on "Disable" button. If you disabled all but one language, the language option box on customer's page will disappear.
Reply With Quote
  #4  
Old 03-16-2004, 04:41 AM
 
edupin edupin is offline
 

Member
  
Join Date: Mar 2004
Posts: 21
 

Default

False!
I did it, I disabled all but one language (the one I use), and the combo box still appears, showing just one language...
__________________
X-cart Version 3.5.4
www.bloobox.net
Reply With Quote
  #5  
Old 03-16-2004, 05:22 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

you can comment out the code in the header or run an sql statement to remove all language entries apart from the ones you want

something along the lines of

Code:
DELETE FROM xcart_languages WHERE code != 'us'
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #6  
Old 03-16-2004, 04:11 PM
 
heresmysite heresmysite is offline
 

Newbie
  
Join Date: Jan 2003
Posts: 7
 

Default

Yeah, disabled all but one language worked until I upgraded Cart to newer version. It came back again. I tried to remove other languages from SQL and it doesn't work so I just edit the header tpl to hide it instead.
Reply With Quote
  #7  
Old 03-30-2004, 02:34 PM
 
gravel gravel is offline
 

Senior Member
  
Join Date: Mar 2004
Posts: 156
 

Default Another way the code may look...

I think I took out the same section from head.tpl, but the code looks a little different. Anyway, it seems to work.

Code:
{if $usertype eq "C"} <table border=0 cellpadding=0 cellspacing=0> <FORM action="home.php" method=GET name=sl_form> <INPUT type=hidden name="redirect" value="{$smarty.server.PHP_SELF}?{$smarty.server.QUERY_STRING}"> <tr> <td> {$lng.lbl_select_language}: <SELECT name=sl onChange="javascript: document.sl_form.submit()"> {section name=ai loop=$all_languages} <OPTION value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION> {/section} </SELECT> </td></tr> </FORM> </table> {elseif ($usertype eq "P" or $usertype eq "A") and $login} <table border=0 cellpadding=0 cellspacing=0> <FORM action="{$smarty.server.REQUEST_URI}" method=POST name=asl_form> <tr> <td>Current language:</td> <td> <INPUT type=hidden name="redirect" value="{$smarty.server.QUERY_STRING}"> <SELECT name=asl onChange="javascript: document.asl_form.submit()"> {section name=ai loop=$all_languages} <OPTION value="{$all_languages[ai].code}"{if $current_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION> {/section} </SELECT> </td></tr> </FORM> </table> {else} {/if}
__________________
X-Cart version 4.0.17
X-Cart version 4.0.18
Web servers = Apache
OS = Linux
Reply With Quote
  #8  
Old 03-31-2004, 04:33 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

You can always go into the admin->languages and delete all of them except the desired single one
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #9  
Old 04-01-2004, 04:18 PM
 
heresmysite heresmysite is offline
 

Newbie
  
Join Date: Jan 2003
Posts: 7
 

Default

Quote:
Originally Posted by B00MER
You can always go into the admin->languages and delete all of them except the desired single one

Well... It worked fine with older version until I upgraded it to v3.5.3. The v3.5.3 didn't hide the menu when I deleted all but one. I don't know if this is a bug and already fixed in newer releases. I ended up editing the header instead.
Reply With Quote
  #10  
Old 04-06-2004, 10:16 AM
  Jon's Avatar 
Jon Jon is offline
 

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

Default

Can anybody tell me how to edit the /include/get_language.php file to reduce the server processing too?
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:25 PM.

   

 
X-Cart forums © 2001-2020