This has to be done carefully as search results are generated by a summary query and the ID of the $product record (within the search results loop in html/searchresults.php file is not defined to be any particular merchant (e.g. cheapest) if there are more than one merchant for the product.
However, it is easy to add a "Buy Now" link if numMerchants is 1 as in that case the ID is guaranteed to be the ID of that one (and only) merchant. If you'd like to try this, you can add a Buy Now link below the More Information / Compare Prices link as follows. In html/searchresults.php look for the following code at line
Hi Michael,
This has to be done carefully as search results are generated by a summary query and the ID of the $product record (within the search results loop in html/searchresults.php file is not defined to be any particular merchant (e.g. cheapest) if there are more than one merchant for the product.
However, it is easy to add a "Buy Now" link if numMerchants is 1 as in that case the ID is guaranteed to be the ID of that one (and only) merchant. If you'd like to try this, you can add a Buy Now link below the More Information / Compare Prices link as follows. In html/searchresults.php look for the following code at line
<?php endif; ?>
...and REPLACE with:
<?php endif; ?>
<?php if ($product["numMerchants"]==1): ?>
<br />
<a href='<?php print tapestry_buyURL($product); ?>'>Buy Now</a>
<?php endif; ?>
Cheers,
David.
--
PriceTapestry.com