Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add images to 2.3 webstore home page


acedave

Recommended Posts

Hello,

 

I am setting up a webstore in osCommerce 2.3.

I want to be able to add an image below the Welcome text and above the "New Products" text.

 

I just don't know how to do this.

 

I was informed that I can edit the text on the home page using Admin -> Tools -> Define Language.

If this is correct?

What file do I edit? english.php or index.php?

 

Even if the above is true - I still need a way to add am image to the home page.

 

If any one know how to do this, please reply.

 

If you have any suggestions/tips about the image format would also be welcome (gif/jpg/png, how many pixels wide, alignment = left, center, right. etc).

 

 

Thank you

 

Dave

Link to comment
Share on other sites

I too am trying to figure out how I can put a nice photo image on the Welcome page under where it says "Guest". It is just too boring looking with all that white space. Can someone give us directions as to how we do this? I would assume it means editing some .php file and putting in the /images/name.jpg and size????

Any help sure would be appreciated!!

Link to comment
Share on other sites

@@acedave

I did this in the english index.php

Here's how I changed the line:

 

define('TEXT_MAIN', '<image src=images/eatingjelly.jpg width="300" height="300" alt="Kids Eating Millcroft Farms Jelly"align="center">');

 

You would just change to the name, size and alt for your own image

Good luck

 

Not knowing anything about php editing this has been a real challenge for me.

Link to comment
Share on other sites

Glad you got it sorted, but that is not php editing, its basic html coding. You should not really use html to format an image size, you should really produce an image the size you want.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Well done getting it working but Steve was only trying to be helpfull.

 

If you create the image the right size then there is no need to resize it when it is being displayed in someones browser.

 

That helps the page load faster!!

 

If you want to find out more about html / php / css the try www.w3schools.com.

 

It has got loads of excellent tutorials.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

:-)

 

It is interesting how something comes over differently to different people.

 

To a non-it person Steve's avice wasn't clear as to why he said what he did but as with most advice offered it as offered with the best of intensions.

 

Now I think I'll duck.

 

Cheers

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

@@geoffreywalton

 

I did create the image the exact size I wanted it. I did not put the size in to change it. That is the size i wanted it to be. Sorry, but I am not a techie, I am self taught and I do things as best I know how. If it works I am happy. If it doesn't then I ask someone and learn from them.

 

I was not being ungrateful just stating what I did.

I appreciate everything everyone shares because that is the only way I learn

Thank you.

Link to comment
Share on other sites

Glad it all worked out in the end.

 

Cheers

 

G

 

PS Must learn to spell. Got 2 wrong in one post. Advice and intentions

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

  • 3 months later...

Thanks for all the help everyone I managed to get my images on my index page today.

What I cannot do is add a hyperlink from my images to other parts of my site using the ahref tag.

I know it is html and I thought if the img srce worked maybe the htlml tag would work, no, no no.

I have seen this code amongst the forum but I do not know where to place the url.

Thanks in advance and a Happy healthy New Year

 

<TABLE WIDTH=565 BORDER=0 CELLPADDING=0 CELLSPACING=0>

<TR>

<TD>

<a href="' . tep_href_link(FILENAME_MYFILENAME) . '">'. tep_image(DIR_WS_IMAGES .'default/picture1.gif'). '</a></TD>

<TD ROWSPAN=2>'

. tep_image(DIR_WS_IMAGES .'default/picture2.gif').'</TD>

<TD>'

. tep_image(DIR_WS_IMAGES .'default/picture3.gif').'</TD>

</TR>

<TR>

<TD>'

. tep_image(DIR_WS_IMAGES .'default/picture4.gif').'</TD>

<TD>'

. tep_image(DIR_WS_IMAGES .'default/picture05.gif').'</TD>

</TR>

</TABLE>'

C

Link to comment
Share on other sites

It is possible to add links to other places on your site, but beware that you may lose your "session" when doing that. The consequences are that the shopping cart disappears and your customer is no longer logged on. Using the tep_href_link() call can preserve the session while getting to the outside page, but beyond that, you may have to change code in the rest of the site so you don't lose the session when the visitor clicks to the next page (anything but the browser "back" button?). Anyway, you're welcome to try, but you should thoroughly test such links to see what happens.

 

Is the above code your attempt at changing one fixed image to become a link? I don't have access to the osC code right now to check it, but I think the tep_href_link() will use defaults for everything but the URL. Of course, you have FILENAME_MYFILENAME (the URL) defined at this point? You may need to add border="0" on the image (or use CSS) to suppress the blue box. So, after all this, what do you get for HTML in your page, and how is it acting?

Link to comment
Share on other sites

  • 3 months later...

Sorry MrPhil, I had checked here a few times to no avail for my answer. I merely want to add some images on my homage as links to categories.

See www.pennylanegifts.co.uk

They are just images and have no links to the products they are promoting.

Thanks

Will bookmark just in case

Link to comment
Share on other sites

If you want to find out more about html / php / css the try www.w3schools.com.

 

It has got loads of excellent tutorials.

 

You can also look at how it is done in the php files e.g. privacy.php

 

<div style="float: right; width: <?php echo SMALL_IMAGE_WIDTH+20; ?>px; text-align: center;">

<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?>

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...