Zen Follower
- Join Date:
- Jul 2004
- Location:
- Las Vegas
- Posts:
- 327
- Plugin Contributions:
- 0
defining images in zencart with a class tag
I want to add a border to my product images in the listing page, the product page and in the additional boxes on the front page.
I am unable to because there is no unique class tag for each img group. I want to add this tag but am not sure how to.
I looked at several this that helped me get closer I believe, however; I dont know what to do now that I found them. Please shed some light.
Here's what I found
in templates/ ... for the main image inside of a product page
<?php echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>
Which I then edited to look like this..
<?php echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'class="mainProductImage"') . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>
because i noticed in product listing page for a category had a class to define them with. i found the code for the in
includes/modules/product_listing.php which looks like this...
zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"')
but when I updated the tpl_modules_main_product_image.php to include the newly added class tag as in the example I included I did not get the result I was looking for. No class in the tag.
What did I do wrong?
Avel
User of zencart