Magento 2.3.1 manage stock = no but showing only 0 leftMagento 2: What Determines if a Request is “Full Page Cacheable”Out of stock products still appear in the frontend, search and others - Magento 2.1.0Deferred stock update in Magento 2.1 CE - Stock not being updated?Magento2 REST API products list and out of stockMagento2 Possible to configure “Decrease Stock When Order is Placed” On storeview level?Magento 2.2.3 - CMS Home Page not showing for other store viewAlert stock email not receivedHow to show Qty left in Magento 2 Listing page?Magento 2 How to upgrade existing custom customer address attribute?One Invetory / Multiple Stores / Multiple Users / One Admin

Why does the 6502 have the BIT instruction?

Why is this Simple Puzzle impossible to solve?

Rename photos to match video titles

Array Stutter Implementation

Is CD audio quality good enough for the final delivery of music?

How to capture more stars?

Different circular sectors as new logo of the International System

Would jet fuel for an F-16 or F-35 be producible during WW2?

Employer asking for online access to bank account - Is this a scam?

Logarithm of dependent variable is uniformly distributed. How to calculate a confidence interval for the mean?

Why is desire the root of suffering?

Is there an evolutionary advantage to having two heads?

What's the Difference between Two Single-Quotes and One Double-Quote?

Tic-Tac-Toe for the terminal

I think I may have violated academic integrity last year - what should I do?

What is the 中 in ダウンロード中?

How to prevent bad sectors?

1960s sci-fi novella with a character who is treated as invisible by being ignored

Identifying an object pointer by generating and using a unique ID

How do I align equations in three columns, justified right, center and left?

When did God say "let all the angels of God worship him" as stated in Hebrews 1:6?

Apparent Ring of Craters on the Moon

How long does it take to crack RSA 1024 with a PC?

Integrating an absolute function using Mathematica



Magento 2.3.1 manage stock = no but showing only 0 left


Magento 2: What Determines if a Request is “Full Page Cacheable”Out of stock products still appear in the frontend, search and others - Magento 2.1.0Deferred stock update in Magento 2.1 CE - Stock not being updated?Magento2 REST API products list and out of stockMagento2 Possible to configure “Decrease Stock When Order is Placed” On storeview level?Magento 2.2.3 - CMS Home Page not showing for other store viewAlert stock email not receivedHow to show Qty left in Magento 2 Listing page?Magento 2 How to upgrade existing custom customer address attribute?One Invetory / Multiple Stores / Multiple Users / One Admin






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








1















I have turned on the feature in Magento that shows only x remaining when the stock is less than 5 which works fine.



However on products that are set to stock manage = no, it's showing there's only 0 left which isn't true as it's set to not stock manage.



I've found it's bringing it in because of this function $block->isMsgVisible() in module-catalog-inventory



When I look at that function it's simply doing the following



 public function isMsgVisible()

return $this->getStockQty() > 0
&& $this->getStockQtyLeft() > 0
&& $this->getStockQtyLeft() <= $this->getThresholdQty();



Which doesn't take into consideration the fact it's set to stock manage = no.



How would I add in a check to see if it's stock manage = yes or no? I've tried a couple of things with no luck.










share|improve this question






























    1















    I have turned on the feature in Magento that shows only x remaining when the stock is less than 5 which works fine.



    However on products that are set to stock manage = no, it's showing there's only 0 left which isn't true as it's set to not stock manage.



    I've found it's bringing it in because of this function $block->isMsgVisible() in module-catalog-inventory



    When I look at that function it's simply doing the following



     public function isMsgVisible()

    return $this->getStockQty() > 0
    && $this->getStockQtyLeft() > 0
    && $this->getStockQtyLeft() <= $this->getThresholdQty();



    Which doesn't take into consideration the fact it's set to stock manage = no.



    How would I add in a check to see if it's stock manage = yes or no? I've tried a couple of things with no luck.










    share|improve this question


























      1












      1








      1


      0






      I have turned on the feature in Magento that shows only x remaining when the stock is less than 5 which works fine.



      However on products that are set to stock manage = no, it's showing there's only 0 left which isn't true as it's set to not stock manage.



      I've found it's bringing it in because of this function $block->isMsgVisible() in module-catalog-inventory



      When I look at that function it's simply doing the following



       public function isMsgVisible()

      return $this->getStockQty() > 0
      && $this->getStockQtyLeft() > 0
      && $this->getStockQtyLeft() <= $this->getThresholdQty();



      Which doesn't take into consideration the fact it's set to stock manage = no.



      How would I add in a check to see if it's stock manage = yes or no? I've tried a couple of things with no luck.










      share|improve this question
















      I have turned on the feature in Magento that shows only x remaining when the stock is less than 5 which works fine.



      However on products that are set to stock manage = no, it's showing there's only 0 left which isn't true as it's set to not stock manage.



      I've found it's bringing it in because of this function $block->isMsgVisible() in module-catalog-inventory



      When I look at that function it's simply doing the following



       public function isMsgVisible()

      return $this->getStockQty() > 0
      && $this->getStockQtyLeft() > 0
      && $this->getStockQtyLeft() <= $this->getThresholdQty();



      Which doesn't take into consideration the fact it's set to stock manage = no.



      How would I add in a check to see if it's stock manage = yes or no? I've tried a couple of things with no luck.







      magento2 stores qty






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 22 at 8:01









      Muhammad Anas

      1,1603525




      1,1603525










      asked May 21 at 16:47









      Will WrightWill Wright

      3221213




      3221213




















          0






          active

          oldest

          votes












          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%2f275516%2fmagento-2-3-1-manage-stock-no-but-showing-only-0-left%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          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%2f275516%2fmagento-2-3-1-manage-stock-no-but-showing-only-0-left%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

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

          Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?