View Full Version : AWS - selecting items for display (ASIN)
MarkB
07-05-2004, 01:57 AM
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!
Chris
07-05-2004, 08:26 AM
You could use the code, you just edit the way you get the ASIN.
MarkB
07-05-2004, 09:04 AM
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?
Best.Flash
07-05-2004, 09:09 AM
I came up against the same issue with authors, here's how I fixed this.
in your for loop setup an Author array:
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
MarkB
07-05-2004, 09:23 AM
Thanks Charlie! I'd actually found a solution, but your's is much tidier and logical (so I'm using it instead;)).
Cheers!
Mark
MarkB
07-05-2004, 11:06 AM
Welp, got it finalised :) http://www.buymetal.net/
Thanks for the help, chaps!
Best.Flash
07-05-2004, 01:00 PM
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.
MarkB
07-06-2004, 03:24 AM
Alas no, just using a script to pull data from dmoz directly...
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.