Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

links on header/banner


DhoTjai

Recommended Posts

Posted

I would like to have links on the banner in header.

 

Like this on the picture

 

testing.gif

 

This is 1 picture and I want to add text on it, clickable, welcome Guest/member, show date and time.

 

 

Does anyone know how I can do this?

 

 

Thanks in advance.

Posted
I would like to have links on the banner in header.

 

Like this on the picture

 

testing.gif

 

This is 1 picture and I want to add text on it, clickable, welcome Guest/member, show date and time.

 

 

Does anyone know how I can do this?

 

 

Thanks in advance.

 

You need to edit the catalog/includes/header.php file to set this up.

Backup before making changes. Backup before making changes! Backup before making changes!!

 

You did do a backup? eh?

Posted

I know, but how to? =o

 

I've looked at the codes, and they are giving me an headache. I only know the basics of html -.- and 1 of php = echo 'hello world'; ....

Posted

It is quite complicated and maybe not worth the bother.

 

You have a 'Home' link on the breadcrumb trail, which is either 'Top' or 'Catalog' depending on where your store is located. You can change either one to Home in your catalog/includes/languages/english.php file.

 

You also already have a 'Contact Us' link in the Information Box but if you really want to have extra ones where you have them in your image, you need to go into includes/header.php and change or add to the three image links already there.

Right now you should have, FILENAME_ACCOUNT, FILENAME_SHOPPING_CART and FILENAME_CHECKOUT_SHIPPING. The Home link would be FILENAME_DEFAULT and the Contact link would be FILENAME_CONTACT_US. If you want text links instead of images, just replace the images with the definitions in catalog/includes/languages/english.php.

 

The new link you want in there 'Forum' the easiest way is to wrap it in a normal <a href"">HTML anchor</a>

 

The date and time bit, is that necessary? You have the date at the bottom already and your user has a clock on their PC.

 

If you really need to do it, you may want to first edit the greeting for TEXT_GREETING_PERSONAL, TEXT_GREETING_PERSONAL_RELOGON and TEXT_GREETING_GUEST which again, are in catalog/includes/languages/english.php.

Then in index.php, find <?php echo tep_customer_greeting(); ?> cut and paste it into includes/header.php, wherever you want it and next to it add <?php echo strftime(DATE_TIME_FORMAT); ?> That will give you date and time. Formatting it differently is another chapter.

 

Now I need a lie down! :sweating:

Posted

Thanks for your time to write this ^_^v

 

I actually want text links on the image. The example picture above, is 1 big banner, and I want to add text links on to it.

 

I tried to copy the line for the oscommerce.gif logo (banner), and tried to <img src="x.gif"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' Home . '</a>' ?>

and that is giving me errors, it doesnt make any sense =( but yea, at least i tried to figure it out :P )

 

Now I really got a big headache, time to rest -.-

 

Do you have a code where I can begin with, then I can copy past and add for the rest of the text links?

Posted

You got an error because the coding is wrong. For that link you have posted, it should be written like so:

 

<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'SSL') . '">Home</a>'; ?>

 

If you put two or three together, the coding would be slightly different.

 

To put text links over your banner, you need to set it as a background image. You only really need the top part of the banner, set the background color of the breadcrumb trail table to the same color as the bottom part.

Archived

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

×
×
  • Create New...