Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

How to use Amazon Module

On Drupal, there is a module to get and display product info by using Amazon API. This site uses the Amazon module when describing Amazon products such as CDs, Books.

About the Amazon module, this is a detailed document.

Using the Amazon module, You can write a page like ‘Using Drupal’. This site uses the Fivestar module with the Amazon module for a rating of products.

Install

First, install each module. The Fivestar module needs a Voting API module.

All components of the Amazon module are enabled. Fivestar and the Voting API of the Fivestar module are enabled.

Settings such as Amazon API, etc.

Next settings of Amazon API, etc. Go to ‘Site Configuration’ -> ‘Amazon API’, set Locale, API Key, Associate ID, etc. For Fivestar, ‘Site Configuration’ -> ‘Fivestar’, set Widget Display. I use Default. There are hearts, flames, etc. add to stars. You can set widget displays by content type.

Add new content type

Add a new content type for Amazon product reviews, named Amazon Node for example. Add two fields to the new content type. One is for Amazon product ID (ASIN), and Another is a field for rating. The field type is Amazon Item and Fivestar Rating, respectively.

Next, settings of fields. For Amazon Item, check ‘required’, and 1 for a number of values. For Five-star Rating, check ‘required’, 5 for a number of stars’, voting target is ‘none’.

On the display fields tab, I set labels ‘Hidden’, Teaser Full Node ‘small image and basic info’, but you can change as you like. For rating, Label is ‘inline’ and Teaser and Full Node are ‘as stars’.

Create Amazon Node

Finally, create Amazon Node content. Amazon Item <div> block and Rating <div> block are inserted before the text. A position is able to change using CSS. The edit screen is here.

amazon edit screen

When you want to display ‘inline’ (not at the head of text), you can use the Amazon filter. If you write a macro in a text, Amazon product info is inserted at that position of the text. You need the Amazon filter enabled on your input format.

PAGE TOP