How to remove items count from Compare products link in header Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Remove header part and add new header from my custom module magento 2.0.1?Magento 2 remove My Account and Wishlist link from top linksHow can I move compare product link in header | Magento 2Magento2 - How to remove “or” from header.linksRemoving wishlist link - top header magento 2Magento 2 remove reference container block from layoutHow to remove minicart from sticky headerMagento 2.1.8- How to disable or remove images from all products in the frontend?How to add header link in magento 2.1How to remove a specific href from a top-menu link in Magento 2

Do you forfeit tax refunds/credits if you aren't required to and don't file by April 15?

What would be the ideal power source for a cybernetic eye?

Did Xerox really develop the first LAN?

What's the purpose of writing one's academic bio in 3rd person?

Did Kevin spill real chili?

Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?

If Jon Snow became King of the Seven Kingdoms what would his regnal number be?

Is the address of a local variable a constexpr?

Does surprise arrest existing movement?

Why is black pepper both grey and black?

How to motivate offshore teams and trust them to deliver?

"Seemed to had" is it correct?

What do you call a plan that's an alternative plan in case your initial plan fails?

What is the longest distance a 13th-level monk can jump while attacking on the same turn?

Should I discuss the type of campaign with my players?

Is 1 ppb equal to 1 μg/kg?

How discoverable are IPv6 addresses and AAAA names by potential attackers?

Using et al. for a last / senior author rather than for a first author

Why is "Consequences inflicted." not a sentence?

If a contract sometimes uses the wrong name, is it still valid?

What are 'alternative tunings' of a guitar and why would you use them? Doesn't it make it more difficult to play?

What is a Meta algorithm?

How does a Death Domain cleric's Touch of Death feature work with Touch-range spells delivered by familiars?

Letter Boxed validator



How to remove items count from Compare products link in header



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Remove header part and add new header from my custom module magento 2.0.1?Magento 2 remove My Account and Wishlist link from top linksHow can I move compare product link in header | Magento 2Magento2 - How to remove “or” from header.linksRemoving wishlist link - top header magento 2Magento 2 remove reference container block from layoutHow to remove minicart from sticky headerMagento 2.1.8- How to disable or remove images from all products in the frontend?How to add header link in magento 2.1How to remove a specific href from a top-menu link in Magento 2



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I don't want to remove the whole link from frontend theme I just want to remove a part of the link.
I don't know where the file that I should edit it
any help?










