From 2292ec2267e0a0b6263044ceb34fc27fca5ec089 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 10 Sep 2019 15:05:58 +0200 Subject: [PATCH] fix #3021 @0.5 --- app/Models/Product.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Models/Product.php b/app/Models/Product.php index ebf261d..2ff9657 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -361,13 +361,13 @@ class Product extends CubistMagicPageModel foreach ($products as $product) { self::$_cart_data[] = [ - 'id' => $product->id, - 'name' => $product->name, + 'id' => $product->id, + 'name' => $product->name, 'reference' => $product->reference, - 'category' => $product->type->name, - 'quantity' => $cart_items[$product->id], - 'image' => $product->image, - 'URL' => $product->url, + 'category' => $product->type->name, + 'quantity' => $cart_items[$product->id], + 'image' => $product->image, + 'URL' => $product->url, ]; } } @@ -445,7 +445,6 @@ class Product extends CubistMagicPageModel } - foreach ($data->options as $index => $option) { if (is_scalar($option)) { $o = $option; @@ -467,6 +466,7 @@ class Product extends CubistMagicPageModel $f['min'] = INF; $f['max'] = -INF; $f['unit'] = $data->unit; + $f['type'] = 'range'; if ($data->type == 'numeric') { $f['prefix'] = $data['prefix']; @@ -496,7 +496,7 @@ class Product extends CubistMagicPageModel } } else { $f['min'] = min($f['min'], $v); - $f['max'] = min($f['max'], $v); + $f['max'] = max($f['max'], $v); if (null !== $filter_value) { if (null === $v || ($v >= $filter_value[0] && $v <= $filter_value[0])) { $matching[] = $product->id; -- 2.39.5