From: Vincent Vanwaelscappel Date: Thu, 12 Sep 2019 13:25:48 +0000 (+0200) Subject: fix #3008 @0:05 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e2cce1b19b6d04683625dae81e34802f44d3820b;p=pmi.git fix #3008 @0:05 --- diff --git a/app/Http/Controllers/ProductController.php b/app/Http/Controllers/ProductController.php index ffdd06c..ab6baca 100644 --- a/app/Http/Controllers/ProductController.php +++ b/app/Http/Controllers/ProductController.php @@ -22,9 +22,10 @@ class ProductController extends CubistFrontController $this->data['page'] = $this->data['product_type'] = $productType->getPageData(); $products = Product::with('media') // Eager load media to avoid N+1 query problem - ->where('product_type', $id) + ->where('product_type', $id) ->where('online', 1) ->where('public', 1) + ->orderBy('reference') ->get(); $this->data['products'] = [];