share|improve this question




























    0















    I don't want to remove the whole link from frontend theme I just want to remove a part of the link.
    I don't know where the file that I should edit it
    any help?










    share|improve this question
























      0












      0








      0








      I don't want to remove the whole link from frontend theme I just want to remove a part of the link.
      I don't know where the file that I should edit it
      any help?










      share|improve this question














      I don't want to remove the whole link from frontend theme I just want to remove a part of the link.
      I don't know where the file that I should edit it
      any help?







      magento2 frontend toplinks






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 11 at 21:27









      nashwa ghazynashwa ghazy

      111




      111




















          1 Answer
          1






          active

          oldest

          votes


















          0














          The PHTML file for header compare product is
          MAGENTO-ROOT/vendor/magento/module-catalog/view/frontend/templates/product/compare/link.phtml



          you can copy the PHTML file to your them and comment out the line as below



          Original code:



          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile
          ?>
          <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
          <a class="action compare no-display" title="<?= /* @escapeNotVerified */ __('Compare Products') ?>"
          data-bind="attr: 'href': compareProducts().listUrl, css: 'no-display': !compareProducts().count"
          >
          <?= /* @escapeNotVerified */ __('Compare Products') ?>
          <span class="counter qty" data-bind="text: compareProducts().countCaption"></span>
          </a>
          </li>
          <script type="text/x-magento-init">
          "[data-role=compare-products-link]": "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
          </script>


          Change the phtml code it to



          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile
          ?>
          <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
          <a class="action compare no-display" title="<?= /* @escapeNotVerified */ __('Compare Products') ?>"
          data-bind="attr: 'href': compareProducts().listUrl, css: 'no-display': !compareProducts().count"
          >
          <?= /* @escapeNotVerified */ __('Compare Products') ?>
          <!--<span class="counter qty" data-bind="text: compareProducts().countCaption"></span>-->
          </a>
          </li>
          <script type="text/x-magento-init">
          "[data-role=compare-products-link]": "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
          </script>





          share|improve this answer























          • thanks that helped :)

            – nashwa ghazy
            yesterday











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f269787%2fhow-to-remove-items-count-from-compare-products-link-in-header%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          The PHTML file for header compare product is
          MAGENTO-ROOT/vendor/magento/module-catalog/view/frontend/templates/product/compare/link.phtml



          you can copy the PHTML file to your them and comment out the line as below



          Original code:



          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile
          ?>
          <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
          <a class="action compare no-display" title="<?= /* @escapeNotVerified */ __('Compare Products') ?>"
          data-bind="attr: 'href': compareProducts().listUrl, css: 'no-display': !compareProducts().count"
          >
          <?= /* @escapeNotVerified */ __('Compare Products') ?>
          <span class="counter qty" data-bind="text: compareProducts().countCaption"></span>
          </a>
          </li>
          <script type="text/x-magento-init">
          "[data-role=compare-products-link]": "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
          </script>


          Change the phtml code it to



          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile
          ?>
          <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
          <a class="action compare no-display" title="<?= /* @escapeNotVerified */ __('Compare Products') ?>"
          data-bind="attr: 'href': compareProducts().listUrl, css: 'no-display': !compareProducts().count"
          >
          <?= /* @escapeNotVerified */ __('Compare Products') ?>
          <!--<span class="counter qty" data-bind="text: compareProducts().countCaption"></span>-->
          </a>
          </li>
          <script type="text/x-magento-init">
          "[data-role=compare-products-link]": "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
          </script>





          share|improve this answer























          • thanks that helped :)

            – nashwa ghazy
            yesterday















          0














          The PHTML file for header compare product is
          MAGENTO-ROOT/vendor/magento/module-catalog/view/frontend/templates/product/compare/link.phtml



          you can copy the PHTML file to your them and comment out the line as below



          Original code:



          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile
          ?>
          <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
          <a class="action compare no-display" title="<?= /* @escapeNotVerified */ __('Compare Products') ?>"
          data-bind="attr: 'href': compareProducts().listUrl, css: 'no-display': !compareProducts().count"
          >
          <?= /* @escapeNotVerified */ __('Compare Products') ?>
          <span class="counter qty" data-bind="text: compareProducts().countCaption"></span>
          </a>
          </li>
          <script type="text/x-magento-init">
          "[data-role=compare-products-link]": "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
          </script>


          Change the phtml code it to



          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile
          ?>
          <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
          <a class="action compare no-display" title="<?= /* @escapeNotVerified */ __('Compare Products') ?>"
          data-bind="attr: 'href': compareProducts().listUrl, css: 'no-display': !compareProducts().count"
          >
          <?= /* @escapeNotVerified */ __('Compare Products') ?>
          <!--<span class="counter qty" data-bind="text: compareProducts().countCaption"></span>-->
          </a>
          </li>
          <script type="text/x-magento-init">
          "[data-role=compare-products-link]": "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
          </script>





          share|improve this answer























          • thanks that helped :)

            – nashwa ghazy
            yesterday













          0












          0








          0







          The PHTML file for header compare product is
          MAGENTO-ROOT/vendor/magento/module-catalog/view/frontend/templates/product/compare/link.phtml



          you can copy the PHTML file to your them and comment out the line as below



          Original code:



          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile
          ?>
          <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
          <a class="action compare no-display" title="<?= /* @escapeNotVerified */ __('Compare Products') ?>"
          data-bind="attr: 'href': compareProducts().listUrl, css: 'no-display': !compareProducts().count"
          >
          <?= /* @escapeNotVerified */ __('Compare Products') ?>
          <span class="counter qty" data-bind="text: compareProducts().countCaption"></span>
          </a>
          </li>
          <script type="text/x-magento-init">
          "[data-role=compare-products-link]": "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
          </script>


          Change the phtml code it to



          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile
          ?>
          <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
          <a class="action compare no-display" title="<?= /* @escapeNotVerified */ __('Compare Products') ?>"
          data-bind="attr: 'href': compareProducts().listUrl, css: 'no-display': !compareProducts().count"
          >
          <?= /* @escapeNotVerified */ __('Compare Products') ?>
          <!--<span class="counter qty" data-bind="text: compareProducts().countCaption"></span>-->
          </a>
          </li>
          <script type="text/x-magento-init">
          "[data-role=compare-products-link]": "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
          </script>





          share|improve this answer













          The PHTML file for header compare product is
          MAGENTO-ROOT/vendor/magento/module-catalog/view/frontend/templates/product/compare/link.phtml



          you can copy the PHTML file to your them and comment out the line as below



          Original code:



          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile
          ?>
          <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
          <a class="action compare no-display" title="<?= /* @escapeNotVerified */ __('Compare Products') ?>"
          data-bind="attr: 'href': compareProducts().listUrl, css: 'no-display': !compareProducts().count"
          >
          <?= /* @escapeNotVerified */ __('Compare Products') ?>
          <span class="counter qty" data-bind="text: compareProducts().countCaption"></span>
          </a>
          </li>
          <script type="text/x-magento-init">
          "[data-role=compare-products-link]": "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
          </script>


          Change the phtml code it to



          <?php
          /**
          * Copyright © Magento, Inc. All rights reserved.
          * See COPYING.txt for license details.
          */

          // @codingStandardsIgnoreFile
          ?>
          <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
          <a class="action compare no-display" title="<?= /* @escapeNotVerified */ __('Compare Products') ?>"
          data-bind="attr: 'href': compareProducts().listUrl, css: 'no-display': !compareProducts().count"
          >
          <?= /* @escapeNotVerified */ __('Compare Products') ?>
          <!--<span class="counter qty" data-bind="text: compareProducts().countCaption"></span>-->
          </a>
          </li>
          <script type="text/x-magento-init">
          "[data-role=compare-products-link]": "Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
          </script>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 12 at 6:40









          Pritam Info 24Pritam Info 24

          79217




          79217












          • thanks that helped :)

            – nashwa ghazy
            yesterday

















          • thanks that helped :)

            – nashwa ghazy
            yesterday
















          thanks that helped :)

          – nashwa ghazy
          yesterday





          thanks that helped :)

          – nashwa ghazy
          yesterday

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f269787%2fhow-to-remove-items-count-from-compare-products-link-in-header%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Sum ergo cogito? 1 nng

          三茅街道4182Guuntc Dn precexpngmageondP