优化商品属性显示等
This commit is contained in:
parent
13936b36c2
commit
0c74f77fcc
|
|
@ -20,7 +20,7 @@ class ProductController extends Controller
|
|||
{
|
||||
$relationIds = $product->relations->pluck('id')->toArray();
|
||||
$product = ProductRepo::getProductDetail($product);
|
||||
dd((new ProductDetail($product))->jsonSerialize());
|
||||
|
||||
$data = [
|
||||
'product' => (new ProductDetail($product))->jsonSerialize(),
|
||||
'relations' => ProductRepo::getProductsByIds($relationIds)->jsonSerialize(),
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title', __('customer.customer_group'))
|
||||
@section('title', __('admin/common.customer_groups_index'))
|
||||
|
||||
@section('content')
|
||||
<div id="customer-app" class="card" v-cloak>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
{{-- {{ $customer_groups->links('admin::vendor/pagination/bootstrap-4') }} --}}
|
||||
</div>
|
||||
|
||||
<el-dialog title="{{ __('customer.customer_group') }}" :visible.sync="dialog.show" width="670px"
|
||||
<el-dialog title="{{ __('admin/common.customer_groups_index') }}" :visible.sync="dialog.show" width="670px"
|
||||
@close="closeCustomersDialog('form')" :close-on-click-modal="false">
|
||||
|
||||
<el-form ref="form" :rules="rules" :model="dialog.form" label-width="155px">
|
||||
|
|
|
|||
|
|
@ -251,12 +251,6 @@ body.page-product {
|
|||
width: 40%;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(2n+1) {
|
||||
td {
|
||||
background-color: rgba(249, 172, 17, .05);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
text-align: left;
|
||||
|
||||
.product-name {
|
||||
font-size: 18px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
return [
|
||||
'search' => 'Search',
|
||||
'add_to_favorites' => 'Add To Favorites',
|
||||
'add_to_cart' => 'Add to Shopping Cart',
|
||||
'add_to_cart' => 'Add To Cart',
|
||||
'buy_now' => 'Buy Now',
|
||||
'product_details' => 'Product Details',
|
||||
'in_stock' => 'In Stock',
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@ return [
|
|||
'name' => '姓名',
|
||||
'email' => 'Email',
|
||||
'from' => '注册来源',
|
||||
'customer_group' => '用户组',
|
||||
'customer_group' => '客户组',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -42,11 +42,10 @@
|
|||
@else
|
||||
<x-shop-no-data />
|
||||
@endif
|
||||
|
||||
{{ $products->links('shared/pagination/bootstrap-4') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ $products->links('shared/pagination/bootstrap-4') }}
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -153,14 +153,19 @@
|
|||
</div>
|
||||
<div class="tab-pane fade" id="product-attributes" role="tabpanel">
|
||||
<table class="table table-bordered attribute-table">
|
||||
<tbody>
|
||||
@foreach ($product['attributes'] as $item)
|
||||
<tr>
|
||||
<td>{{ $item['attribute'] }}</td>
|
||||
<td>{{ $item['attribute_value'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@foreach ($product['attributes'] as $group)
|
||||
<thead class="table-light">
|
||||
<tr><td colspan="2"><strong>{{ $group['attribute_group_name'] }}</strong></td></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($group['attributes'] as $item)
|
||||
<tr>
|
||||
<td>{{ $item['attribute'] }}</td>
|
||||
<td>{{ $item['attribute_value'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,46 +1,43 @@
|
|||
@if ($paginator->hasPages())
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||
<span class="page-link" aria-hidden="true">‹</span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<span class="page-link" aria-hidden="true">›</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="d-flex justify-content-center">
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||
<span class="page-link" aria-hidden="true">‹</span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a>
|
||||
</li>
|
||||
@endif
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||
@endif
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<span class="page-link" aria-hidden="true">›</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue