Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding a Image to "CLick to Enlarge"?


speed2

Recommended Posts

Hi, I tried to add a image to "Click to Enlarge" but for some reason its not working

 

Some one please help me, Here is the actual code

 

<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>

Link to comment
Share on other sites

Hi.

 

The code look right to me, but what do you meen when you say you try to add an image to "Click to Enlarge" ? The image is inserted in the admin panel when you add an product and then it will be viewable in the catalog. Do you have an URL so we can check if we see anything wrong ?

Link to comment
Share on other sites

I'm not sure that I understand what you want to do either. However, I was wondering if you realized that the code you posted only matters if the browser has javascript disabled. Otherwise, it would use the javascript code immediately above it in the file.

 

Hth,

Matt

Link to comment
Share on other sites

Replace

SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

with

SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . tep_image('Image.gif') . '</a>'; ?>

and do the same in the other places where TEXT_CLICK_TO_ENLARGE appears as that code only is used in browsers that do not use the javascript code.

 

Hth,

Matt

Link to comment
Share on other sites

Change the function from tep_image to tep_image_button.

 

Or move the file into the images/ folder. It only needs to be in the buttons folder if it is language dependent (i.e. you want a different image in other languages).

 

Hth,

Matt

Link to comment
Share on other sites

Hi Matt, once I added the full path to the image, its start to work! thanks a lot!

 

Do you know how to add a search box outside ?

for example, I am using STS template and I would liek to add a search bar at the top.

Link to comment
Share on other sites

Simple way is to just add an image tag in:

catalog/includes/languages/english/product_info.php

 

Look for this:

define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge');

 

You can change the text that says: Click to enlarge

To anything you want it to say or you can replace it with an image.

 

Example:

I put an Zoom graphic in place of Click to enlarge by adding the image I wanted to use in the /images folder and then replaced the Click to enlarge text with this.

 

<img border="0" src="/shop/images/boxes/zoom.gif" width="61" height="24">

 

So the whole thing looks like this:

 

define('TEXT_CLICK_TO_ENLARGE', '<img border="0" src="/shop/images/boxes/zoom.gif" width="61" height="24">');

 

Don't forget to change zoom.gif to what every the name of the image you use is and change the width and hight to fit the image you use.

 

Basiclly you can do this for most of the things that start with

define('TEXT_....

 

This is how I did my box headers also.

To do that you have to look in the /includes/english.php

Or what ever your language is.

 

Example:

// categories box text in includes/boxes/categories.php
define('BOX_HEADING_CATEGORIES', '<img src="/shop/images/cats.gif" width="155" height="19">');

 

Hope this helps someone if you don't understand or I did not explain clearly enough just email me.

Link to comment
Share on other sites

This is how I did my box headers also.

To do that you have to look in the /includes/english.php

Or what ever your language is.

 

Example:

// categories box text in includes/boxes/categories.php
define('BOX_HEADING_CATEGORIES', '<img src="/shop/images/cats.gif" width="155" height="19">');

 

Hope this helps someone if you don't understand or I did not explain clearly enough just email me.

I said:

To do that you have to look in the /includes/english.php

 

I ment:

/includes/lanuages/english.php

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...