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 add new search engine like Solr or Elasticsearch in Magento2

Magento 2 Community Edition comes with support for only MySQL search engine, but some projects …

Leave a Reply

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

No messages

March 29, 2017

Clear all

Warning: Cannot modify header information - headers already sent by (output started at /home/u797196687/public_html/wp-content/themes/sushil/framework/functions/search-live.php:334) in /home/u797196687/public_html/wp-content/plugins/wppush-push-notifications/WPPush.php on line 274