From 588d5fd5c034171ed1801b036077124df45db8e1 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 4 Mar 2019 16:27:22 -0600 Subject: [PATCH] Event quantity not returning when under 8 --- src/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/functions.php b/src/functions.php index 7d18fb7..226486f 100644 --- a/src/functions.php +++ b/src/functions.php @@ -66,12 +66,13 @@ function shoppingCartLineItem($name, $price, $description = '') function eventPricing($qty) { $tableQty = 0; - $eventQty = 0; // If pricing is 8 or more then we need to factor in table reservations if ($qty > 7) { $tableQty = (int) ($qty / 8); $eventQty = $qty - ($tableQty * 8); + }else { + $eventQty = $qty; } return [$tableQty, $eventQty];