
Originally Posted by
GillS
Thankyou Phil - even "Justicia carnea_a.jpg" would do, perhaps you could point me in the right direction for doing this? I'd like it to be more obvious to the prospective customer to see that there are different varieties of the same plant, in most cases different flowers colours. I think this is more important to them, than it is to me. Just a thought - on our home page the featured plants (products) at the bottom have the correct alt text, that's what put me in mind for doing the same on the prod info page.
you could just use the filename and use string replace to remove the .jpg ?
but as schoolboy has pointed out, additinal images are intended as additional views of the same item generally, but I guess if you are selling different variations using attributes that could work too. I am assuming this is what you are trying to do? trying to match the image to an attribute option?
if so, it would probbaly be better to as well as using alt text maybe output some text under the image aswell.
so for your alt you probably want to do something like:
PHP Code:
$products_name = str_replace(".jpg","",$file);
$script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascript:popupWindow(\\\'' . str_replace($products_image_large, urlencode(addslashes($products_image_large)), $large_link) . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '<br />' . $products_name . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
$noscript_link = '<noscript>' . ($flag_display_large ? '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large) . '" target="_blank">' . $thumb_regular . '<br /><span class="imgLinkAdditional">' . TEXT_CLICK_TO_ENLARGE . '</span><br />' . $products_name . '</a>' : $thumb_regular ) . '</noscript>';
not tested.. backup before you try this..