Jump to content



Latest News: (loading..)

- - - - -

Image on index instead of "Wellcome"


  • Please log in to reply
9 replies to this topic

#1   Belial

Belial
  • Members
  • 91 posts
  • Real Name:Vitor Che

Posted 05 July 2012 - 08:38 AM

I want to add a horizontal image instead of the first bold wellcome message on start

Where to add the code?

Thanks a lot.
OSC 2.3.1

Edited by Belial, 05 July 2012 - 08:40 AM.


#2   14steve14

14steve14

    STORE OWNER NOT CODER

  • Members
  • 3,113 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 05 July 2012 - 09:21 AM

You have two choices. You can add the image code to replace the text in your index.php, or you can open your includes.languages/english/index.php and replace the text with just an image. Its up to you really.
REMEMBER BACKUP, BACKUP AND BACKUP
I am not a coder, so dont bother sending PMs asking for help as you wont get any.  

OSC has a steep learning curve, but in general the program does work.  If it doesnt work, the chances are it is something you have done.

#3   al3ks

al3ks
  • Members
  • 288 posts
  • Real Name:Aleksander
  • Gender:Male
  • Location:UK

Posted 05 July 2012 - 10:47 AM

Yep like @14steve14 said, but if you replace the welcome text in index.php you will have the same image all the time whereas if you replace it in the english language definitions you can have a different image for logged in and not logged in customers.

To get an idea what the code would look like look in the header.php, look at the code for the logo.
Find this post helpful? Click the 'Like this' button. :)

#4 ONLINE   burt

burt

    Code Monkey

  • Community Team
  • 7,871 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 05 July 2012 - 10:54 AM

index.php:

From:

<h1><?php echo HEADING_TITLE; ?></h1>

To:

<?php echo tep_image_button('welcome.png'); ?>

Done.
Dummies guide to designing osCommerce 2.3 Click Me

Or maybe a ready made theme for your shop ??

Warning: My posts may contain Horsemeat.

#5   Belial

Belial
  • Members
  • 91 posts
  • Real Name:Vitor Che

Posted 05 July 2012 - 12:07 PM

Thanks a lot. I will check it and come back... :D

#6   Belial

Belial
  • Members
  • 91 posts
  • Real Name:Vitor Che

Posted 05 July 2012 - 07:53 PM

View Postburt, on 05 July 2012 - 10:54 AM, said:

index.php: From:


To: Done.

I name my image welcome.png and uploaded to folder images. Then i replace the code and set the http://catalog/images/welcome.png  but it doesn't work.

Am i do something wrong?

#7   Belial

Belial
  • Members
  • 91 posts
  • Real Name:Vitor Che

Posted 05 July 2012 - 08:05 PM

View Post14steve14, on 05 July 2012 - 09:21 AM, said:

You have two choices. You can add the image code to replace the text in your index.php, or you can open your includes.languages/english/index.php and replace the text with just an image. Its up to you really.

I have this code on languages/english/index.php

define('HEADING_TITLE', 'Welcome to ' . STORE_NAME);

Can you tell me please if i put the image to images folder and name the image welcome.png how will be the code correctly?

Thanks a lot for all.

#8   14steve14

14steve14

    STORE OWNER NOT CODER

  • Members
  • 3,113 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 06 July 2012 - 07:26 AM

View PostBelial, on 05 July 2012 - 07:53 PM, said:

I name my image welcome.png and uploaded to folder images. Then i replace the code and set the http://catalog/images/welcome.png  but it doesn't work.

Am i do something wrong?

http://catalog/images/welcome.png is wrong. You have missed the website location ie www . what ever your website name.com/ then add catalog. The other way to do it is to just add images/welcome.png.  I would suggest you look on the internet and learn some basic html.
REMEMBER BACKUP, BACKUP AND BACKUP
I am not a coder, so dont bother sending PMs asking for help as you wont get any.  

OSC has a steep learning curve, but in general the program does work.  If it doesnt work, the chances are it is something you have done.

#9 ONLINE   burt

burt

    Code Monkey

  • Community Team
  • 7,871 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 06 July 2012 - 08:32 AM

IF you use(d) my method, then the image needs to be in the languages directory.

/includes/languages/{lng}/images/buttons/  HERE
Dummies guide to designing osCommerce 2.3 Click Me

Or maybe a ready made theme for your shop ??

Warning: My posts may contain Horsemeat.

#10   Belial

Belial
  • Members
  • 91 posts
  • Real Name:Vitor Che

Posted 06 July 2012 - 08:46 AM

Ok i fix it. I did the method on includes/index.php and replaced the

<h1><?php echo HEADING_TITLE; ?></h1>

to my image.

Thanks a lot.

Edited by Belial, 06 July 2012 - 08:46 AM.