Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Remove 'Click to enlarge' when image is no_picture.gif

Remove 'Click to enlarge' when image is no_picture.gif

Views: 953

Results 1 to 2 of 2
15 Mar 2012, 5:09 PM
#1
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Remove 'Click to enlarge' when image is no_picture.gif

Hi

how can I remove the 'Click to enlarge' text, as well as the hyperlink over my product images when there is no product image (when the image is no_picture.gif)

It seems pointless that there should be an option to view a bigger image of an image that says 'no image'

Here is my website:
pcselect.co.za/index.php?main_page=product_info&cPath=0&products_id=3224

All help appreciated :)

Thanks
S

17 Mar 2012, 6:10 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,089
Plugin Contributions:
56

Re: Remove 'Click to enlarge' when image is no_picture.gif

You can start with /includes/modules/pages/product_info/main_template_vars.php. Search for the string "PRODUCTS_IMAGE_NO_IMAGE" and set a true/false flag in that code block based on whether or not the main product image exists. Make a copy first, since this is a core file override.

Now edit/create /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_main_product_image.php (if you're creating it, copy it from the template_default subdirectory). Each place where the code fragment

<span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span>

exists, only output that code when your true/false flag indicates that the image file was found.