0

header-part

As I require compare product and my order link in user dropdown shown in image below My account. I tried to edit header.phtml file. which only displays

<div class="panel wrapper">
<div class="panel header">
 <?php echo $this->getChildHtml("header.links"); ?>
</div>
</div>

Where exactly should I edit??

Your Suggestions will be appreciated.

0

magento\app\code\Custom\Module\view\frontend\templates\link.phtml

<li class="link module" data-bind="scope: 'module'">
    <a href="<?php /* @escapeNotVerified */ echo $block->getUrl().'catalog/product_compare/index/'; ?>" title="<?php echo __('Compare'); ?>">&nbsp;>> <?php echo __('Compare'); ?></a>
</li>
<script type="text/x-magento-init">
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                    "wishlist": {
                        "component": "Magento_Wishlist/js/view/wishlist"
                    }
                }
            }
        }
    }

</script>

Replace <li class="link module" data-bind="scope: 'module'"> with you Module Name

  • HI Ankit, Have made the changes as per said but no changes displayed. Have added the code in this file :- magento/app/code/Magento/Catalog/view/frontend/templates/product/compare/link.phtml – Sanj Jan 11 '17 at 6:48
  • Have u created Module for this or only this file u have? – Ankit Shah Jan 11 '17 at 7:41
  • Not created module for this, actually I was making changes in the existing file present in app/code/magento/modulename. – Sanj Jan 11 '17 at 8:48
  • U can create new module or U can add in ur existing custom module – Ankit Shah Jan 11 '17 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.