cart product adn super attributes
This commit is contained in:
parent
cf740f86c7
commit
40adca458b
|
|
@ -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),
|
||||
]),
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue