diff --git a/packages/Sarga/API/Http/Controllers/Products.php b/packages/Sarga/API/Http/Controllers/Products.php index 63cfa2f30..19ff88ea6 100644 --- a/packages/Sarga/API/Http/Controllers/Products.php +++ b/packages/Sarga/API/Http/Controllers/Products.php @@ -169,6 +169,7 @@ class Products extends ProductController public function searchProducts(){ + return $this->productRepository->searchProductByAttribute(request('key')); return ProductResource::collection($this->productRepository->searchProductByAttribute(request('key'))); } diff --git a/packages/Sarga/API/Http/Resources/Catalog/Product.php b/packages/Sarga/API/Http/Resources/Catalog/Product.php index b9962352a..1dd9323d0 100644 --- a/packages/Sarga/API/Http/Resources/Catalog/Product.php +++ b/packages/Sarga/API/Http/Resources/Catalog/Product.php @@ -215,7 +215,7 @@ class Product extends JsonResource 'color_count' => $this->variants->groupBy('color')->count(), ]; - Log::info($this->variants); +// Log::info($this->variants); if( $special_variant = $this->variants->whereNotNull('special_price')->sortBy('special_price')->first()){ $data = array_merge($data, [ 'special_price' => $special_variant->special_price,