speed2 Posted November 22, 2003 Posted November 22, 2003 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>
Yari Posted November 22, 2003 Posted November 22, 2003 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 ?
speed2 Posted November 22, 2003 Author Posted November 22, 2003 I have "CLick to Image" as a image file in /image folder and I would like to replace that image file with the default text ??? Hope you got it now!
Guest Posted November 23, 2003 Posted November 23, 2003 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
speed2 Posted November 23, 2003 Author Posted November 23, 2003 I will try my best again For example: Image.gif then we have click here to Enlarge "text" I want to add a magnifi glass image to the click here to enlarge text hope this explain
Guest Posted November 23, 2003 Posted November 23, 2003 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
speed2 Posted November 23, 2003 Author Posted November 23, 2003 HI, thanks, I added your code, but some reason the image is not loading and I have the image in /enclude/language/image/button Any idea why?
Guest Posted November 23, 2003 Posted November 23, 2003 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
speed2 Posted November 23, 2003 Author Posted November 23, 2003 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.
Guest Posted November 23, 2003 Posted November 23, 2003 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.
Guest Posted November 23, 2003 Posted November 23, 2003 Thanks Steve, I got it! No problem. We learn as we go.
Guest Posted November 23, 2003 Posted November 23, 2003 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.