Hide price from form of add product in BO Magento 2












1















I want to create all my configurable product without any price and I don't want to see the price information on the whole website.

How to proceed step by step, please?



Thanks in advance










share|improve this question





























    1















    I want to create all my configurable product without any price and I don't want to see the price information on the whole website.

    How to proceed step by step, please?



    Thanks in advance










    share|improve this question



























      1












      1








      1








      I want to create all my configurable product without any price and I don't want to see the price information on the whole website.

      How to proceed step by step, please?



      Thanks in advance










      share|improve this question
















      I want to create all my configurable product without any price and I don't want to see the price information on the whole website.

      How to proceed step by step, please?



      Thanks in advance







      magento2 price






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 4 mins ago









      magefms

      1,699425




      1,699425










      asked Dec 19 '18 at 16:05









      Developper Magento Developper Magento

      546110




      546110






















          1 Answer
          1






          active

          oldest

          votes


















          2














          You should create a plugin to hide product price, and then edit some templates like




          {magento_dir}/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
          {magento_dir}/vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml




          and anything else using $product->getPrice()



          With plugin, you can reference my example:



          1. app/code/Training/Test/etc/frontend/di.xml




          <type name="MagentoCatalogPricingRenderFinalPriceBox">
          <plugin name="training_final_price_box" type="TrainingTestPluginCatalogPricingRenderFinalPriceBox"/>
          </type>



          2. app/code/Training/Test/Plugin/Catalog/Pricing/Render/FinalPriceBox.php



          class FinalPriceBox
          {
          function aroundToHtml(MagentoCatalogPricingRenderFinalPriceBox $subject, Closure $proceed)
          {
          return '';
          }
          }


          Hope this will help you



          Regards






          share|improve this answer


























          • thanks for your replay but i did not understand the utility of the class Final Box : is it an override of something or just some clss to hide price in specific place ???

            – Developper Magento
            Dec 20 '18 at 8:06











          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%2f255241%2fhide-price-from-form-of-add-product-in-bo-magento-2%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









          2














          You should create a plugin to hide product price, and then edit some templates like




          {magento_dir}/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
          {magento_dir}/vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml




          and anything else using $product->getPrice()



          With plugin, you can reference my example:



          1. app/code/Training/Test/etc/frontend/di.xml




          <type name="MagentoCatalogPricingRenderFinalPriceBox">
          <plugin name="training_final_price_box" type="TrainingTestPluginCatalogPricingRenderFinalPriceBox"/>
          </type>



          2. app/code/Training/Test/Plugin/Catalog/Pricing/Render/FinalPriceBox.php



          class FinalPriceBox
          {
          function aroundToHtml(MagentoCatalogPricingRenderFinalPriceBox $subject, Closure $proceed)
          {
          return '';
          }
          }


          Hope this will help you



          Regards






          share|improve this answer


























          • thanks for your replay but i did not understand the utility of the class Final Box : is it an override of something or just some clss to hide price in specific place ???

            – Developper Magento
            Dec 20 '18 at 8:06
















          2














          You should create a plugin to hide product price, and then edit some templates like




          {magento_dir}/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
          {magento_dir}/vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml




          and anything else using $product->getPrice()



          With plugin, you can reference my example:



          1. app/code/Training/Test/etc/frontend/di.xml




          <type name="MagentoCatalogPricingRenderFinalPriceBox">
          <plugin name="training_final_price_box" type="TrainingTestPluginCatalogPricingRenderFinalPriceBox"/>
          </type>



          2. app/code/Training/Test/Plugin/Catalog/Pricing/Render/FinalPriceBox.php



          class FinalPriceBox
          {
          function aroundToHtml(MagentoCatalogPricingRenderFinalPriceBox $subject, Closure $proceed)
          {
          return '';
          }
          }


          Hope this will help you



          Regards






          share|improve this answer


























          • thanks for your replay but i did not understand the utility of the class Final Box : is it an override of something or just some clss to hide price in specific place ???

            – Developper Magento
            Dec 20 '18 at 8:06














          2












          2








          2







          You should create a plugin to hide product price, and then edit some templates like




          {magento_dir}/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
          {magento_dir}/vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml




          and anything else using $product->getPrice()



          With plugin, you can reference my example:



          1. app/code/Training/Test/etc/frontend/di.xml




          <type name="MagentoCatalogPricingRenderFinalPriceBox">
          <plugin name="training_final_price_box" type="TrainingTestPluginCatalogPricingRenderFinalPriceBox"/>
          </type>



          2. app/code/Training/Test/Plugin/Catalog/Pricing/Render/FinalPriceBox.php



          class FinalPriceBox
          {
          function aroundToHtml(MagentoCatalogPricingRenderFinalPriceBox $subject, Closure $proceed)
          {
          return '';
          }
          }


          Hope this will help you



          Regards






          share|improve this answer















          You should create a plugin to hide product price, and then edit some templates like




          {magento_dir}/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
          {magento_dir}/vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml




          and anything else using $product->getPrice()



          With plugin, you can reference my example:



          1. app/code/Training/Test/etc/frontend/di.xml




          <type name="MagentoCatalogPricingRenderFinalPriceBox">
          <plugin name="training_final_price_box" type="TrainingTestPluginCatalogPricingRenderFinalPriceBox"/>
          </type>



          2. app/code/Training/Test/Plugin/Catalog/Pricing/Render/FinalPriceBox.php



          class FinalPriceBox
          {
          function aroundToHtml(MagentoCatalogPricingRenderFinalPriceBox $subject, Closure $proceed)
          {
          return '';
          }
          }


          Hope this will help you



          Regards







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 20 '18 at 4:55









          Ashish Viradiya

          1,0241827




          1,0241827










          answered Dec 20 '18 at 3:21









          BabonBabon

          1,12710




          1,12710













          • thanks for your replay but i did not understand the utility of the class Final Box : is it an override of something or just some clss to hide price in specific place ???

            – Developper Magento
            Dec 20 '18 at 8:06



















          • thanks for your replay but i did not understand the utility of the class Final Box : is it an override of something or just some clss to hide price in specific place ???

            – Developper Magento
            Dec 20 '18 at 8:06

















          thanks for your replay but i did not understand the utility of the class Final Box : is it an override of something or just some clss to hide price in specific place ???

          – Developper Magento
          Dec 20 '18 at 8:06





          thanks for your replay but i did not understand the utility of the class Final Box : is it an override of something or just some clss to hide price in specific place ???

          – Developper Magento
          Dec 20 '18 at 8:06


















          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%2f255241%2fhide-price-from-form-of-add-product-in-bo-magento-2%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

          What other Star Trek series did the main TNG cast show up in?

          Berlina muro

          Berlina aerponto