You are here:  » Jump.php link on search results

Support Forum



Jump.php link on search results

Submitted by mikecdprice on Tue, 2011-09-20 09:54 in

Hello,

Is it possible to have a tracking link jump.php in the product search results listing like a visit now and details option?

Thank you,
Michael

Submitted by support on Tue, 2011-09-20 11:51

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

Submitted by mikecdprice on Tue, 2011-09-20 16:01

Hello David,

Thank you. That works like a charm.

Have a great day!
Michael