From d38625c74c586b086eab0a57746039bfe73e4b48 Mon Sep 17 00:00:00 2001 From: merdan Date: Fri, 14 Oct 2022 11:32:28 +0500 Subject: [PATCH] colorvariant size variant changes --- .../API/Http/Resources/Catalog/ColorVariant.php | 14 +++++++------- .../Sarga/API/Http/Resources/Catalog/Product.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/Sarga/API/Http/Resources/Catalog/ColorVariant.php b/packages/Sarga/API/Http/Resources/Catalog/ColorVariant.php index 056b1e340..bb09d5d55 100644 --- a/packages/Sarga/API/Http/Resources/Catalog/ColorVariant.php +++ b/packages/Sarga/API/Http/Resources/Catalog/ColorVariant.php @@ -15,14 +15,14 @@ class ColorVariant extends Product $product = $this->product ? $this->product : $this; return [ - 'id' => $product->id, - 'type' => $product->type, - 'name' => $product->name, - 'description' => $product->description, - 'images' => ProductImage::collection($product->images), - 'size_variants' => SizeVariant::collection($product->variants), + 'id' => $product->id, + 'type' => $product->type, + 'name' => $product->name, + 'description' => $product->description, + 'brand' => $product->brand->name ?? '', + 'images' => ProductImage::collection($product->images), + 'size_variants' => SizeVariant::collection($product->variants), $this->merge($this->specialPriceInfo()), - ]; } } \ No newline at end of file diff --git a/packages/Sarga/API/Http/Resources/Catalog/Product.php b/packages/Sarga/API/Http/Resources/Catalog/Product.php index 27a39f743..fdec42e38 100644 --- a/packages/Sarga/API/Http/Resources/Catalog/Product.php +++ b/packages/Sarga/API/Http/Resources/Catalog/Product.php @@ -23,7 +23,7 @@ class Product extends JsonResource 'id' => $product->id, 'type' => $product->type, 'name' => $product->name, -// 'description' => $product->description, + 'description' => $product->description, // 'is_wishlisted' => $this->isWishlisted($product), //todo transfer to mobile // 'is_item_in_cart' => \Cart::hasProduct($product),//todo transfer to mobile // 'shop_title' => $this->shop_title,