PDA

View Full Version : What AWS Script Do You Use?



Alastair
01-04-2004, 03:52 PM
I'm looking at opening a store, and I'd like to know what scripts people use and what they think of them as there are a few out there.

I imagine some of you have coded your own, which is above my depth, but what about the rest of you?

Thanks :)

Danny
01-04-2004, 04:16 PM
I have used Agora in the past for a shopping cart and I liked it.

Alastair
01-04-2004, 04:43 PM
By AWS I mean Amazon Web Services (I think that's what it's called), so what I'm looking for is a script to create categorized product listings linked to Amazon.com :).

GCT13
01-04-2004, 11:31 PM
Per your first questions, I haven't used any of the free scripts floating around so I can't comment on that.

I've created my own AWS script using PHP. More info on that can be found here (http://www.websitepublisher.net/forums/showthread.php?s=&threadid=506).

Alastair
01-05-2004, 12:27 AM
Thanks for the link, just read it all. It seems most people are using custom scripts they created themselves and the others are using modified scripts from elsewhere. I wish I learnt PHP not ASP because then I could modify PHP scripts easily and slap them on my hosting.

chromate
01-05-2004, 04:12 AM
If you work out how to use ASP with SOAP, it could be done just as easily.

MarkB
01-05-2004, 04:28 AM
I use Mr Rat's script, with the htaccess 'hack'. It has been slow to get started for me - there're just so many AWS-powered sites out there now.

My metal-focussed site (which has two domains pointed to it) is slowly picking up as far as traffic is concerned, but no real sales (just 1 or 2 items, if I'm not counting the 9 I bought for Xmas presents!). The pages are being indexed nicely by Google, though (8,000 or so this morning... my other AWS store has 30,000 or so indexed).

FWIW, Mr Rat's script is CGI.

Mike
01-05-2004, 09:02 AM
I was going to use Mr Rat's script, but didn't really want to shell out $50 for search engine friendly urls using mod_rewrite. So I have made my own (well, kinda:)) with the help from chromate and a tutorial.

MarkB
01-05-2004, 09:19 AM
Yeah, I think $50 is a bit rich - I was lucky enough to get it before the guy started charging for it. I'm glad I didn't have to pay for it, because I've made perhaps $30 in 3 months from using it LOL

Is there somewhere I can see your AWS script in action?

Update - 4 items ordered last night. Time to plan my retirement :p

Mike
01-05-2004, 11:53 AM
There will be in the next week or so:)

Alastair
01-05-2004, 02:49 PM
I'm not interested in using ASP to write it because my hosting and the rest of my site that will be using it is built in PHP.

Can someone please point me to Mr Rat's script?

Thanks :).

MarkB
01-05-2004, 03:03 PM
http://www.absolutefreebies.com/directory/aws/amazon-products-feed.html

The mod_rewrite 'hack' is sold seperately by a user known as 'Nintendo' for $50 - he posts on Mr Rat's forum, should you wish to get it from him... or you could just do it yourself for free :)

chromate
01-05-2004, 03:19 PM
I recommend the latter rather than the former option ;)

MattM
01-05-2004, 03:23 PM
Does anyone know of a tutorial about creating your own in PHP? I've tried Mr. Rat's script but I don't need a full store.

Alastair
01-05-2004, 03:31 PM
I better get started learning PHP, SSI, and .htaccess, mod_rewrite and so on (I was going to do it one day anyway but it looks like a good time to start)...

I've seen Nintendo wandering around Sitepoint too.

MarkB
01-05-2004, 11:35 PM
Matt, you can use Mr Rat's script to focus on a specific section/niche (see my www.buymetal.net for an example) by linking to a set node.

MattM
01-06-2004, 03:24 PM
Originally posted by MarkB
Matt, you can use Mr Rat's script to focus on a specific section/niche (see my www.buymetal.net for an example) by linking to a set node.
Thanks, I'll check it out. :)

chromate, on your sites, did you create your own or are you using a script?

chromate
01-06-2004, 04:30 PM
My own PHP script.

MattM
01-06-2004, 07:19 PM
Could someone post some sample code? I've downloaded the developers kit, and played around with the XML Scratch Pad, but I do not understand how to parse the XML feed. How can you do this through PHP?

flyingpylon
01-07-2004, 08:00 AM
Originally posted by MarkB
http://www.absolutefreebies.com/directory/aws/amazon-products-feed.html

The mod_rewrite 'hack' is sold seperately by a user known as 'Nintendo' for $50 - he posts on Mr Rat's forum, should you wish to get it from him... or you could just do it yourself for free :)

