cart product adn super attributes

This commit is contained in:
merdan 2022-02-28 17:09:53 +05:00
parent cf740f86c7
commit 40adca458b
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class CartItemProduct extends JsonResource
'name' => $product->name,
'images' => ProductImage::collection($product->images),
/* super attributes */
$this->mergeWhen($product->parent, [
$this->mergeWhen(!empty($product->parent), [
'super_attributes' => $this->super_attributes($product->parent->super_attributes),
]),
];