This commit is contained in:
Edward Yang 2022-08-17 18:56:19 +08:00
parent db4c22cf31
commit 97780cb2f9
1 changed files with 2 additions and 1 deletions

View File

@ -23,12 +23,13 @@ class WishlistDetail extends JsonResource
$product = $this->product;
$masterSku = $product->master_sku;
$image = $this->product->image ?: $masterSku->image;
$productName = $product->description->name ?? '';
$data = [
'id' => $this->id,
'product_id' => $this->product_id,
'image' => image_resize($image),
'product_name' => $product->description->name,
'product_name' => sub_string($productName,24),
'price' => currency_format($masterSku->price)
];