Sorry for all the questions I have searched the forum for this and can't find anything but I'm sure it's come up before.
If I want a merchant image instead of text for the 'Best Price' merchant how would I go about it?
I want to do something similar to what I did in prices.php with this code:
<?php
if (file_exists("logos/".$product["merchant"]))
{
print "<a target='_BLANK' href='".tapestry_buyURL($product)."'><img border='0' src='".$config_baseHREF."logos/".$product["merchant"]."' alt='".$product["name"]."' /></a>";
}
else
{
print " ";
}
?>
I really must sit down and learn php!!
Cheers,
Chris.
Hi Chris,
The code to display the merchant name (and associated affiliate link) is
as follows from line 28 of includes/product.php
<a href='<?php print tapestry_buyURL($priceProduct); ?>' <?php print javascript_statusBar(translate("go to")." ".$priceProduct["merchant"]); ?>><strong><?php print $priceProduct["merchant"]; ?></strong></a><br />
So to replace that with images in a similar way to prices.php; REPLACE
the above with:
<?php if (file_exists("logos/".$mainProduct["merchant"])):?>
<a href='<?php print tapestry_buyURL($priceProduct); ?>' <?php print javascript_statusBar(translate("go to")." ".$priceProduct["merchant"]); ?>><img border='0' src='<?php print $config_baseHREF."logos/".$mainProduct["merchant"]; ?>' /></a><br />
<?php else: ?>
<a href='<?php print tapestry_buyURL($priceProduct); ?>' <?php print javascript_statusBar(translate("go to")." ".$priceProduct["merchant"]); ?>><strong><?php print $priceProduct["merchant"]; ?></strong></a><br />
<?php endif; ?>
Hope this helps!
Cheers,
David.