Hi David,
Hope all's well, I had a look around for this in the support forum but couldn't get it to work.
I'm using external.php and am trying to link products direct to the merchant from the search results (as opposed to a product information page).
Not sure which bit of code I need to modify?
Many Thanks
Stew
Hi David,
Am having a bit of trouble with this one, in my external.php I had the line:
$rows[$k]["productHREF"] = $external_productBaseHREF."?product=".urlencode(tapestry_hyphenate($row["normalised_name"]));
So I exchanged for the following:
$rows[$k]["productHREF"] = $row["buy_url"];
However within my searchresults.php when I click on any links I still end up on the product page (and not the merchant page).
The links within my searchresults.php look like so:
<h2><a href="<?php print $product["productHREF"]; ?>">
and:
<a class="more-info" href="<?php print $product["productHREF"]; ?>">Buy Now</a>
any ideas what I'm doing wrong?
Many Thanks
Hi Stew,
In place of
$rows[$k]["productHREF"] = $external_productBaseHREF."?product=".urlencode(tapestry_hyphenate($row["normalised_name"]));
...just use:
$rows[$k]["productHREF"] = tapestry_buyURL($row);
Cheers,
David.
--
PriceTapestry.com
Hi David,
Thanks for that - not sure what Im doing wrong here?
I changed the row in external.php to:
$rows[$k]["productHREF"] = tapestry_buyURL($row);
but my search result links still point to the product page.
Any ideas?
Many Thanks,
Stew
Hi Stew,
I think you may have changed the product page version (around line 210) - for the search results it's actually this code at line 510:
$searchresults["products"][$k]["productHREF"] = $internal_baseHREF."product=".urlencode($product["name"]);
...REPLACE that with:
$searchresults["products"][$k]["productHREF"] = tapestry_buyURL($product);
Cheers,
David.
--
PriceTapestry.com
Hi Stew,
In your external.php, search for each line containing the text productHREF, for example line 221:
$rows[$k]["productHREF"] = $internal_baseHREF."product=".urlencode($row["name"]);
...and REPLACE the part after the = sign with, for example:
$rows[$k]["productHREF"] = $row["buy_url"];
(the variable name will either be $row["buy_url"], $product["buy_url"] or $related["buy_url"] - just use the same as $___["name"] in the original code. If you're not sure of course email your external.php to me and I'll make the changes...
Cheers,
David.
--
PriceTapestry.com