Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header + languages


pippi

Recommended Posts

Hello,

 

Have tried to move the language box into my header... as you might see it doesnt look to good... http://www.nordicgreentrade.com/catalog/index.php

 

This is simply what I did in header.php

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr class="header">

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'logo.jpg', 'Tokyo Organic') . '</a>'; require(DIR_WS_BOXES . 'languages.php'); ?></td>

</tr>

</table>

 

But what should I do if I want the language box to first of all be next to the logo instead, and alternatively also of a certain size.

 

Also I wondered what I need to do in the stylesheet to remove the border around a linked picture... see paypal pic in footer...

 

Any help would be appriciated,

Filip

Link to comment
Share on other sites

On the PayPal image you have to say no-border I think.

 

On the language in the actual banner - I think if you look for contributions that add other things to the banner e.g. shopping cart you will find out how to do that.

Link to comment
Share on other sites

Is there anyone that could recommend a good contribution to add the language box in the header? Havent been able to find anything... or does

 

Would appriciate the help.

 

Filip

Link to comment
Share on other sites

Is there anyone that could recommend a good contribution to add the language box in the header? Havent been able to find anything... or does

 

Would appriciate the help.

 

Filip

 

 

Have a look here:

 

https://st43.startlogic.com/~bbr-trad/tests...9f08348e10d3459

 

See the language box at the top. Is that what you are after?

Or if slightly different, then explain a little on how you would like it, and i shall see what i can do.

Link to comment
Share on other sites

Have a look here:

 

https://st43.startlogic.com/~bbr-trad/tests...9f08348e10d3459

 

See the language box at the top. Is that what you are after?

Or if slightly different, then explain a little on how you would like it, and i shall see what i can do.

 

 

Something like that was exactly what I was thinking of doing... What would I need to do to make those changes?

 

thanks for the help...

 

filip

Link to comment
Share on other sites

Have a look here:

 

https://st43.startlogic.com/~bbr-trad/tests...9f08348e10d3459

 

See the language box at the top. Is that what you are after?

Or if slightly different, then explain a little on how you would like it, and i shall see what i can do.

 

Just had one more question... A friend of mine has been helping me do my main page http://www.nordicgreentrade.com But like the example you showed the bredth of the entire shop is limited. How can I change the shop so its the same?

 

Would really appriciate the help,

Filip

Link to comment
Share on other sites

Where you placed this piece of code:

 

require(DIR_WS_BOXES . 'languages.php');

 

Add this:

 

	<td>
     <?php
 $info_box_contents = array();

 new infoBoxHeading($info_box_contents, false, false);

 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);

 new infoBox($info_box_contents);
?>
   </td>

 

Basically all i have done is:

1. Add a new cell to the table <td> </td>

2. Then between the <td></td> added most of the code from the languages.php

 

From there you can play a little to get it how you want.

 

As for your other site, it all depends on how it was set up.

The default sttings would have the site width the same as the screen (almost)

Your other site has been centered.

There are several ways of doing this.

 

First have a look at your header.php and just before the 'real code' starts look for <div ????????????> (the?????? would point to a stylesheet)

Then look at your footer.php near the bottom for </div>

 

That would be the easiest way to center.

Link to comment
Share on other sites

As for your other site, it all depends on how it was set up.

The default sttings would have the site width the same as the screen (almost)

Your other site has been centered.

There are several ways of doing this.

 

First have a look at your header.php and just before the 'real code' starts look for <div ????????????> (the?????? would point to a stylesheet)

Then look at your footer.php near the bottom for </div>

 

That would be the easiest way to center.

 

 

Hello again...

 

Thanks for the help!!! Have another question though... Do you mean header/footer.php for the osc shop? I wanted to change the osc shop so that it has the same format as my other page, rather than changing the start page. Want to limit the bredth of the shop, and put a border around it. What would i need to do?

 

Cheers.

 

Filip

Link to comment
Share on other sites

Hello again...

 

