how to check remaning stock quantities?
-
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 ? -
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.
-
-
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.
-
'Out of Stock' will visible when product has 0 qty remaining.
-
-
@shivam-webkul @Vaishali-Agarwal
Thank you for the help -
@shivam-webkul in simple product $product->getTypeInstance()->totalQuantity(); that work fine but not work for configure product.
How can we check for configured products? -
@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.