From 6474ef6f67cbdddd904b6ba62572fe7b3cc59bc2 Mon Sep 17 00:00:00 2001 From: merdan Date: Fri, 1 Apr 2022 16:00:35 +0500 Subject: [PATCH] groupby color --- packages/Sarga/API/Http/Resources/Checkout/CartItemProduct.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Sarga/API/Http/Resources/Checkout/CartItemProduct.php b/packages/Sarga/API/Http/Resources/Checkout/CartItemProduct.php index 70fdb36c2..fd87f63e4 100644 --- a/packages/Sarga/API/Http/Resources/Checkout/CartItemProduct.php +++ b/packages/Sarga/API/Http/Resources/Checkout/CartItemProduct.php @@ -42,7 +42,7 @@ class CartItemProduct extends JsonResource return [ 'code' => $item->code, 'value' => $this->{$item->code}, - 'name' => $item->name, + 'name' => $item->name ?? $item->admin_name, 'label' => $item->options->where('id',$this->{$item->code})->first()->admin_name ]; })->toArray();