Zen Follower
- Join Date:
- Dec 2004
- Posts:
- 102
- Plugin Contributions:
- 0
Adding alt text to an image
** I want to change the image alt to repeat the product description instead of the title on the product listing page. **
I think I have it narrowed down to changing the section in html_output.php
if (zen_not_null($alt)) {
$image .= ' title=" ' . zen_output_string($alt) . ' "';
}
I think I need to rephrase the $alt with something along the lines of:
. zen_trunc_string(/zen_clean_html/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) .
or
. zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($new_products->fields['products_id'], $_SESSION['languages_id']))), 150));
this does not seem to be working.
I currently have the description showing on the product listing (category) page. I want to cut out the actual text on the page (I can do this with no problem because I am the one who put it there) and make it show as alternate text (I cannot figure out how to do this). I am then going to add pictures of my attributes in place of the actual text on the page (I figured that out already also).
Does anyone know how to write the code to replace the alt text for the image with the product description (that is on the product info page in a stock zen cart)?
I have tried searching and I can't find a relevant post. If there is one, please direct me to the link. Thanks in advance.