osCommerce Templates | Magento Themes

  • Full Screen
  • Wide Screen
  • Narrow Screen
  • Increase font size
  • Default font size
  • Decrease font size

Make an osCommerce Template by Yourself (10)

E-mail Print PDF

Now what we want to do is re-create the Languages InfoBox into the Header Area – this is quite easily done if you take it step by step.

Step 1: Create a new file named header_languages.php which should contain only the following lines of code:


<?php
?>


Save this into the folder /includes/boxes/


Step 2: Open up /includes/boxes/languages.php and copy the following lines of code:


if (!isset($lng) || (isset($lng) && !is_object
($lng))) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language;
}
$languages_string = '';
reset($lng->catalog_languages);
while (list($key, $value) = each($lng-
>catalog_languages)) {
$languages_string .= ' <a href="' .
tep_href_link(basename ($PHP_SELF),
tep_get_all_get_params(array('language',
'currency')) . 'language=' . $key,
$request_type) . '">' . tep_image
(DIR_WS_LANGUAGES . $value['directory'] .
'/images/' . $value['image'], $value['name']) .
'</a> ';
}
$info_box_contents = array();
$info_box_contents[] = array('align' =>
'center','text' => $languages_string);


Step 3: Open up the file you made in Step 1, and paste the code you copied in step 2, immediately before the ?>


Save it (remember you are saving it as header_languages.php)


Step 4: Once you have that new file saved, open it up and find the following line of code:

 

$info_box_contents[] = array('align' =>
'center','text' => $languages_string);


Change it to:


echo $languages_string;


Save it.


Step 5: Open up /includes/header.php and find the following code:


<td class="languageboxarea"></td>


Change it to:


<td align="right" class="languageboxarea"><?php
require(DIR_WS_BOXES .
'header_languages.php'); ?></td>


Save it!


Step 6: Now we need to set the style and position of the Flags, by opening up stylesheet.css and finding:


.languageboxarea {
background-image: url(images/logo_3.jpg);
width: 455px;
height: 78px;
}
Change it to:
.languageboxarea {
background-image: url(images/logo_3.jpg);
width: 455px;
height: 78px;
vertical-align: bottom;
padding-right: 5px;
}


Save it as stylesheet.css - and now we have our Languages Flags integrated as part of our design – your new template for the osCommerce store should now look exactly like this:

Testimonials

Si muchas gracias y disculpe todas las molestias.

--- Franklin Rojas

Thank you for your soon reply. I have found the way to enable rtl languages in virtuemart. Laughing

--- Jackie. B

Agradeço muito pela sua resposta rápida e apoio profissional. Smile

--- Salles

Dank u voor de video-tutorial. Ik zag het en deed alles stap voor stap. Nu is alles prima. 

--- Jackie Benodiz

Και πάλι ευχαριστώ πολύ για τις πληροφορίες. 

--- Andromeda

 
You are here: osCommerce Tutorial Make an osCommerce Template by Yourself (10)