diff --git a/.gitignore b/.gitignore index 79326f2f..8f4f8744 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ yarn-error.log mix-manifest.json package-lock.json dist +/public/cache diff --git a/beike/Installer/Helpers/EnvironmentManager.php b/beike/Installer/Helpers/EnvironmentManager.php index 469fedf2..ce79080b 100644 --- a/beike/Installer/Helpers/EnvironmentManager.php +++ b/beike/Installer/Helpers/EnvironmentManager.php @@ -95,12 +95,7 @@ class EnvironmentManager $results = trans('installer::installer_messages.environment.success'); $scheme = is_secure() ? 'https' : 'http'; - $appUrl = $scheme . "://"; - if ($_SERVER["SERVER_PORT"] != "80") { - $appUrl .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"]; - } else { - $appUrl .= $_SERVER["SERVER_NAME"]; - } + $appUrl = $scheme . "://" . $_SERVER["HTTP_HOST"]; $envFileData = 'APP_NAME=\'' . ($request->app_name ?: 'BeikeShop') . "'\n" . diff --git a/beike/Shop/Http/Resources/CartDetail.php b/beike/Shop/Http/Resources/CartDetail.php index 51e61a0a..839ed654 100644 --- a/beike/Shop/Http/Resources/CartDetail.php +++ b/beike/Shop/Http/Resources/CartDetail.php @@ -26,12 +26,6 @@ class CartDetail extends JsonResource $subTotal = $price * $this->quantity; $image = $sku->image ?: $product->image; - - $variantLabel = $sku->getVariantLabel(); - if ($variantLabel) { - $productName .= ' - ' . trim($variantLabel); - } - return [ 'cart_id' => $this->id, 'product_id' => $this->product_id, @@ -48,6 +42,7 @@ class CartDetail extends JsonResource 'tax_class_id' => $product->tax_class_id, 'subtotal' => $subTotal, 'subtotal_format' => currency_format($subTotal), + 'variant_labels' => trim($sku->getVariantLabel()), ]; } } diff --git a/themes/default/cart/cart.blade.php b/themes/default/cart/cart.blade.php index f6b48b80..b7590c65 100644 --- a/themes/default/cart/cart.blade.php +++ b/themes/default/cart/cart.blade.php @@ -49,6 +49,7 @@
+
@{{ product.variant_labels }}
@{{ product.price_format }}
diff --git a/themes/default/cart/mini.blade.php b/themes/default/cart/mini.blade.php index 314c4386..e04a6422 100644 --- a/themes/default/cart/mini.blade.php +++ b/themes/default/cart/mini.blade.php @@ -16,7 +16,8 @@
- {{ $cart['name'] }} + {{ $cart['name'] }} +
{{ $cart['variant_labels'] }}
{{ $cart['price_format'] }} x