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

How to create custom filed for default attribute value for description and images in manage attribute options in magento

By default Magneto only provide custom options without any description, if you want to customize …

Leave a Reply

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

0

December 9, 2016

Clear all