¨4.0.1¨
This commit is contained in:
@@ -9,8 +9,12 @@
|
||||
@endpush
|
||||
|
||||
@section('panel')
|
||||
<my-addresses :initial-addresses="{{ $addresses }}" :initial-default-address="{{ $defaultAddress }}"
|
||||
:countries="{{ json_encode($countries) }}" inline-template>
|
||||
<my-addresses
|
||||
:initial-addresses="{{ $addresses }}"
|
||||
:initial-default-address="{{ $defaultAddress }}"
|
||||
:countries="{{ json_encode($countries) }}"
|
||||
inline-template
|
||||
>
|
||||
<div class="panel">
|
||||
<div class="panel-header">
|
||||
<h4>{{ trans('storefront::account.pages.my_addresses') }}</h4>
|
||||
@@ -21,14 +25,20 @@
|
||||
<div class="address-card-wrap" v-if="hasAddress && ! formOpen">
|
||||
<div class="row">
|
||||
<div class="col-xl-6 col-lg-9 d-flex" v-for="address in addresses" :key="address.id">
|
||||
<address class="address-card" :class="{ active: defaultAddress.address_id === address.id }"
|
||||
@click="changeDefaultAddress(address)">
|
||||
<address
|
||||
class="address-card"
|
||||
:class="{ active: defaultAddress.address_id === address.id }"
|
||||
@click="changeDefaultAddress(address)"
|
||||
>
|
||||
<span class="badge" v-if="defaultAddress.address_id === address.id">
|
||||
{{ trans('storefront::account.addresses.default') }}
|
||||
</span>
|
||||
|
||||
<div class="address-card-data">
|
||||
<span v-text="address.full_name"></span>
|
||||
<span v-text="address.address_1"></span>
|
||||
<span v-if="address.address_2" v-text="address.address_2"></span>
|
||||
<span>@{{ address.city }}, @{{ address.state_name }}
|
||||
@{{ address.zip }}</span>
|
||||
<span>@{{ address.city }}, @{{ address.state_name }} @{{ address.zip }}</span>
|
||||
<span v-text="address.country_name"></span>
|
||||
</div>
|
||||
|
||||
@@ -46,8 +56,11 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-18">
|
||||
<button type="button" class="btn btn-lg btn-default btn-add-new-address"
|
||||
@click="formOpen = true">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-lg btn-default btn-add-new-address"
|
||||
@click="formOpen = true"
|
||||
>
|
||||
{{ trans('storefront::account.addresses.add_new_address') }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -147,10 +160,14 @@
|
||||
{{ trans('storefront::account.addresses.country') }}<span>*</span>
|
||||
</label>
|
||||
|
||||
<select :value="form.country" name="country" id="country"
|
||||
class="form-control arrow-black" @change="changeCountry($event.target.value)">
|
||||
<option v-for="(name, code) in countries" :value="code"
|
||||
v-text="name">
|
||||
<select
|
||||
:value="form.country"
|
||||
name="country"
|
||||
id="country"
|
||||
class="form-control arrow-black"
|
||||
@change="changeCountry($event.target.value)"
|
||||
>
|
||||
<option v-for="(name, code) in countries" :value="code" v-text="name">
|
||||
</option>
|
||||
</select>
|
||||
|
||||
@@ -186,13 +203,20 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-18">
|
||||
<button type="button" class="btn btn-lg btn-default btn-cancel" v-if="hasAddress"
|
||||
@click="cancel">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-lg btn-default btn-cancel"
|
||||
v-if="hasAddress"
|
||||
@click="cancel"
|
||||
>
|
||||
{{ trans('storefront::account.addresses.cancel') }}
|
||||
</button>
|
||||
|
||||
<button type="submit" class="btn btn-lg btn-primary btn-save-address"
|
||||
:class="{ 'btn-loading': loading }">
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-lg btn-primary btn-save-address"
|
||||
:class="{ 'btn-loading': loading }"
|
||||
>
|
||||
{{ trans('storefront::account.addresses.save_address') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,17 @@
|
||||
{{ $product->name }}
|
||||
</a>
|
||||
|
||||
@if ($product->hasAnyVariation())
|
||||
<ul class="list-inline product-options">
|
||||
@foreach ($product->variations as $variation)
|
||||
<li>
|
||||
<label>{{ $variation->name }}:</label>
|
||||
{{ $variation->values()->first()?->label }}{{ $loop->last ? "" : "," }}
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
@if ($product->hasAnyOption())
|
||||
<ul class="list-inline product-options">
|
||||
@foreach ($product->options as $option)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<li>
|
||||
<label>{{ trans('storefront::account.view_order.subtotal') }}</label>
|
||||
|
||||
<span class="price-amount">
|
||||
<span>
|
||||
{{ $order->sub_total->convert($order->currency, $order->currency_rate)->format($order->currency) }}
|
||||
</span>
|
||||
</li>
|
||||
@@ -12,7 +12,7 @@
|
||||
<li>
|
||||
<label>{{ $order->shipping_method }}</label>
|
||||
|
||||
<span class="price-amount">
|
||||
<span>
|
||||
{{ $order->shipping_cost->convert($order->currency, $order->currency_rate)->format($order->currency) }}
|
||||
</span>
|
||||
</li>
|
||||
@@ -22,7 +22,7 @@
|
||||
<li>
|
||||
<label>{{ $tax->name }}</label>
|
||||
|
||||
<span class="price-amount">
|
||||
<span>
|
||||
{{ $tax->order_tax->amount->convert($order->currency, $order->currency_rate)->format($order->currency) }}
|
||||
</span>
|
||||
</li>
|
||||
@@ -32,10 +32,10 @@
|
||||
<li>
|
||||
<label>
|
||||
{{ trans('storefront::account.view_order.coupon') }}
|
||||
<span class="coupon-code">[{{ $order->coupon->code }}]</span>
|
||||
<span class="coupon-code">({{ $order->coupon->code }})</span>
|
||||
</label>
|
||||
|
||||
<span class="price-amount">
|
||||
<span>
|
||||
-{{ $order->discount->convert($order->currency, $order->currency_rate)->format($order->currency) }}
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -7,18 +7,20 @@
|
||||
@endsection
|
||||
|
||||
@section('panel')
|
||||
<div class="panel">
|
||||
<div class="panel-header">
|
||||
<h4>{{ trans('storefront::account.pages.my_reviews') }}</h4>
|
||||
</div>
|
||||
<my-reviews inline-template>
|
||||
<div class="panel">
|
||||
<div class="panel-header">
|
||||
<h4>{{ trans('storefront::account.pages.my_reviews') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
@if ($reviews->isEmpty())
|
||||
<div class="empty-message">
|
||||
<h3>{{ trans('storefront::account.reviews.no_reviews') }}</h3>
|
||||
<div class="panel-body" :class="{ loading: fetchingReviews }" v-cloak>
|
||||
<div class="empty-message" v-if="reviewIsEmpty">
|
||||
<h3 v-if="!fetchingReviews">
|
||||
{{ trans('storefront::account.reviews.no_reviews') }}
|
||||
</h3>
|
||||
</div>
|
||||
@else
|
||||
<div class="table-responsive">
|
||||
|
||||
<div class="table-responsive" v-else>
|
||||
<table class="table table-borderless my-reviews-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -31,47 +33,57 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($reviews as $review)
|
||||
<tr>
|
||||
<td>
|
||||
<div class="product-image">
|
||||
@if ($review->product->base_image->exists)
|
||||
<img src="{{ $review->product->base_image->path }}" alt="{{ $review->product->name }}">
|
||||
@else
|
||||
<img src="{{ asset('themes/storefront/public/images/image-placeholder.png') }}" class="image-placeholder">
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<tr v-for="review in reviews.data" :key="review.id">
|
||||
<td>
|
||||
<div class="product-image">
|
||||
<img
|
||||
:src="baseImage(review.product)"
|
||||
:class="{ 'image-placeholder': ! hasBaseImage(review.product) }"
|
||||
:alt="review.product.name"
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="{{ route('products.show', ['slug' => $review->product->slug]) }}" class="product-name">
|
||||
{{ $review->product->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a :href="productUrl(review.product)" class="product-name">
|
||||
@{{ review.product.name }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="badge {{ $review->is_approved ? 'badge-success' : 'badge-secondary' }}">
|
||||
{{ $review->status() }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span
|
||||
class="badge"
|
||||
:class="review.is_approved ? 'badge-success' : 'badge-warning'"
|
||||
>
|
||||
@{{ review.status }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $review->created_at->toFormattedDateString() }}
|
||||
</td>
|
||||
<td>
|
||||
@{{ review.created_at_formatted }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@include('public.account.reviews.partials.product_rating')
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<td>
|
||||
<product-rating
|
||||
:rating-percent="review.rating_percent"
|
||||
>
|
||||
</product-rating>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-footer">
|
||||
{!! $reviews->links() !!}
|
||||
<div class="panel-footer">
|
||||
<v-pagination
|
||||
:total-page="totalPage"
|
||||
:current-page="currentPage"
|
||||
@page-changed="changePage"
|
||||
v-if="reviews.total > 10"
|
||||
>
|
||||
</v-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</my-reviews>
|
||||
@endsection
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="panel-body" :class="{ loading: fetchingWishlist }" v-cloak>
|
||||
<div class="empty-message" v-if="wishlistIsEmpty">
|
||||
<h3 v-if="! fetchingWishlist">
|
||||
<h3 v-if="!fetchingWishlist">
|
||||
{{ trans('storefront::account.wishlist.empty_wishlist') }}
|
||||
</h3>
|
||||
</div>
|
||||
@@ -36,7 +36,11 @@
|
||||
<tr v-for="product in products.data" :key="product.id">
|
||||
<td>
|
||||
<div class="product-image">
|
||||
<img :src="baseImage(product)" :class="{ 'image-placeholder': ! hasBaseImage(product) }" alt="product-image">
|
||||
<img
|
||||
:src="baseImage(product)"
|
||||
:class="{ 'image-placeholder': ! hasBaseImage(product) }"
|
||||
:alt="product.name"
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -47,11 +51,11 @@
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="product-price" v-html="product.formatted_price"></span>
|
||||
<span class="product-price" v-html="productPrice(product)"></span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="badge badge-success" v-if="product.is_in_stock">
|
||||
<span class="badge badge-success" v-if="productIsInStock(product)">
|
||||
{{ trans('storefront::account.wishlist.in_stock') }}
|
||||
</span>
|
||||
|
||||
@@ -76,8 +80,8 @@
|
||||
<v-pagination
|
||||
:total-page="totalPage"
|
||||
:current-page="currentPage"
|
||||
@page-changed="fetchProducts"
|
||||
v-if="products.total > 20"
|
||||
@page-changed="changePage"
|
||||
v-if="products.total > 10"
|
||||
>
|
||||
</v-pagination>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user