I originally had coded the first option from Melanies "customizing-google-snippets-with-schema-org-microdata" to give google images for my products. But although I got no errors in googles testing tool. For months google seems to have ignored my rich snippets (also I have cross selling on my website) so there were a lot more images I didnt need appearing for some of the products.
I thought that I would rework the coding and try the 2nd image option mentioned by Melanie ...
Second Option In includes/templates/your_template/tpl_modules_main_product_image.php
find 2 instances of
<span class="imgLink">
and change to
<span itemprop="image" class="imgLink">
Im having problems because I dont have 2 instances of <span class="ImgLink"> to change. There is only one instance. Please could someone tell me what changes to make to the coding to get my main product image url displayed in rich snippets instead of the wording "larger image".
This is currently the display Im getting in the google testing tool
And this is my coding for tpl_modules_main_product_image.php.
<?php
/**
* Module Template
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0
*
@version $Id: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $
*/
?>
<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?>
<div id="productMainImage" class="centeredContent back">
<script language="javascript" type="text/javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span itemprop="image" class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
//--></script>
<noscript>
<?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 itemprop="image">' . TEXT_CLICK_TO_ENLARGE . '</span></a>';
?>
</noscript>
</div>