Show SPU image for product list
This commit is contained in:
parent
9ecf31aecd
commit
130a4544cc
|
|
@ -30,12 +30,8 @@ class ProductSimple extends JsonResource
|
|||
throw new \Exception("invalid master sku for product {$this->id}");
|
||||
}
|
||||
|
||||
$name = $this->description->name ?? '';
|
||||
if ($masterSku && $masterSku->images) {
|
||||
$images = $masterSku->images;
|
||||
} else {
|
||||
$images = $this->images ?? [];
|
||||
}
|
||||
$name = $this->description->name ?? '';
|
||||
$images = $this->images;
|
||||
|
||||
$data = [
|
||||
'id' => $this->id,
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ class CheckoutService
|
|||
|
||||
public function initTotalService()
|
||||
{
|
||||
$customer = $this->customer;
|
||||
$customer = $this->customer;
|
||||
$totalClass = hook_filter('service.checkout.total_service', 'Beike\Shop\Services\TotalService');
|
||||
$totalService = (new $totalClass($this->cart, CartService::list($customer, true)));
|
||||
$this->totalService = $totalService;
|
||||
|
|
@ -240,7 +240,7 @@ class CheckoutService
|
|||
$cartList = CartService::list($customer, true);
|
||||
$carts = CartService::reloadData($cartList);
|
||||
|
||||
if (!$this->totalService) {
|
||||
if (! $this->totalService) {
|
||||
$this->initTotalService();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue