How do I add button images to the searchresults.php instead of the text "Compare Prices" and "More Information" below?
<?php if ($product["numMerchants"] > 1): ?>
<em><?php print translate("from"); ?></em> <strong><?php print $config_currencyHTML.$product["minPrice"]; ?></strong><br />
<span class='nobr'><a href='<?php print $product["productHREF"]; ?>'><?php print translate("Compare Prices"); ?></a></span>
<?php else: ?>
<strong><?php print $config_currencyHTML.number_format($product["price"],2); ?></strong><br />
<span class='nobr'><a href='<?php print $product["productHREF"]; ?>'><?php print translate("More Information"); ?></a></span>
<?php endif; ?>
Thanks
Hi,
You could use the following alternative to the above code:
<?php if ($product["numMerchants"] > 1): ?>
<em><?php print translate("from"); ?></em> <strong><?php print $config_currencyHTML.$product["minPrice"]; ?></strong><br />
<span class='nobr'><a href='<?php print $product["productHREF"]; ?>'><img src='/images/compareprices.gif' border='0' /></a></span>
<?php else: ?>
<strong><?php print $config_currencyHTML.number_format($product["price"],2); ?></strong><br />
<span class='nobr'><a href='<?php print $product["productHREF"]; ?>'><img src='/images/moreinformation.gif' border='0' /></a></span>
<?php endif; ?>
This assumes the following images existing on your site:
/images/compareprices.gif
/images/moreinformation.gif
...so they may need to be corrected if necessary; also if your installation is in a sub-directory don't forget to add the directory name to the front of the image paths (beginning with /)
Hope this helps!
Cheers,
David.