Magento Recently Viewed Product With Image

/** In the derectory app/design/frontend/default/(Themename)/template/reports/product_viewed.phtml ***/

<?php if ($_products = $this->getRecentlyViewedProducts()): ?>
<div class="block block-list block-viewed">
    <div class="block-title">
        <strong><span><?php echo $this->__('Recently Viewed Products') ?></span></strong>
    </div>
    <div class="block-content">
        <ol class="mini-products-list" id="block-popular">
        <?php foreach ($_products as $_item): ?>
            <li class="item">
                <div class="product">
                <img class="product-image" src="<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(50, 50) ?>" width="50" height="50" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" />   
                 <div class="product-details">
                    <p class="product-name"><a href="<?php echo $this->getProductUrl($_item) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName() , 'name') ?></a></p>
                     <a href="<?php echo $this->getProductUrl($_item) ?>" title="<?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName() , 'name') ?>" class="product-info"><?php echo "Details"; ?></a>
                </div>
                </div>
               
            </li>
        <?php endforeach; ?>
        </ol>
        <script type="text/javascript">decorateList('recently-viewed-items');</script>
    </div>
</div>
<?php endif; ?>



Comments

Popular posts from this blog

371 - Ackermann Functions

Create many folder with one click