Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    how to check remaning stock quantities?

    Knowledge Base
    5
    6
    725
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Ashishaxat last edited by

      How the admin will check about product, i.e how many quantities are remaning and how many are sold out? if i add configurable product and 2 quantity, and placed the order of 2 quantity from customer login, next time now that product should show 'out of stock' but it is still showing ;in stock' and if we try to add to cart then its giving error..
      1)by admin side how we can check the remaining quantity?
      2)and when will the 'out of stock' tag will work ?

      1 Reply Last reply Reply Quote 0
      • S
        shivam-webkul last edited by

        Hi @Ashishaxat ,

        If you visit

        packages/Webkul/Product/src/Type/AbstractType.php
        

        Then you will see all the product related method, you can access all the method which you need
        Ex -

        $product->getTypeInstance()->methods_name();
        

        and you can get current product quantity by accessing following methods

        $product->getTypeInstance()->totalQuantity();
        

        Thanks.

        S 1 Reply Last reply Reply Quote 0
        • V
          Vaishali Agarwal last edited by

          @Ashishaxat

          1. the remaining qty will be visible in product edit page https://prnt.sc/sahzj2, each product grid https://prnt.sc/sahs2g, & also when you shipped the product, the remaining qty is visible.

          2. 'Out of Stock' will visible when product has 0 qty remaining.

          1 Reply Last reply Reply Quote 0
          • A
            Ashishaxat last edited by

            @shivam-webkul @Vaishali-Agarwal
            Thank you for the help

            1 Reply Last reply Reply Quote 0
            • S
              shahbaz123 @shivam-webkul last edited by

              @shivam-webkul in simple product $product->getTypeInstance()->totalQuantity(); that work fine but not work for configure product.
              How can we check for configured products?

              1 Reply Last reply Reply Quote 0
              • sanjay-webkul
                sanjay-webkul last edited by

                @shahbaz123
                If you trying to see the quantity of the configurable product, then Please take a reference from here.
                And if you are asking for something else then please let me know.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post