Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Move language box to header.php


agadak

Recommended Posts

Hi,

 

I would like to move the languages box to the header (I already removed the cart, login, checkout icons and would like to put this box there). Can I just copy the include entry in the right side pane or table and put it in the header.php?

 

Thanks.

 

Also, anyone have Paypal IPN I could check out? (How it looks to the customer.) I am not sure I want to use Paypal, since we are looking at a merchant gateway solution (ECHO).

 

Agadak

Link to comment
Share on other sites

Create a file /includes/boxes/language_header.php and place this code in it:

 

<!-- languages_header //-->

         <tr>

           <td>

<?php

 if (!is_object($lng)) {

   include(DIR_WS_CLASSES . 'language.php');

   $lng = new language;

 }



 if (getenv('HTTPS') == 'on') $connection = 'SSL';

 else $connection = 'NONSSL';



 $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, $connection) . '">' . tep_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';

 }



echo $languages_string;

?>

           </td>

         </tr>

<!-- languages_header_eof //-->

 

Edit your /include/header.php and add this code where you want the languages to appear:

 

<?php include(DIR_WS_BOXES . 'languages_header.php'); ?>

 

That should make the language flags magically appear in the header for you :D

Link to comment
Share on other sites

  • 5 months later...

Great Tip

 

I have the flags in the Header Table on the left side. Just delete the <tr><td> in the languages_header.php. But how could i set the flags in the middle of the table same as the text ( basket, checkout,account ). I know......after the flag image........align="center" normal. But here?

 

Also i want the currencies in the header table. I try the same way as the languages, delete the table tags, but get the same box as in the coloum_right.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...