Bagisto Forum

    Bagisto

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

    Product Inventory not working

    General Discussion
    2
    2
    135
    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.
    • M
      matheen last edited by

      Hi

      I'm updating the product inventory from API using product id. So I was updating manually like this

       ProductInventory::where('product_id', $product->product_id)
                          ->where('inventory_source_id', 1)
                          ->update(['qty' => 10]);
      

      After this I can see the update in dashboard and database. But in frontend it is showing out of stock. After debugging I came to know this function is returning 0 qty.

      public function haveSufficientQuantity($qty)
          {
              return $this->getTypeInstance()->haveSufficientQuantity($qty);
          }
      

      I'm new to bagisto but i'm not understanding what is wrong.

      Thank you

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

        Hi there,
        Please followup Here

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