diff --git a/packages/Sarga/API/Http/Controllers/Products.php b/packages/Sarga/API/Http/Controllers/Products.php index 0bdbd6325..63cfa2f30 100644 --- a/packages/Sarga/API/Http/Controllers/Products.php +++ b/packages/Sarga/API/Http/Controllers/Products.php @@ -132,7 +132,7 @@ class Products extends ProductController // ->where('status',1) // ->orderBy('name','asc') ->take(10) - ->query(fn ($query) => $query->select('id','name')->where('status',1)->orderBy('name')) + ->query(fn ($query) => $query->select('id','name')->orderBy('name')) ->get(); if($brands->count()){ diff --git a/packages/Sarga/API/Http/Resources/Catalog/Product.php b/packages/Sarga/API/Http/Resources/Catalog/Product.php index d77577884..5b2d165a2 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(), ]; - if( $special_variant = $this->variants()->whereNotNull('special_price')->orderBy('special_price')->first()){ + if( $special_variant = $this->variants->whereNotNull('special_price')->orderBy('special_price')->first()){ $data = array_merge($data, [ 'special_price' => $special_variant->special_price, 'formatted_special_price' => core()->currency($special_variant->special_price),