<?php
$ListItemsPerRow = get_option('ListItemsPerRow', 3);
$title = htmlentities(str_replace('"', '', $post->post_title));
$nm = 12 / $ListItemsPerRow;


?>
<li class="kb-amz-similar-product-item col-lg-<?php echo $nm; ?> col-md-<?php echo $nm; ?> col-sm-<?php echo $nm; ?>">
    <article id="post-<?php echo $post->ID; ?>" class="kb-product-list">
        <header>
            <div class="kb-product-list-image">
                <a href="<?php echo get_permalink($post->ID); ?>" title="<?php echo $title; ?>">
                    <?php
                    $images = getKbAmz()->getProductImages($post->ID);
                    echo $images->getFirst();
                    ?>
                </a>
                <?php echo getKbAmz()->getProductSticker($post->ID); ?>
            </div>
            <div class="kb-product-list-inner">
                <div class="kb-product-list-header">
                    <?php
                    echo '<a class="kb-product-list-title" href="'.get_permalink($post->ID).'" title="'.$title.'">' . $post->post_title .  '</a>';
                    ?>
                </div>
                <div class="kb-product-list-cart-button">
                    <?php if (getKbAmz()->isProductAvailable($post->ID)): ?>
                    <div class="kb-amz-item-price">
                        <?php echo getKbAmz()->getProductPriceHtml($post->ID);?>
                    </div>
                    <div class="cart">
                        <?php echo getKbAmz()->getCartButtonHtml($post->ID); ?>
                    </div>
                    <span class="clear"></span>
                     <?php endif; ?>
                </div>
            </div>
        </header>
    </article>
</li>