Thanks for the help!!! Have another question though... Do you mean header/footer.php for the osc shop? I wanted to change the osc shop so that it has the same format as my other page, rather than changing the start page. Want to limit the bredth of the shop, and put a border around it. What would i need to do?

 

Cheers.

 

Filip

 

Yes the <div> tags would be in the header and footer of the osc shop.

The way it all works (simple terms) is:

 

HEADER

INDEX or ?????

FOOTER

 

Where ????? could be any of the other pages: login.php, specials.php.

 

Therefore if the <div> tags are added it comes into effect at the top of the 'whole' page, then ends at the bottom.

 

As for the way you want your shop it sounds like you want something like mine.

 

Be aware its still in development but IS live with real stock.

 

BBR-Trading

 

I dont know if there is a simple way of achieving the layout that i have got.

But the way i have done it was quite tricky to start.

Now that i have the layout of the borders though, it is quite quick (30 secs) to update any other file, like: login.php, shipping.php ect.

let me know if this is what you are after then we can chat.

 

 

P.s. Please let me know the download time if you look at this site, i am curious.

Thanks

Link to comment
Share on other sites

Hey again. Looked at your site... have a quite fast connection at home, so no problems loading the page. Gonna take a look from work as well to check, I`ll let you know if it goes slower there...

 

Ok, I have managed to limit the bredth of my own shop, as well as centering it... I did it by simply changing the <!-- body //--> <table border="0" width="687" cellspacing="0" cellpadding="0"> for all the .php in the catalog. But I still want to put a border around everything... Like on the example you showed me earlier, and my main page. Would also like the background, beside the page, to be of a different color...

 

Thanks

Link to comment
Share on other sites

Hey again. Looked at your site... have a quite fast connection at home, so no problems loading the page. Gonna take a look from work as well to check, I`ll let you know if it goes slower there...

 

Ok, I have managed to limit the bredth of my own shop, as well as centering it... I did it by simply changing the <!-- body //--> <table border="0" width="687" cellspacing="0" cellpadding="0"> for all the .php in the catalog. But I still want to put a border around everything... Like on the example you showed me earlier, and my main page. Would also like the background, beside the page, to be of a different color...

 

Thanks

 

Ok, the way i did it is like so:

 

In header.php:

I added a new table which ends in footer.php

For the first row I added 3 columns to include: left border, center border and then right border.

Then for the second row i again added a column for left border, the center column then encompasses the normal header code, then the third column is for right column again.

 

Next is the idex.php:

 

Again a new row, 3 columns

Column 1 - left border

Column 2 - main index.php

Column 3 - right border

 

The footer.php is basically the same as the header setup just reversed then the table is closed.

 

Another attempt to explain it.

 

HEADER.PHP

<table>

<tr>

<td> left border</td>

<td> center border </td>

<td> right border </td>

</tr>

<tr>

<td> left border </td>

<td> heder info </td>

<td> right border </td>

</tr>

 

INDEX.PHP

<tr>

<td> left border</td>

<td> index info</td>

<td> right border </td>

</tr>

 

FOOTER.PHP

<tr>

<td> left border </td>

<td> footer info </td>

<td> right border </td>

</tr>

<tr>

<td> left border</td>

<td> center border </td>

<td> right border </td>

</tr>

</table>

 

Thats a bit long winded, but i hope you get the idea.

My actual code is very different now as i have adjust what the header actually does.

 

There maybe a simpler way of doing this, but thats how i did it.

 

Any questions then please ask.

Link to comment
Share on other sites

Hey. Feel a bit daft, because im not quite getting how I should implement this in the header/index/footer.php. So, i just tried to put everything into one cell and it seems to work... not sure what I think about how it looks though...

 

But I would however like to move the language box again, this time to the top in the blue border Ive put there instead... Would you know how i could have only the flags there? Its only a table there...

 

Thanks for all the help, really appriciate it...

 

By the way, took another look at your page from a slightly slower connection... It took a bit longer for it to load, in particular everything under the heading. But it wasnt to slow as to be annoying.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...