Bagisto Forum

    Bagisto

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

    Quantity 0 for configurable product

    Bug Report
    3
    4
    236
    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.
    • S
      sfarzoso last edited by

      Hi, I would like to display the sum of the quantity of all variations associated to a configurable product. Actually, within the ProductDataGrid, the prepareQueryBuilder contains this:

      DB::raw('SUM(DISTINCT ' . DB::getTablePrefix() . 'product_inventories.qty) as quantity')

      is there a way to sum the quantity of all the variations in a configurable product instead of display 0?

      1 Reply Last reply Reply Quote 0
      • A
        Amitk-Webkul last edited by

        Hi there,

        presently we are not providing the condition to show the sum of all the variants.

        1 Reply Last reply Reply Quote 0
        • S
          sfarzoso last edited by

          @Amitk-Webkul said in Quantity 0 for configurable product:

          Hi there,

          presently we are not providing the condition to show the sum of all the variants.

          is there a way to achieve this?

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

            Yes, you can do it. You need to do the summation of all the child products. For that we have product_inventories.

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