Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Images for Next/Previous Page Links


Recommended Posts

Hi all,

 

I'm trying to figure out how to use images (left and right arrows) instead of the "Previous" and "Next" buttons in the product listing.

 

Any ideas?

 

Thanks in advance and regards from Madrid.

Link to comment
Share on other sites

Hi Simon,

 

Thanks, I'm basically looking for info, clues, hints, etc... and I think it might be useful for others too. I prefer to do things myself so that I know what's going on. I'm not exactly a "newbie" with programming stuff so it shouldn't be a problem.

 

I'd probably be able to figure it out but I'm in a hurry so if you (or anyone) could point me in the right direction I'd really appreciate it.

 

Cheers.

 

PS. Is it possible to simply add an html image reference instead of text in the appropriate language files? I tried it and it hasn't worked so far but I don't know if I may have done something wrong.

Edited by naiadomare
Link to comment
Share on other sites

OK, so I was being daft.

 

I've done what I said before i.e. I just added an image reference in the includes/languages/mylanguage.php files instead of "<< Previous" and "Next >>" and Robert is your Father's Brother!

 

Thanks all the same!

Link to comment
Share on other sites

Hi

 

show what you have done ( the code your using)

 

Hi, didn't have email notifications set as on. I decided not to use images for the arrows in the end and just tweaked the style sheet to make it prettier.

 

I basically changed the text inside the "define" in the language files to the html for an image. I decided I didn't like it pretty quickly but I would have added<div class/id="whatever"></div> tags in there too in order to do fine tuning from the stylesheet. I know it's very "hacky" but this technique of sticking html where text would normally go has helped me do loads of things now that I think about it.

 

For example, the code to output the flash header on my site in the correct language just uses this technique to add in the correct file path depending on the chosen language. It's really handy when you need to stick html in somewhere and you're not sure how. When I've needed to put tables, text, images, etc... all mixed up and in two languages or something in a page, I just write the page as if it were normal html and then copy and paste that into a "define" in the appropriate language file and output it in the body of the appropriate main php file. (my site's a bit weird but I hope you know what I mean)

 

An example of outputting an image instead of text:

 

First you put whatever you want to go instead of text in the includes/languages/yourlanguage.php (or /yourlanguage/yourfile.php):

 

define('IMAGE_HERE', '<img src="/yourstore/images/yourimage.png" width="whatever" height="whatever" />');

 

Then you output it wherever you want in the main file like this:

 

<?php echo IMAGE_HERE; ?>

 

 

I've just opened the shop yesterday and have put a feedback thread here:

 

http://www.oscommerce.com/forums/index.php?showtopic=302114

 

All criticism welcome.

 

Regards from Madrid!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...