Support forum login

©2006-2012 IAAI Software

Contact Us Privacy Policy

Amazon BUY URL link open in NEW WINDOW

Submitted by shoppersbase on Mon, 2011-11-28 16:29.

Hi

I implemented the above feature reading one of your earlier post and I included this in my amazon.php script like this

print "<nobr><a target='_BLANK' href='".$item["DETAILPAGEURL"]."'>More Information</a></nobr>";

How this still doesn't work. Also I would like to do the same for the IMAGE URL

please help

Joseph

Submitted by support on Mon, 2011-11-28 16:38.

Hi Joseph,

The above looks fine - target='_BLANK' should be all that is required to open links in a new window - if you would like to email me your working amazon.php I'll check the code and also add open in new window to the image as a link...

Cheers,
David.
--
PriceTapestry.com

Submitted by shoppersbase on Mon, 2011-11-28 17:02.

Hi

here is my Amazon.php code

{code saved}

thanks

Joseph

Submitted by support on Mon, 2011-11-28 17:21.

Hi Jospeh,

Within your amazon.php the section of code where each result is output is the myAmazonRecordHandler() function. To have all links open in new window, and also to make the image the same link, replace that function in your working version with:

  function myAmazonRecordHandler($item)
  {
    global $amazonItemMax;
    global $amazonItemCount;
    global $config_currencyHTML;
    $description = "";
    foreach($item as $key => $value)
    {
      if (strpos($key,"FEATURE"))
      {
        $description .= $value.". ";
      }
    }
    print "<tr>";
    print "<td>";
    print "<a target='_BLANK' href='".$item["DETAILPAGEURL"]."'><img border='0' width='80' src='".$item["SMALLIMAGE/URL"]."' /></a>";
    print "</td>";
    print "<td width='50'>&nbsp;</td>";
    print "<td valign='middle'>";
    print "<h4><a target='_BLANK' href='".$item["DETAILPAGEURL"]."'>".$item["ITEMATTRIBUTES/TITLE"]."</a></h4>";
    print "<p>".$description."</p>";
    print "</td>";
    print "<td width='50'>&nbsp;</td>";
    print "<td valign='middle' align='center'>";
    print $config_currencyHTML.tapestry_decimalise($item["OFFERSUMMARY/LOWESTNEWPRICE/FORMATTEDPRICE"])."<br />";
    print "<nobr><a target='_BLANK' href='".$item["DETAILPAGEURL"]."'>More Information</a></nobr>";
    print "</td>";
    print "</tr>";
    $amazonItemCount++;
    if ($amazonItemCount==$amazonItemMax) return TRUE;
  }

Cheers,
David.
--
PriceTapestry.com