function amazon_similar_amazon_item_clean_xml in Amazon Product Advertisement API 6
Same name and namespace in other branches
- 7.2 amazon_similar/amazon_similar.module \amazon_similar_amazon_item_clean_xml()
- 7 amazon_similar/amazon_similar.module \amazon_similar_amazon_item_clean_xml()
Implementation of hook_amazon_item_clean_xml().
File
- amazon_similar/
amazon_similar.module, line 19
Code
function amazon_similar_amazon_item_clean_xml(&$item, $xml) {
if (isset($xml->SimilarProducts->SimilarProduct)) {
foreach ($xml->SimilarProducts->SimilarProduct as $data) {
$version = array();
$version['asin'] = (string) $data->ASIN;
$version['title'] = (string) $data->Title;
$item['similarproducts'][] = $version;
}
}
}