diff --git a/packages/Sarga/API/Http/Resources/Checkout/CartItemProduct.php b/packages/Sarga/API/Http/Resources/Checkout/CartItemProduct.php index b3fea7b28..ea860c22e 100644 --- a/packages/Sarga/API/Http/Resources/Checkout/CartItemProduct.php +++ b/packages/Sarga/API/Http/Resources/Checkout/CartItemProduct.php @@ -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), ]), ];