Software

Amazon Web Services (AWS) Products

Current Version: 4.1.1
  • Installation

    1. Unzip the folder to a temporary location on your local hard drive.
    2. FTP the files from their local folders to the same locations in your EE install’s folder on the server.

  • Usage

    Implement using the tag pair:

    {exp:aws_products:search}
  • Examples

    Simple

    {exp:aws_products:search item_id="use_your_own" associate_id="use_your_own" 
    public_key="use_your_own" private_key="use_your_own"}
    Great news! {Item_ItemAttributes_Title} only costs 
    {Item_OfferSummary_LowestNewPrice_FormattedPrice} today.
    {/exp:aws_products:search}

    Extended

    {exp:aws_products:search limit="5" region="com" 
        debug="no" 
        associate_id="use_your_own"
        index="Books"
        display_all_var="yes"
        public_key="use_your_own" 
        private_key="use_your_own"
    }
    
    {define_keywords}use_your_own{/define_keywords}
    
    

    {Item_ItemAttributes_Title} {if Item_ItemAttributes_Author}By {Item_ItemAttributes_Author}{/if} ({Item_ASIN})

    {if Item_MediumImage_URL}

    ...

    {/if}

    {Item_EditorialReviews_EditorialReview_Content}

    {if Item_OfferSummary_LowestNewPrice_FormattedPrice}

    {Item_OfferSummary_LowestNewPrice_FormattedPrice}

    {/if}

    {if Item_DetailPageURL}

    Buy

    {/if}

    {Item_ImageSets}

    {/Item_ImageSets}

    {Item_ItemLinks}
    {ItemLink_Description}
    {/Item_ItemLinks}

    {/exp:aws_products:search}

  • Parameters

    • associate_id=&quotuse_your_own&quot configures an associate ID for Amazon’s affiliate program (default: “hopstudios”).
    • region=&quotcom&quot sets the domain suffix, i.e. which Amazon store (default: “com”).  Non-US users may wish to change this. You also need to set it accordingly to your AWS account region. For instance, a UK account won’t work with the com region.
    • index=&quotBooks&quot configures the search index (default: “Books”).
    • limit=&quot5&quot sets the limit of results returned in multi-value result sets (default: “5”, maximum: 10).
    • page=&quot1&quot retrieve specific results page (Amazon limits that to 10, even if there’s more pages).
    • debug=&quotyes&quot puts some additional output in template debugging (default: “no”).
    • display_all_var=&quotyes&quot list all the available tags for each item (default: “no”).
    • delay=&quot2&quot delay the query by 2 seconds. Handy if doing multiple queries in one page (AWS can throttle the requests)

    REQUIRED:

    • public_key=&quotyour Access Key ID&quot
    • private_key=&quotyour Secret Access Key&quot

    REQUIRED UNLESS USING KEYWORDS TAG PAIR:

    • item_id=&quotuse_your_own&quot is an Amazon ASIN
  • Tags

    {Item_ASIN}
    {Item_ParentASIN}
    {Item_DetailPageURL}
    {Item_SalesRank}
    {Item_SmallImage_URL}
    {Item_SmallImage_Height}
    {Item_SmallImage_Width}
    {Item_MediumImage_URL}
    {Item_MediumImage_Height}
    {Item_MediumImage_Width}
    {Item_LargeImage_URL}
    {Item_LargeImage_Height}
    {Item_LargeImage_Width}
    {Item_ItemAttributes_Binding}
    {Item_ItemAttributes_Brand}
    {Item_ItemAttributes_Creator}
    {Item_ItemAttributes_EAN}
    {Item_ItemAttributes_EANList_EANListElement}
    {Item_ItemAttributes_Edition}
    {Item_ItemAttributes_ESRBAgeRating}
    {Item_ItemAttributes_Feature}
    {Item_ItemAttributes_Genre}
    {Item_ItemAttributes_HardwarePlatform}
    {Item_ItemAttributes_IsAdultProduct}
    {Item_ItemAttributes_IsEligibleForTradeIn}
    {Item_ItemAttributes_ItemDimensions_Height}
    {Item_ItemAttributes_ItemDimensions_Length}
    {Item_ItemAttributes_ItemDimensions_Weight}
    {Item_ItemAttributes_ItemDimensions_Width}
    {Item_ItemAttributes_Label}
    {Item_ItemAttributes_ListPrice_Amount}
    {Item_ItemAttributes_ListPrice_CurrencyCode}
    {Item_ItemAttributes_ListPrice_FormattedPrice}
    {Item_ItemAttributes_Manufacturer}
    {Item_ItemAttributes_Model}
    {Item_ItemAttributes_MPN}
    {Item_ItemAttributes_NumberOfDiscs}
    {Item_ItemAttributes_NumberOfItems}
    {Item_ItemAttributes_OperatingSystem}
    {Item_ItemAttributes_PackageDimensions_Height}
    {Item_ItemAttributes_PackageDimensions_Length}
    {Item_ItemAttributes_PackageDimensions_Weight}
    {Item_ItemAttributes_PackageDimensions_Width}
    {Item_ItemAttributes_PackageQuantity}
    {Item_ItemAttributes_PartNumber}
    {Item_ItemAttributes_Platform}
    {Item_ItemAttributes_ProductGroup}
    {Item_ItemAttributes_ProductTypeName}
    {Item_ItemAttributes_PublicationDate}
    {Item_ItemAttributes_Publisher}
    {Item_ItemAttributes_ReleaseDate}
    {Item_ItemAttributes_Studio}
    {Item_ItemAttributes_Title}
    {Item_ItemAttributes_TradeInValue_Amount}
    {Item_ItemAttributes_TradeInValue_CurrencyCode}
    {Item_ItemAttributes_TradeInValue_FormattedPrice}
    {Item_ItemAttributes_UPC}
    {Item_ItemAttributes_UPCList_UPCListElement}
    {Item_OfferSummary_LowestNewPrice_Amount}
    {Item_OfferSummary_LowestNewPrice_CurrencyCode}
    {Item_OfferSummary_LowestNewPrice_FormattedPrice}
    {Item_OfferSummary_TotalNew}
    {Item_OfferSummary_TotalUsed}
    {Item_OfferSummary_TotalCollectible}
    {Item_OfferSummary_TotalRefurbished}
    {Item_EditorialReviews_EditorialReview_Source}
    {Item_EditorialReviews_EditorialReview_Content}
    {Item_EditorialReviews_EditorialReview_IsLinkSuppressed}
  • Tag Pairs

    {define_keywords}search for this, and this{/define_keywords}

    allows you to search for keywords. This is a required attribute, unless using an Item_ID parameter.  It doesn’t matter where you place this variable pair, but it must be defined inside the tags. If you are going to use a custom field for your keywords, be sure that it has formatting set to NONE in your publish preferences.

    {if Item_MediumImage_URL > 5}<img src="{Item_MediumImage_URL}" alt="{Item_ItemAttributes_Title}" />{/if}

    If you’re displaying an image, it’s good practice to check that its width or height are greater than 1, since Amazon may return a blank 1x1 image if none exists.

    {Item_Authors backspace="2"}{Author}, {/Item_Authors}

    Loop through all item authors

    {Item_ItemLinks} {ItemLink_Description} {ItemLink_URL} {/Item_ItemLinks}

    Loop through all Amazon item links (Add to wishlist, Tell a friend…)

    {Item_ImageSets} ... {/Item_ImageSets}

    Loop through all available images from Amazon. Full list of tags :

    {Item_ImageSets}
    	{ImageSet_SwatchImage_URL}
    	{ImageSet_SwatchImage_Height}
    	{ImageSet_SwatchImage_Width}
    	{ImageSet_SmallImage_URL}
    	{ImageSet_SmallImage_Height}
    	{ImageSet_SmallImage_Width}
    	{ImageSet_ThumbnailImage_URL}
    	{ImageSet_ThumbnailImage_Height}
    	{ImageSet_ThumbnailImage_Width}
    	{ImageSet_TinyImage_URL}
    	{ImageSet_TinyImage_Height}
    	{ImageSet_TinyImage_Width}
    	{ImageSet_MediumImage_URL}
    	{ImageSet_MediumImage_Height}
    	{ImageSet_MediumImage_Width}
    	{ImageSet_LargeImage_URL}
    	{ImageSet_LargeImage_Height}
    	{ImageSet_LargeImage_Width}
    {/Item_ImageSets}
    {Item_ItemAttributes_Languages} {Language_Name} {Language_Type} {/Item_ItemAttributes_Languages}

    Loop through product languages.

  • EE2 Code Examples

    The EE2 version uses slightly different tags.  Here’s a basic set of examples.

    These will NOT work for the current EE3 version.

    Example 1

    {exp:aws_products:search limit="20" region="com" debug="no" associate_id="hopstudios" public_key="use_your_own" private_key="use_your_own"}
    {define_keywords}blogging for dummies gardner{/define_keywords}
     {if aws_total_results > 0}total results: {aws_total_results}<br />{/if}
     {if aws_count > 0}count: {aws_count}<br />{/if}
     {if amz_asin}amz_asin: {amz_asin}<br />{/if}
     {if amazon_link}amazon_link: <a href="{amazon_link}">{amazon_link}</a><br />{/if}
     {if product_name}product_name: {product_name}<br />{/if}
     {if release_date}release_date: {release_date}<br />{/if}
     {if catalog_type}catalog_type: {catalog_type}<br />{/if}
     {if manufacturer}manufacturer: {manufacturer}<br />{/if}
     {if publisher}publisher: {publisher}<br />{/if}
     {if sales_rank}sales_rank: {sales_rank}<br />{/if}
     {if number_of_pages}number_of_pages: {number_of_pages}<br />{/if}
     {if best_price}best_price: {best_price}<br />{/if}
     {if list_price}list_price: {list_price}<br />{/if}
     {if amz_authors}amz_authors: {amz_authors}<br />{/if}
     {if img_small}img_small: <img src="{img_small}" /><br />{/if}
     {if img_medium}img_medium: <img src="{img_medium}" /><br />{/if}
     {if img_large}img_large: <img src="{img_large}" /><br />{/if}
     {if img_small_width}img_small_width: {img_small_width}<br />{/if}
     {if img_medium_width}img_medium_width: {img_medium_width}<br />{/if}
     {if img_large_width}img_large_width: {img_large_width}<br />{/if}
     {if img_small_height}img_small_height: {img_small_height}<br />{/if}
     {if img_medium_height}img_medium_height: {img_medium_height}<br />{/if}
     {if img_large_height}img_large_height: {img_large_height}<br />{/if}
    {/exp:aws_products:search}

    Example 2

    {exp:aws_products:search item_id="0470230177" associate_id="hopstudios" public_key="use_your_own" private_key="use_your_own"}
    Great news! {product_name} only costs ${best_price} today.
    {/exp:aws_products:search}

    Parameters

    • associate_id=“hopstudios” configures an associate ID for Amazon’s affiliate program (default: “hopstudios”).
    • region=“com” sets the domain suffix, i.e. which Amazon store (default: “com”).  Non-US users may wish to change this.
    • index=“Books” configures the search index (default: “Books”).
    • limit=“5” sets the limit of results returned in multi-value result sets (default: “5”).
    • debug=“yes” puts some additional output in template debugging (default: “no”).

    REQUIRED

    • public_key = your “Access Key ID”
    • private_key = your “Secret Access Key”

    REQUIRED UNLESS USING KEYWORDS TAG PAIR

    • item_id=“B000K21D4K” is an Amazon ASIN.

    Tag Pairs

    {define_keywords}search for this, and this{/define_keywords}

    allows you to search for keywords. This is required, unless you use the item_id parameter.  It doesn’t matter where you place this variable pair, but it must be defined inside the tags. If you are going to use a custom field for your keywords, also be sure that it has formatting set to NONE in your publish preferences.

    If you’re displaying an image, it’s good practice to check that its width or height are greater than 1, since Amazon may return a blank 1x1 image if none exists.

    {if img_small_width > 5}<img src="{img_small}" alt="{product_name}" />{/if}
  • Updating

    Updating is easy:

    1. Download a new version from this website, and extract on your hard drive.
    2. Upload the new files to their appropriate locations.

  • Uninstalling

    1. Navigate to the Add-Ons/Modules tab in your EE control panel and uninstall the module.
    2. Remove the add-on directory from your EE system folder on the server.

  • Version History

    4.1.1
    Add a delay parameter
    4.1.0
    Add a fix for items having multiple authors
    Add feature to display all available tags
    Add a page parameter
    Updated for EE 3
    4.0.0
    Major changes to tag names to more closely adhere to Amazon's attribute names
    Many more attributes available to use &mdash all that Amazon provides, in fact, and it updates as Amazon does.
    3.1.1
    2015/04/28
    Fix encoding issue
    Fix bug when a template tag doesn't exist
    3.1.0
    2011/04/23 (Travis Smith, Hop Studios):
    Added error message for missing keys
    Added .at and .es and .it stores
    Changed the AWS server it talks to
    Fixed a bug in "define_keywords"
    3.0.0
    4/24/2011
    First version for EE 2.x
    Added several more fields
    Fixed an error when multiple authors were available for a book
    Includes version 2.0.0 for EE 1.x
    2.0.0
    1/29/2010 (Justin Crawford, Hop Studios):
    Added aws_signed_request function to accommodate the new signed URL requirements on AWS
    Made major changes to code formatting
    Made minor changes to logic/data structures
    Edited comments for brevity/clarity
    Changed parameters/variable names for consistency with current EE convention
    Added an item_id parameter for single-item lookups
    Added a public_key and private_key parameter for signed URLs
    Revised conditional handling
    1.0.0
    October 15, 2004 (Christian Leu, http://leumund.ch/):
    First Version based on Lynda's Amazon Api Plugin

Have a Project for Us?

Get in Touch