This commit is contained in:
Edward Yang 2023-07-10 17:47:41 +08:00
parent 2e7d2b7cb2
commit f72b61a4a3
2 changed files with 6 additions and 0 deletions

View File

@ -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] ?? '';

View File

@ -44,6 +44,7 @@ class CartService
$product = $item->product ?? null;
if (empty($description) || empty($product)) {
$item->delete();
return false;
}
$cartQuantity = $item->quantity;