Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    January 18th, 2005
    Location
    Las Vegas
    Posts
    61
    At one time there was a results variable called something like urlkeyword, but the docs seem to indicate that it is not support by amazon.pl.

    What I'm trying to do is to avoid building results pages. Let's say I have a direct link like this:

    http://www.mydomain.com/cgi-bin/amaz...=john+travolta

    I'm using one template with a simple {results} statement in it. This works great.

    However, I'd like to expand the results of this standard template to include a blended search of the same keywords. Is there any variable that can be used to pick up the keywords for use in other results (maybe even other product categories)?

    Thanks again! I just moved to Las Vegas and finally got back to building sites!

    Bryan

  2. #2
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    The substitution variable {urlkeyword} was added into amazon.pl XML as of v2.11.25

    In your results template, you can use the following <script> to show a blended search:

    <script src="/cgi-bin/amazon.pl?script&type=search&mode=blended&keyword={urlkeyword}">

    Note: The above &lt;script> should only be used if the "primary" request has keywords specified. If no keywords are passed to this secondary request, it will return the default results which are "bestselling books". To get around this, copy amazon-template/amazon.html to amazon-template/withblended.html (or whatever filename you prefer) and add the above script tag. Then when you want to use this secondary template, add template=withblended to your link; if you're using a form then add a hidden form parameter: <INPUT TYPE=HIDDEN NAME=template VALUE=withblended> --- In the future, it will be possible to enclose the &lt;script> tag with {if form.keywordsearch} ... {endif} so that the &lt;script> tag will be included only if keywords are specified in the primary request; thus only one results template will be necessary.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  3. #3
    Member
    Join Date
    January 18th, 2005
    Location
    Las Vegas
    Posts
    61
    I just tried the {if form.keywordsearch} ... {endif} solution and it works great. In fact, I used this code to surround my entire section that says something like "Other results from Amazon.com com..." so if there aren't valid keywords passed through, no error message is displayed and both my &lt;script> and text are hidden. Very cool!

    Bryan

  4. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. The Results of '05
    By Haiko de Poel, Jr. in forum The Best in 2005
    Replies: 21
    Last Post: December 29th, 2006, 06:03 AM
  2. Weird results on More Results
    By forefront in forum Cusimano.com Scripts
    Replies: 3
    Last Post: February 16th, 2005, 05:10 PM
  3. Results page question
    By mrkarron in forum Cusimano.com Scripts
    Replies: 1
    Last Post: December 19th, 2003, 10:58 AM
  4. question about hosting overture results
    By bigchuck in forum Midnight Cafe'
    Replies: 1
    Last Post: July 29th, 2003, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •