From e99ec805fd85ff18cc460c095031ce3be84d8871 Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Thu, 30 Jan 2020 15:00:04 -0500 Subject: [PATCH] fixed item with sub qty of 0 --- src/CartItem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CartItem.php b/src/CartItem.php index 908bb39..679ad8f 100644 --- a/src/CartItem.php +++ b/src/CartItem.php @@ -262,7 +262,7 @@ public function subItemsTotal($format = true, $taxedItemsOnly = false, $withTax $total = 0; foreach ($this->subItems as $subItem) { - $total += $subItem->price(false, $taxedItemsOnly) * (!empty($subItem->qty) ?: 1); + $total += $subItem->price(false, $taxedItemsOnly) * (!empty($subItem->qty) ? $subItem->qty : 1); } if ($withTax) {