Show SPU image for product list

This commit is contained in:
Edward Yang 2023-06-07 19:23:34 +08:00
parent 9ecf31aecd
commit 130a4544cc
2 changed files with 4 additions and 8 deletions

View File

@ -31,11 +31,7 @@ class ProductSimple extends JsonResource
}
$name = $this->description->name ?? '';
if ($masterSku && $masterSku->images) {
$images = $masterSku->images;
} else {
$images = $this->images ?? [];
}
$images = $this->images;
$data = [
'id' => $this->id,

View File

@ -240,7 +240,7 @@ class CheckoutService
$cartList = CartService::list($customer, true);
$carts = CartService::reloadData($cartList);
if (!$this->totalService) {
if (! $this->totalService) {
$this->initTotalService();
}