You are here

function theme_asin_formatter_default in Amazon Product Advertisement API 6

Theme function for 'default' asin field formatter, appropriate for general use and product listings.

File

asin/asin.module, line 214
Defines a field type for referencing an Amazon product.

Code

function theme_asin_formatter_default($element) {
  $asin = trim($element['#item']['asin']);
  $asins = array();
  if (!empty($asin)) {
    $asins = amazon_item_lookup("{$asin}");
    return theme('amazon_item', $asins["{$asin}"]);
  }
}