Results 1 to 10 of 10
  1. #1
    ABW Ambassador Radegast's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,978
    Possible to display random single products?
    Hi

    I'm using:

    <!--#include virtual="../cgi-bin/ae.pl?ssi&type=search&mode=books&pagesize=1&first=1&keyword=<KEYWORD>" -->

    in an shtml file.

    Is it possible for "first=1" to display a random number, so a different book is shown each time? I have a large site where I would like to break up the content with individual books, and don't want the same books showing on every page (and don't want to manually edit every include!)

    Hope that makes sense. I can't think of a way of doing it.

    Thanks :-)

  2. #2
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    See: ASIN List Searches in the AE documentation.

    Note that ASIN Lists are static; you have to create them yourself. If Amazon.com adds more relevant books, you'll have to manually update your ASIN list.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  3. #3
    ABW Ambassador Radegast's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,978
    Yes!

    That works.

    Many thanks!

  4. #4
    Member
    Join Date
    March 16th, 2005
    Posts
    59
    This is great, except that I can't get it to show in grid format.

    I have

    <script src="http://www.recipenet.co.uk/cgi-bin/books.pl?script&asinsearch=mylist&grid=c:1,p,b,u"></script>

    what have I done wrong?
    Last edited by Babrees; December 2nd, 2006 at 01:16 AM.

  5. #5
    ABW Ambassador Radegast's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,978
    I think you have to specify the number of books you want in the grid.

    Try changing 'mylist' to 'mylist:6' or however many you want

  6. #6
    Member
    Join Date
    March 16th, 2005
    Posts
    59
    Quote Originally Posted by Radegast
    I think you have to specify the number of books you want in the grid.

    Try changing 'mylist' to 'mylist:6' or however many you want
    Thanks - just tried it but it doesn't make any difference

    Here it is, if it helps...

    http://www.recipenet.co.uk/index.php...laycat&catid=9

  7. #7
    ABW Ambassador Radegast's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,978
    In your source code you have

    '/cgi-bin/books.pl?script&asinsearch=mylist:1&grid=c:1,p,b,u1'

    and it's showing one - the Jamie Oliver book...

  8. #8
    Member
    Join Date
    March 16th, 2005
    Posts
    59
    Quote Originally Posted by Radegast
    In your source code you have
    '/cgi-bin/books.pl?script&asinsearch=mylist:1&grid=c:1,p,b,u1'
    and it's showing one - the Jamie Oliver book...
    yep, as I said in my first post - it works fine but it's not showing as a GRID - as it is it is too big for the page, pushing that column too wide and the center down so it has a gap at the top. I need it in a grid as per the script, so the column remains the same width as the left hand column.

  9. #9
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    Use:

    /cgi-bin/books.pl?script&asinsearch=mylist:2&grid=c:1,r:1,p,b,u1

    The mylist:2 part makes the results have two products; then the grid=c:1,r:1 displays results in a 1x1 grid but since a 1x1 grid can only hold one product, only one product is shown.

    This work-around is required because if the results have only one product and the asinsearch.format variable is set to display results locally then the result (i.e.: one product) is shown using the asinsearch.format format even if a grid is specified.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  10. #10
    Member
    Join Date
    March 16th, 2005
    Posts
    59
    Thank you David - works a dream

  11. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Popshops Autofeed, pulling in random products.
    By Carl Haley in forum Midnight Cafe'
    Replies: 3
    Last Post: December 4th, 2011, 09:33 AM
  2. Display Random Item
    By jazzylee77 in forum PopShops
    Replies: 3
    Last Post: August 31st, 2010, 08:15 AM
  3. How to display products on my website?
    By kinpan in forum Commission Junction - CJ
    Replies: 5
    Last Post: October 7th, 2008, 09:21 PM
  4. Random Products
    By jackson992 in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: February 21st, 2007, 02:00 AM
  5. How to display products?
    By bbb in forum Midnight Cafe'
    Replies: 1
    Last Post: August 31st, 2003, 11:14 AM

Posting Permissions

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