Results 1 to 8 of 8

Thread: AWS - selecting items for display (ASIN)

  1. #1
    Web Monkey MarkB's Avatar
    Join Date
    Nov 2003
    Location
    London, UK
    Posts
    1,783

    AWS - selecting items for display (ASIN)

    Hi guys,

    I want to create an index page for my AWS stores, where I personally select items to display (such as hot new items getting good press, etc). My thinking is to store the ASINs in a database, pull them via PHP and then somehow get the info on them from Amazon via AWS (using Dan's script).

    But the big question is... how do I do this? Could I use the code from Dan's product.php file (I imagine that would make for a cumbersome loadtime though)...

    Any help is appreciated!
    Stepping On Wires - the new blog

  2. #2
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    You could use the code, you just edit the way you get the ASIN.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  3. #3
    Web Monkey MarkB's Avatar
    Join Date
    Nov 2003
    Location
    London, UK
    Posts
    1,783
    I have it ALMOST working now - the only bug is that the first author/artist is duplicated in the second record (along with its artist), and then both are in the third, and so on...

    I'm sure this is to do with the foreach argument, but how could I make it only run that against THAT record's artists/authors and not every one previous as well?
    Stepping On Wires - the new blog

  4. #4
    Resident smart a$$
    Join Date
    Sep 2003
    Location
    UK
    Posts
    152
    I came up against the same issue with authors, here's how I fixed this.

    in your for loop setup an Author array:

    PHP Code:
    for($j=$i_ar['Details'][$i]; $j<$i_ar['Details'][$i+1]; $j++) {                 

    $Author[] = $d_ar[$j]['value'];
                                

    }


    # Then where your displaying authors:


                
    if ($Author) { 

    $add_comma implode(", "$Author);
                    echo 
    $add_comma;
                }
    # Strip Author array
    unset($Author); 
    Hope that helps.

    Cheers,

    Charlie
    Last edited by Best.Flash; 07-05-2004 at 09:15 AM.

  5. #5
    Web Monkey MarkB's Avatar
    Join Date
    Nov 2003
    Location
    London, UK
    Posts
    1,783
    Thanks Charlie! I'd actually found a solution, but your's is much tidier and logical (so I'm using it instead).

    Cheers!
    Mark
    Stepping On Wires - the new blog

  6. #6
    Web Monkey MarkB's Avatar
    Join Date
    Nov 2003
    Location
    London, UK
    Posts
    1,783
    Welp, got it finalised http://www.buymetal.net/

    Thanks for the help, chaps!
    Stepping On Wires - the new blog

  7. #7
    Resident smart a$$
    Join Date
    Sep 2003
    Location
    UK
    Posts
    152
    Hey np Mark

    Nice site! did you do the DMOZ import yourself for the directory?

    Wouldn't mind picking your brain if so as im looking to setup a DMOZ dump myself at the moment and am struggling a bit with the 1.8 gig RDF file.
    Last edited by Best.Flash; 07-05-2004 at 01:02 PM.

  8. #8
    Web Monkey MarkB's Avatar
    Join Date
    Nov 2003
    Location
    London, UK
    Posts
    1,783
    Alas no, just using a script to pull data from dmoz directly...
    Stepping On Wires - the new blog

Bookmarks

Posting Permissions

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