A2S Simple Store in PHP
This is a simple PHP 5 application demonstrating the basics of how to interact with Amazon Associates Web Service (A2S, formerly known as ECS).
About This Sample
- Based on the 2006-09-11 API version.
- This application is meant to demonstrate the ItemSearch, ItemLookup, CartCreate, CartAdd, and CartModify operations. It is not intended to be be comprehensive example of how to build an e-commerce store. For example, on an ItemSearch by Keywords, this sample only returns items that are for sale by Amazon (as opposed to other Merchants).
- This sample was tested on PHP 5.1.4.
What's New
- 2007-04-06: This sample now presents a "See Cart Contents" link when items are in the shoppers cart. Previously, a shopper could only see cart contents upon adding an item to the cart.
Prerequisites
- You must have a valid Amazon Web Services developer account. (You can create one here: http://aws.amazon.com)
Running the Sample
- Replace YourAccessKeyIdHere wih your AWS Access Key Id near the top of the simplestore.php file.
- [Optional] Replace YourAssociateTagHere with your Associate Tag near the top of the simplestore.php file. This needs to be done if you want to earn referral fees for sales you generate. You can learn more about our associates program here.
- To run the sample, put SimpleStore.php in your root directrory and load SimpleStore.php?Action=Search in your browser.