Before you start
This tutorial is for those interested in expanding the storefront, created in Part 1 of this series, by adding a fully functional shopping cart in PHP that automates the process of creating and modifying a shopping cart via Amazon Web Services. The "browse similar items" and "collectibles shop" features are also implemented to help narrow a user's search, making the storefront more effective for users. This tutorial assumes knowledge of basic PHP syntax, as well as knowledge of SOAP and the Amazon ECS and Web services, as covered in Part 1 of this series.
In Part 1, we created a storefront application with PHP that allowed users to browse items in various categories, as well as search within those categories to narrow a search. Content was retrieved using Amazon Web Services.
In Part 2, we will create and modify a fully functional shopping cart in PHP using Amazon Web Services, integrating it into the storefront created in Part 1. Tools to help narrow a user's search are also integrated into the shopping cart: browse similar items, which allows users to browse items similar to an item he is already interested in; and a collectibles theme shop, which displays only collectible items for the categories in the storefront.
You will create a shopping cart in PHP and integrate it into the storefront. Shopping cart data is stored on Amazon's servers, which adds security given how the data isn't stored locally. When a user finishes shopping and checks out, he is sent to Amazon's secure checkout servers that pulls up the shopping cart information and collects billing information. You will also add the ability to browse similar items and a collectibles shop, making the process of deciding what to buy easier for users, increasing the likelihood of sales. Like Part 1, this tutorial relies heavily on SOAP requests you send to Amazon Web Services.
To follow along with this tutorial, you will need to install and test the following tools, and retrieve two identifiers from Amazon:
- Web server
- Pick any Web server and operating system. Feel free to use Apache V2.X, or the IBM HTTP Server.
- You can follow along in this tutorial without PHP, but if you are interested in interacting with the sample application, download PHP V5. Make sure to build PHP with
--enable-soapto enable the PHP SOAP extensions.
- You need two things from Amazon: a developer token and an Amazon Associates ID (see Resources).
- Web Browser
- You need a Web browser. These include Mozilla, Firefox, Opera, and Microsoft® Internet Explorer.