Fixed checkout for null sku https://gitee.com/beikeshop/beikeshop/issues/I7D59N?from=project-issue
This commit is contained in:
parent
2e7d2b7cb2
commit
f72b61a4a3
|
|
@ -34,6 +34,11 @@ class ProductSku extends Base
|
|||
$product = $this->product;
|
||||
$localeCode = locale();
|
||||
$variantLabel = '';
|
||||
|
||||
if(empty($product->variables)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
foreach ($product->variables as $index => $variable) {
|
||||
$valueIndex = $this->variants[$index];
|
||||
$variantName = $variable['name'][$localeCode] ?? '';
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ class CartService
|
|||
$product = $item->product ?? null;
|
||||
if (empty($description) || empty($product)) {
|
||||
$item->delete();
|
||||
return false;
|
||||
}
|
||||
|
||||
$cartQuantity = $item->quantity;
|
||||
|
|
|
|||
Loading…
Reference in New Issue