PDA

View Full Version : A shop with single language



case510
12-18-2003, 01:04 PM
Hi all.

It is good idea to disapear Languages box from Right Column if you have only one language.

To do that I remarked last four lines in catalog/includes/column_right.php

Like this:

// if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
// include(DIR_WS_BOXES . 'languages.php');
// include(DIR_WS_BOXES . 'currencies.php');
// }

It would be great if someone can add such a setting into admin interface.

kguske
09-19-2004, 05:49 AM
Another option is to only display the languages and currencies boxes when there is more than one to select.

For currencies, change the line in /includes/boxes/currencies.php that looks like:

if (isset($currencies) && is_object($currencies)) {
to:

if (isset($currencies) && is_object($currencies) && sizeof($currencies)>1) {

For languages, after this in /includes/boxes/languages.php:

if (!isset($lng) || (isset($lng) && !is_object($lng))) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language;
}
insert this:

if (sizeof($lng->catalog_languages) > 1) {
And, insert this:

}

before this, at the bottom:

$boxContent_attributes = '';

It's not an admin settting, but I think it's better since it works automatically, depending on the number of languages and currencies your store supports.

EDIT: Moved IF in languages