购物车商品模型增加独立字段attr作为规格
修正安装完成时写入配置文件的域名 修正安装完成时写入配置文件的域名 购物车商品模型增加独立字段attr作为规格
This commit is contained in:
parent
b1ac15af0e
commit
d766dfbe36
|
|
@ -23,3 +23,4 @@ yarn-error.log
|
|||
mix-manifest.json
|
||||
package-lock.json
|
||||
dist
|
||||
/public/cache
|
||||
|
|
|
|||
|
|
@ -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" .
|
||||
|
|
|
|||
|
|
@ -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()),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<div class="name mb-1 fw-bold" v-text="product.name"></div>
|
||||
<div class="attr text-muted">@{{ product.variant_labels }}</div>
|
||||
<div class="price text-muted">@{{ product.price_format }}</div>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
<div class="product-info d-flex align-items-center">
|
||||
<div class="left"><a href="{{ shop_route('products.show', $cart['product_id']) }}" class="d-flex justify-content-between align-items-center h-100"><img src="{{ $cart['image'] }}" class="img-fluid"></a></div>
|
||||
<div class="right flex-grow-1">
|
||||
<a href="{{ shop_route('products.show', $cart['product_id']) }}" class="name fs-sm fw-bold mb-3 text-dark" title="{{ $cart['name'] }}">{{ $cart['name'] }}</a>
|
||||
<a href="{{ shop_route('products.show', $cart['product_id']) }}" class="name fs-sm fw-bold mb-2 text-dark" title="{{ $cart['name'] }}">{{ $cart['name'] }}</a>
|
||||
<div class="attr text-muted">{{ $cart['variant_labels'] }}</div>
|
||||
<div class="product-bottom d-flex justify-content-between align-items-center">
|
||||
<div class="price d-flex align-items-center">
|
||||
{{ $cart['price_format'] }} x
|
||||
|
|
|
|||
Loading…
Reference in New Issue