O'Reilly logo

Amazon Hacks by Paul Bausch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sell Items with Pop-up Windows

Amazon Quick-Click Buying pop-ups are as close as you can get to 1-Click buying on your site.

If keeping your visitors at your site is a priority, you may not be comfortable with linking away [Hack #59] or even having your visitors leave to add items to their Amazon cart [Hack #60]. Instead, you can include buttons on your site that will open a new, smaller window that your visitors can use to buy items. This keeps your site in the background so it’s easy for your visitors to return.

Amazon has a ready-made system for this purpose called Quick-Click Buying. You simply add some JavaScript to your web page that specifies a Quick-Click URL to open when a button is clicked. Figure 5-3 shows a web page that lists a few books with Quick-Click buttons below them.

A web page with Quick-Click Buying buttons

Figure 5-3. A web page with Quick-Click Buying buttons

When a visitor clicks the “Buy from Amazon.com” button, a new window like the one in Figure 5-4 opens with purchasing options.

Quick-Click Buying pop-up window

Figure 5-4. Quick-Click Buying pop-up window

The Code

Add this code to any existing web page to display one Quick-Click “Buy from Amazon.com” button. Be sure to include your associate tag and the ASIN for the item.

<script language="JavaScript"> function popUp(URL,NAME) { // Set pop-up Window Options var winoptions = 'location=yes,'; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required