You might also want to do a search on the Amazon Associate board for posts from "strago" (Nintendo's user name on that board). I think he has actually posted most of his "hack" there.

I suggest that you look over the whole script and really consider what it impact it will have in terms of bandwidth, PR, etc. before putting it on your site. As is, it may have unintended consequences and you should fully understand what it's doing and look at places where you might make adjustments.

MarkB
01-07-2004, 08:41 AM
For the record, Nintendo goes by the name 'Nintendo' (see the moderator list, and his posts) on Mr Rat's forum.

MattM
01-07-2004, 03:45 PM
chromate, could you post some sample code?

GCT13
01-07-2004, 04:49 PM
Originally posted by MattM
I do not understand how to parse the XML feed. How can you do this through PHP? There's many different ways to parse XML with PHP. I went through a few parsing examples I found on various sites before I settled with something I was comfortable with.

I'd recommend you search google for "php parse xml" or "php parse xml tutorial".

GCT13
01-07-2004, 04:59 PM
MattM, parsing the feed is important, but understanding the subtleties of the feed itself is also critical for AWS. Using the Developer's XML Scratch Pad, could you create the following feeds?

- Lite DVD search sorted by sales for Drama DVDs.

- Lite DVD search sorted by featured product for the keyphrase: "Lord of the Rings".

- Heavy DVD search that only brings up Finding Nemo's product info.

chromate
01-07-2004, 05:06 PM
MattM, make life easier for yourself and use PHP with SOAP. That will handle the XML for you. All you then have to do is concentrate on how to use the functions.

MattM
01-07-2004, 05:12 PM
Originally posted by GCT13
MattM, parsing the feed is important, but understanding the subtleties of the feed itself is also critical for AWS. Using the Developer's XML Scratch Pad, could you create the following feeds?

- Lite DVD search sorted by sales for Drama DVDs.

- Lite DVD search sorted by featured product for the keyphrase: "Lord of the Rings".

- Heavy DVD search that only brings up Finding Nemo's product info.
Drama DVD
http://xml.amazon.com/onca/xml3?t=webservices-20&dev-t=&KeywordSearch=Drama%20DVD&mode=dvd&sort=+salesrank&offer=All&type=lite&page=page=1&f=xml

Lord Of The Rings
http://xml.amazon.com/onca/xml3?t=webservices-20&dev-t=&KeywordSearch=Lord%20of%20the%20Rings&mode=dvd&sort=+pmrank&offer=All&type=lite&page=page=1&f=xml

Finding Nemo
http://xml.amazon.com/onca/xml3?t=webservices-20&dev-t=&KeywordSearch=Finding%20Nemo&mode=dvd&sort=+titlerank&offer=All&type=heavy&page=page=1&f=xml

:)

MattM
01-07-2004, 05:28 PM
Originally posted by chromate
MattM, make life easier for yourself and use PHP with SOAP. That will handle the XML for you. All you then have to do is concentrate on how to use the functions.
Do you have some sample code I could see? I never have used SOAP.

MattM
01-07-2004, 07:36 PM
I think it would probably be easier if I post what I need so everyone will understand. I need something like what Shawn, chromate, GCT13, and Chris have, where I can pull in information about certain products, have a search box so the user can find a specific product, and have the fonts and colors match my site. I would also like the URLs to be search engine friendly.

GCT13
01-07-2004, 10:12 PM
Originally posted by MattM
Drama DVD
http://xml.amazon.com/onca/xml3?t=webservices-20&dev-t=D29MMYMB3EDSSS&KeywordSearch=Drama%20DVD&mode=dvd&sort=+salesrank&offer=All&type=lite&page=page=1&f=xml

Lord Of The Rings
http://xml.amazon.com/onca/xml3?t=webservices-20&dev-t=D29MMYMB3EDSSS&KeywordSearch=Lord%20of%20the%20Rings&mode=dvd&sort=+pmrank&offer=All&type=lite&page=page=1&f=xml

Finding Nemo
http://xml.amazon.com/onca/xml3?t=webservices-20&dev-t=D29MMYMB3EDSSS&KeywordSearch=Finding%20Nemo&mode=dvd&sort=+titlerank&offer=All&type=heavy&page=page=1&f=xmlLord of the Rings is the only one you got correct.

Here are some hints.

For Drama DVDs, I was looking for DVDs in Amazon's Drama category. Drama DVD is a BrowseNode search. BrowseNodes = Amazon categories. Look up "BrowseNodes" in the developer's pack and FAQ on Amazon's AWS site.

The Finding Nemo feed should only bring up 1 specific item. What you need there is an Asin search. "ASIN"s are Amazon's unique product identifiers.

GCT13
01-07-2004, 10:21 PM
---

GCT13
01-07-2004, 11:01 PM
---

Mike
01-08-2004, 09:10 AM
I think that's a bit harsh, seeing I was in the same boat a few days ago:)

GCT13
01-08-2004, 10:13 AM
I should never post as such a state I was in last night.

Mike
01-08-2004, 02:01 PM
lol:p

MattM
01-08-2004, 03:35 PM
Dan, I replied to your PM. :)

Best.Flash
01-09-2004, 05:53 PM
MattM if your still looking for some code examples have a gander at this tutorial on devshed:

