This commit is contained in:
parent
de4f48065b
commit
d881e4e795
|
|
@ -35,7 +35,7 @@ class ProductDetail extends JsonResource
|
|||
'category_id' => $this->category_id ?? null,
|
||||
'variables' => $this->decodeVariables($this->variables),
|
||||
'skus' => SkuDetail::collection($this->skus)->jsonSerialize(),
|
||||
'in_wishlist' => CustomerRepo::inWishlist($this->resource, current_customer()),
|
||||
'in_wishlist' => $this->inCurrentWishlist->id ?? 0,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class ProductList extends JsonResource
|
|||
'price_format' => currency_format($masterSku->price),
|
||||
'origin_price_format' => currency_format($masterSku->origin_price),
|
||||
'category_id' => $this->category_id ?? null,
|
||||
'in_wishlist' => $this->inCurrentWishlist->id ?? 0,
|
||||
|
||||
'images' => array_map(function ($item) {
|
||||
return image_resize($item, 400, 400);
|
||||
|
|
|
|||
Loading…
Reference in New Issue