Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Net::Amazon and Net::Amazon::Property 1

Status
Not open for further replies.

spperl

Programmer
Mar 29, 2005
34
GB
Hi,

Just wondering if anyone knows of a way to return the amazon stock quantity of a given product using Net::Amazon

e.g.

Code:
my $response = $ua->search(<<an ean>>)
for ($response->properties()) {
    $_->ThirdPartyNewCount(); # returns the total new count for all resellers

however this does not actually specify if the title is in stock on amazon?

Does anyone know of any methods that can provide this?

Thanks

 
Hi spperl,

This answer is something of a guess as I don't have an amazon account test it with.

There is a method called Availability() within NET::Amazon::property which seems to have a textual description of the item availability. On the amazon web site, if I look at an item marked In Stock, the div id is labelled availability_feature_div. I'd give this one a go to start with.

Failing that you might try to do a print Data::Dumper->Dump([$response]) and see if it has anything useful in it.

Cheers,
Scott
 
Great shout regarding Availability!

Having iterated over a few examples I can easily parse the availability string to determine if in stock or not.

Nice one, thank you and have a star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top