Home / Magento / Compare product button in header in magento.

Compare product button in header in magento.

Compare product button in header in magento.

<?php
$_helper = $this->helper(‘catalog/product_compare’);
$_items = $_helper->getItemCount() > 0 ? $_helper->getItemCollection() : null;
?>
<div class=”com”>
<strong><span><?php echo $this->__(‘Compare Products’) ?>
<?php if($_helper->getItemCount() > 0): ?>
<small><?php echo $this->__(‘(%d)’, $_helper->getItemCount()) ?></small>
<?php endif; ?>
</span></strong>
<?php if($_helper->getItemCount() > 0): ?>

<script type=”text/javascript”>decorateList(‘compare-items’)</script>
<div class=”actions”>
<button type=”button” title=”<?php echo $this->__(‘Compare’) ?>” class=”button” onclick=”popWin(‘<?php echo $_helper->getListUrl() ?>’,’compare’,’top:0,left:0,width=820,height=600,resizable=yes,scrollbars=yes’)”><span><span><?php echo $this->__(‘Compare’) ?></span></span></button>
</div>
<?php endif; ?>
</div>
</div>

About Sushil_kumar

Check Also

magento-coding-recommendations-to-optimize-site-performance

How to optimize magento code?

How to optimize magento code The code influences the speed of your site. The testing …

Leave a Reply

Your email address will not be published. Required fields are marked *

0

January 24, 2017

Clear all