function _asin_load_items in Amazon Product Advertisement API 6
Get an array of items from Amazon.com.
Parameters
$items:
Return value
unknown_type
1 call to _asin_load_items()
- asin_field in asin/
asin.module - Implementation of hook_field().
File
- asin/
asin.module, line 159 - Defines a field type for referencing an Amazon product.
Code
function _asin_load_items(&$items) {
$asins = array();
foreach ($items as $delta => $item) {
if (!empty($item['asin'])) {
$asin = trim($item['asin']);
$asin = amazon_convert_to_asin($asin);
$asins[] = $asin;
$items[$delta]['asin'] = $asin;
// Adjust in case we've changed it.
}
}
return amazon_item_lookup($asins);
}