http://www.devshed.com/c/a/PHP/Using-Amazon-Web-Services-With-PHP-And-SOAP-part-1/

Has got some good detailed info and copy & paste examples to get you started.

MattM
01-10-2004, 10:06 AM
Yes, I recently just found that one. :)

MarkB
01-10-2004, 10:20 AM
Thanks for that link :) I'm going to have a shot at developing my own ad-hoc AWS php calamity ;)

Mike
01-10-2004, 10:47 AM
Thats the tutorial I used, with Chromate's guidance:)

MarkB
01-10-2004, 10:58 AM
So it actually IS possible to build something from that tutorial?

Reading it gave me a headache! LOL

MarkB
01-10-2004, 10:59 AM
With nusoap - do I need only to download the nusoap.php file, or the lib files as well?

Mike
01-10-2004, 11:03 AM
I just downloaded nusoap.php.

MarkB
01-10-2004, 11:07 AM
Well, the nusoap.php I got has a number of require() arguments, asking for other soap.php files - so I'll download them to be safe :)

[edit] well my test page works, so it seems ok LOL Hopefully I can do this to the extent where it can be template-driven as well. *hopes*

MarkB
01-10-2004, 11:22 AM
Hmm - except anything after the second example doesn't work... :(

chromate
01-10-2004, 12:47 PM
Give us more details and we'll fix it for you ;)

MattM
01-10-2004, 12:47 PM
chromate, did you get my PM?

MarkB
01-10-2004, 02:11 PM
Nevermind... I examined the code, and there was a linebreak where there shouldn't have been (throwing half a comment into a fresh line, so the code stumbled and produced an error).

I'll see if I can continue working from here :) But if anyone wishes to supply complete code, please don't let me stop you :p

MarkB
01-10-2004, 02:20 PM
Ok, now - the code here (http://www.mahke.net/amazon/test6.php.txt) breaks on line 32 (see www.mahke.net/amazon/test6.php), which is:

$result = $proxy->BrowseNodeSearchRequest($params);

Any ideas?

Also, how can you parse the 'mode'? I guess I can include it in the url via htaccess... hmmz.

chromate
01-10-2004, 04:08 PM
MattM, yep, I just don't check them every day as I don't get that many.

MattM
01-10-2004, 04:09 PM
Originally posted by chromate
MattM, yep, I just don't check them every day as I don't get that many.
Oh, okay, no problem. :)

chromate
01-10-2004, 04:13 PM
Your problem is here:



// create a proxy so that WSDL methods can be accessed directly $proxy =
$soapclient->getProxy();


If you look, you have the $proxy variable as part of your comment line, so it never gets set. If you look at your error "Call to a member function on a non-object" and then look at the line number you can see it is trying to call the function "BrowswNodeSearchRequest(...)" from the object $proxy. However, $proxy is never being initialised as an object which is why you're getting the error.

Mike
01-10-2004, 04:13 PM
chromate, i've pm'd you as well. reply whenever you have time, it's not that important.

Best.Flash
01-10-2004, 04:16 PM
Originally posted by chromate


// create a proxy so that WSDL methods can be accessed directly $proxy =
$soapclient->getProxy();



Yer you've got to keep an eye out when you copy and paste if the code hasn't been published in form textarea's as it can loss its line breaks ;)

MarkB
01-10-2004, 04:25 PM
Ahhh I thought I'd caught all the cut errors - it's working now :)

Now I have to work out how to parse the different variables within templates... I have it working where I can browse by nodes set in the URL, and then have Authors or Artists set, depending on what is returned (books have authors, music has artists etc), but it's still all clumped together.

Hacking vBulletin has turned me into a template whore LOL

Thanks chromate!

incka
01-13-2004, 01:22 PM
I've gotten very confused by this thread... Can't you just use normal search engines .htaccess thing like in Chris' tutorials to make the URLs SE friendly?

incka
01-13-2004, 01:25 PM
The article here:

http://www.devshed.com/c/a/PHP/Using-Amazon-Web-Services-With-PHP-And-SOAP-part-1/1/

Uses the word:

paradigm

Which Scott Adams said in a Dilbert book was a word used by doomed companies...

I wonder if this article is doomed...

MarkB
01-13-2004, 01:41 PM
Originally posted by incka
I've gotten very confused by this thread... Can't you just use normal search engines .htaccess thing like in Chris' tutorials to make the URLs SE friendly?

You certainly can, just make sure your script links to other pages in the SE friendly manner :)

Mike
01-14-2004, 08:59 AM
Originally posted by incka
The article here:

http://www.devshed.com/c/a/PHP/Using-Amazon-Web-Services-With-PHP-And-SOAP-part-1/1/

Uses the word:

paradigm

Which Scott Adams said in a Dilbert book was a word used by doomed companies...

I wonder if this article is doomed...

It's a great article, one of the best out there on making your own AWS.