Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header


Digerdoo

Recommended Posts

Where i can find header what change if i change language ?

 

I suppose you mean the header with 'My Account', 'Cart Contents' etc. ?

You will find the information for that within /catalog/includes/language and then the seperate language .php files you see there (english.php or dutch.php etc.).

 

The page header is constructed by /catalog/includes/header.php

Link to comment
Share on other sites

I suppose you mean the header with 'My Account', 'Cart Contents' etc. ?

You will find the information for that within /catalog/includes/language and then the seperate language .php files you see there (english.php or dutch.php etc.).

 

The page header is constructed by /catalog/includes/header.php

-------------------------------->

I know where is header.php but i want change header image if i change language..so i can put english and deuts logos and other..

 

So is this possible :

 

catalog/includes/language/english/header_english.php

 

catalog/includes/languages/deuts/header_deuts.php

Link to comment
Share on other sites

-------------------------------->

I know where is header.php but i want change header image if i change language..so i can put english and deuts logos and other..

 

So is this possible :

 

catalog/includes/language/english/header_english.php

 

catalog/includes/languages/deuts/header_deuts.php

 

I am looking for something like that also. So far it seems it is not possible as there is no language dependant header. I am sure you can write something if you know enough PHP ?!

Link to comment
Share on other sites

Quick_n_Dirty because i'm not a very good PHP-coder, actually a very bad one :D

 

Something like this works (I tried-it):

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<?php
if ($language == "dutch") {
require(DIR_WS_INCLUDES . 'header_dutch.php');
}
?>
<!--  <?php require(DIR_WS_INCLUDES . 'header.php'); ?> // -->

<?php
if ($language == "german") {
require(DIR_WS_INCLUDES . 'header_german.php');
}
?>

 

I left the uncommented standard header in there for your reference.

 

Of course you could leave the first or second header unchanged and not renamed but for clarity it may be benificial

 

Don't forget the make the other necessary changes so that the headers are called.

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

Quick_n_Dirty because i'm not a very good PHP-coder, actually a very bad one :D

 

Something like this works (I tried-it):

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<?php
if ($language == "dutch") {
require(DIR_WS_INCLUDES . 'header_dutch.php');
}
?>
<!-- ?<?php require(DIR_WS_INCLUDES . 'header.php'); ?> // -->

<?php
if ($language == "german") {
require(DIR_WS_INCLUDES . 'header_german.php');
}
?>

 

I left the uncommented standard header in there for your reference.

 

Of course you could leave the first or second header unchanged and not renamed but for clarity it may be benificial

 

Don't forget the make the other necessary changes so that the  headers are called.

 

 

Hi John,

 

Can you please tell me in which file you made these changes and are there more files that need changes? I suppose that in your example the header_dutch.php and header_german.php files are copies of header.php with their own changes ?

 

With kind regards,

Edze

Link to comment
Share on other sites

Hi John,

[1]

Can you please tell me in which file you made these changes

[2]

and are there more files that need changes?

[3]

I suppose that in your example the header_dutch.php and header_german.php files are copies of header.php with their own changes ?

 

With kind regards,

Edze

 

Hi Edze,

<grin> Here we meet again :D

[1]

Now i'm disappointed.

header.php is called in index.php

[2]

The new files ? Dutch + English =1, Espagnol ?

[3]

Yesssss

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

Quick_n_Dirty because i'm not a very good PHP-coder, actually a very bad one :D

 

Something like this works (I tried-it):

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<?php
if ($language == "dutch") {
require(DIR_WS_INCLUDES . 'header_dutch.php');
}
?>
<!-- ?<?php require(DIR_WS_INCLUDES . 'header.php'); ?> // -->

<?php
if ($language == "german") {
require(DIR_WS_INCLUDES . 'header_german.php');
}
?>

 

I left the uncommented standard header in there for your reference.

 

Of course you could leave the first or second header unchanged and not renamed but for clarity it may be benificial

 

Don't forget the make the other necessary changes so that the  headers are called.

 

Duidelijk :) Een simpele maar doeltreffende oplossing :thumbsup:

Hartelijk dank !

Link to comment
Share on other sites

thanx guys!

 

no need for that :

 

in your language file includes/languages/dutch.php

 

define('SHOP_LOGO','images/dutch_logo.jpg');

 

in your language file includes/languages/german.php

 

define('SHOP_LOGO','images/german_logo.jpg');

 

in header.php:

 

<?php

echo '<img src="' . SHOP_LOGO . '">';

?>

 

like that.

Treasurer MFC

Link to comment
Share on other sites

no need for that :

 

in your language file includes/languages/dutch.php

 

define('SHOP_LOGO','images/dutch_logo.jpg');

 

in your language file includes/languages/german.php

 

define('SHOP_LOGO','images/german_logo.jpg');

 

in header.php:

 

<?php

echo '<img src="' . SHOP_LOGO . '">';

?>

 

like that.

Nice addition.

And looking at his site, in DanielG's case that would have been sufficient :D

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

  • 1 year later...
Nice addition.

And looking at his site, in DanielG's case that would have been sufficient :D

Hi John,

 

I tried this simple solution with the dutch_logo.gif and the english_logo.gif in the dutch.php and english.php.

Where in the header.php do I insert the:

 

<?php

echo '<img src="' . SHOP_LOGO . '">';

?>

 

 

and what to do in header.php with this line:

 

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'logo.gif', 'company-name') . '</a>'; ?></td>

 

 

Thanks!

Edze

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...