Hop AWS Products (Amazon Web Services)
Current Version: 6.0.2- EE5
- EE6
- EE7
-
Installation
- Unzip the folder to a temporary location on your local hard drive.
- FTP the files from their local folders to the same locations in your EE install’s /system/user/addons/ folder on the server.
- Navigate to Add-ons in your EE control panel and install the add-on. That’s it!
-
Usage
Implement using the tag pair:
{exp:hop_aws_products:search}You’ll get output that you can use to create links like the ones to these items…
-
Sample Product Links
- Pound Giant Gummy Bear by Yummzies
- Pillow Pad Multi-Angle Soft iPad/Tablet Stand by Ontel
- Microfiber Travel Sports Towel by BOGI
- Trilobite Plush Toy by GIANTmicrobes
- Dominion Board Game by Rio Grande
- Mastering Regular Expressions: Understand Your Data and Be More Productive
- Kids Cartoon Duck Raincoat
- Cute Rubber Ducky Pattern Grocery Tote
- Mini Rubber Ducks (100 pack)
- Slow Death by Rubber Duck: The Secret Danger of Everyday Things, by Rick Smith and Bruce Lourie
- Original 3D Rubber Duck Crystal Puzzle by Bepuzzled
- First Nature 16 oz. Hummingbird Flower Feeder
- Rubbermaid Food Storage Containers, Set of 21, Racer Red
- Wild Wings Cedar Bird Box House
- WOWMAX Triangular Wedge Pillow
- Reasons and Persons
- Pound Giant Gummy Bear by Yummzies
-
Examples
{exp:hop_aws_products:search keyword="PHP" } {if no_results}No results at the moment{/if} <h2>{count}: {ItemInfo:Title:DisplayValue} ({ASIN})</h2> <h3>Contributors/Authors: <br/><small>{ItemInfo:ByLineInfo:Contributors}{Name}<br/>{/ItemInfo:ByLineInfo:Contributors} </small></h3> {BrowseNodes} {Ancestors}<br> {/BrowseNodes} {if Images:Primary:Large:URL} <h4>Primary Image:</h4> <img src="{Images:Primary:Large:URL}"> {if:else} <h4>No primary image</h4> {/if} {Offers:Summaries} <p>{Condition:Value}: {LowestPrice:DisplayAmount} {LowestPrice:Currency}</p> {/Offers:Summaries} {Images:Variants} {if no_results} <h4>NO Variant Images</h4> {/if} {if count == 1} <h4>Variant Images:</h4> {/if} <div> <h5>Variant Image {count}</h5><br> <img src="{Large:URL}"><br> </div> {/Images:Variants} {/exp:hop_aws_products:search} -
Parameters
- partner_tag=”hopstudios” REQUIRED if not specified in the settings page
- access_key=”xxxxxx” REQUIRED if not specified in the settings page
- secret_key=”xxxxxxxxxxxxxx” REQUIRED if not specified in the settings page
- item_id=”B000K21D4K” REQUIRED (or `keyword`). Amazon ASIN.
- keyword=”PHP” REQUIRED (or `item_id`).
- region=”com” DEFAULT=”COM” Amazon domain suffix. 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=”Books” DEFAULT=”BOOKS” configures the search index.
- limit=”5” DEFAULT=”5” Limit of results returned in multi-value result sets (maximum 10).
- page=”1” retrieve specific results page (Amazon limits that to 10, even if there’s more pages).
- debug=”yes” DEFAULT=”NO” Shows additional output in template debugging.
- display_all_var=”yes” DEFAULT=NO” List all the available tags for each item.
- delay=”2” delay the query by 2 seconds. Handy if doing multiple queries in one page (AWS can throttle the requests)
-
Tag Pairs
{BrowseNodes} {Ancestors} {BrowseNode} {SalesRank} {/BrowseNodes} {Images:Variants} {count} {total_results} {Large:Height} {Large:URL} {Large:Width} {Medium:Height} {Medium:URL} {Medium:Width} {Small:Height} {Small:URL} {Small:Width} {/Images:Variants} {ItemInfo:ByLineInfo:Contributors} {count} {total_results} {Locale} {Name} {Role} {RoleType} {/ItemInfo:ByLineInfo:Contributors} {ItemInfo:ContentInfo:Languages:DisplayValues} {count} {total_results} {DisplayValue} {Type} {/ItemInfo:ContentInfo:Languages:DisplayValues} {ItemInfo:ContentInfo:Languages:DisplayValues} {count} {total_results} {DisplayValue} {Type} {/ItemInfo:ContentInfo:Languages:DisplayValues} {ItemInfo:ExternalIds:EANs:DisplayValues} {count} {total_results} {value} {/ItemInfo:ExternalIds:EANs:DisplayValues} {ItemInfo:ExternalIds:ISBNs:DisplayValues} {count} {total_results} {value} {/ItemInfo:ExternalIds:ISBNs:DisplayValues} {ItemInfo:ExternalIds:UPCs:DisplayValues} {count} {total_results} {value} {/ItemInfo:ExternalIds:UPCs:DisplayValues} {ItemInfo:TechnicalInfo:Formats:DisplayValues} {count} {total_results} {value} {/ItemInfo:TechnicalInfo:Formats:DisplayValues} {Offers:Listings} {count} {total_results} {Availability:Message} {Availability:MinOrderQuantity} {Availability:Type} {Condition:SubCondition:Value} {Condition:Value} {DeliveryInfo:IsAmazonFulfilled} {DeliveryInfo:IsFreeShippingEligible} {DeliveryInfo:IsPrimeEligible} {Id} {IsBuyBoxWinner} {MerchantInfo:FeedbackCount} {MerchantInfo:FeedbackRating} {MerchantInfo:Id} {MerchantInfo:Name} {Price:Amount} {Price:Currency} {Price:DisplayAmount} {Price:Savings:Amount} {Price:Savings:Currency} {Price:Savings:DisplayAmount} {Price:Savings:Percentage} {ProgramEligibility:IsPrimeExclusive} {ProgramEligibility:IsPrimePantry} {SavingBasis:Amount} {SavingBasis:Currency} {SavingBasis:DisplayAmount} {ViolatesMAP} {/Offers:Listings} {Offers:Summaries} {count} {total_results} {Condition:Value} {HighestPrice:Amount} {HighestPrice:Currency} {HighestPrice:DisplayAmount} {LowestPrice:Amount} {LowestPrice:Currency} {LowestPrice:DisplayAmount} {OfferCount} {/Offers:Summaries} -
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:
- Download a new version from this website, and extract on your hard drive.
- Upload the new files to their appropriate locations.
-
Uninstalling
- Navigate to the Add-Ons > Modules tab in your EE control panel and uninstall the module.
- Remove the add-on directory from your EE system folder on the server.