discounted configurables
This commit is contained in:
parent
9f8bc6de23
commit
e4a9ca873e
|
|
@ -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')));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue