From 8dfb53c7920a9dc0e5eba2baa5d27d60d6ec9c40 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 12 Jan 2018 11:32:53 +0100 Subject: [PATCH] Set index on $cart_add_qties --- override/classes/Cart.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/override/classes/Cart.php b/override/classes/Cart.php index 5ea0c4b9..58a9d93d 100755 --- a/override/classes/Cart.php +++ b/override/classes/Cart.php @@ -606,6 +606,9 @@ class Cart extends CartCore { $cart_add_qties[$p_key] += $quantity * $pack_item['quantity']; $cart_add_ids[] = $pack_item['id_product_item']; } + if (!isset($cart_add_qties[$id_product . '_0'])){ + $cart_add_qties[$id_product . '_0'] = 0; + } $cart_add_qties[$id_product . '_0'] += $quantity; $cart_add_ids[] = (int) $id_product; } @@ -694,6 +697,9 @@ class Cart extends CartCore { $cart_add_qties[$p_key] += $quantity * $pack_item['quantity']; $cart_add_ids[] = $pack_item['id_product_item']; } + if (!isset($cart_add_qties[$id_product . '_0'])){ + $cart_add_qties[$id_product . '_0'] = 0; + } $cart_add_qties[$id_product . '_0'] += $quantity; $cart_add_ids[] = (int) $id_product; }