Beispiel #1
0
<?php

/*
 * Available variables:
 * 
 * $aOptions   - the plugin options
 * $aProducts  - the fetched product links
 * $aArguments - the user defined arguments such as image size and count etc.
 */
$_aStructure_Product = array('product_url' => '', 'title' => '', 'text_description' => '', 'description' => '', 'image_size' => '', 'product_url' => '', 'thumbnail_url' => '');
$sClassAttributes_ProductsContainer = 'amazon-products-container' . ' amazon-unit-' . $aArguments['id'];
$sClassAttributes_ProductsContainer .= empty($aArguments['_labels']) ? '' : ' amazon-label-' . implode(' amazon-label-', $aArguments['_labels']);
$_sWidth = AmazonAutoLinks_PluginUtility::getDegree('width', $aArguments);
$_sWidth = $_sWidth ? "width: {$_sWidth};" : '';
$_sHeight = AmazonAutoLinks_PluginUtility::getDegree('height', $aArguments);
$_sHeight = $_sHeight ? "height: {$_sHeight};" : '';
$_sInlineStyle = $_sWidth . $_sHeight;
if (empty($aProducts)) {
    ?>
    <div><p><?php 
    _e('No products found.', 'amazon-auto-links');
    ?>
</p></div>  
    <?php 
    return true;
}
?>
    

<?php 
if (isset($aProducts['Error']['Message'], $aProducts['Error']['Code'])) {