Quantity 0 for configurable product
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?
presently we are not providing the condition to show the sum of all the variants.
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