sarga theme
This commit is contained in:
parent
b08c2dc852
commit
62d17126c1
|
|
@ -23,11 +23,11 @@ class ShopServiceProvider extends ServiceProvider
|
|||
public function boot(Router $router)
|
||||
{
|
||||
/* publishers */
|
||||
// $this->publishes([
|
||||
$this->publishes([
|
||||
// __DIR__ . '/../../publishable/assets' => public_path('themes/default/assets'),
|
||||
// __DIR__ . '/../Resources/views' => resource_path('themes/default/views'),
|
||||
__DIR__ . '/../Resources/views' => resource_path('themes/default/views'),
|
||||
// __DIR__ . '/../Resources/lang' => resource_path('lang/vendor/shop'),
|
||||
// ]);
|
||||
],'sarga_theme');
|
||||
|
||||
/* loaders */
|
||||
// $this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');
|
||||
|
|
|
|||
|
|
@ -0,0 +1,139 @@
|
|||
@if ($cart)
|
||||
<script type="text/x-template" id="coupon-component-template">
|
||||
<div class="coupon-container">
|
||||
<div class="discount-control">
|
||||
<form class="coupon-form" method="post" @submit.prevent="applyCoupon">
|
||||
<div class="control-group" :class="[errorMessage ? 'has-error' : '']">
|
||||
<input type="text" class="control" v-model="couponCode" name="code" placeholder="{{ __('shop::app.checkout.onepage.enter-coupon-code') }}">
|
||||
|
||||
<div class="control-error">@{{ errorMessage }}</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-lg btn-black" :disabled="disableButton">{{ __('shop::app.checkout.onepage.apply-coupon') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="applied-coupon-details" v-if="appliedCoupon">
|
||||
<label>{{ __('shop::app.checkout.total.coupon-applied') }}</label>
|
||||
|
||||
<label class="right" style="display: inline-flex; align-items: center;">
|
||||
<b>@{{ appliedCoupon }}</b>
|
||||
|
||||
<span class="icon cross-icon" title="{{ __('shop::app.checkout.total.remove-coupon') }}" v-on:click="removeCoupon"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('coupon-component', {
|
||||
template: '#coupon-component-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
couponCode: '',
|
||||
|
||||
appliedCoupon: "{{ $cart->coupon_code }}",
|
||||
|
||||
errorMessage: '',
|
||||
|
||||
routeName: "{{ request()->route()->getName() }}",
|
||||
|
||||
disableButton: false,
|
||||
|
||||
removeIconEnabled: true
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
couponCode: function (value) {
|
||||
if (value != '') {
|
||||
this.errorMessage = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
applyCoupon: function() {
|
||||
let self = this;
|
||||
|
||||
if (! this.couponCode.length) {
|
||||
this.errorMessage = '{{ __('shop::app.checkout.total.invalid-coupon') }}';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
self.errorMessage = null;
|
||||
|
||||
self.disableButton = true;
|
||||
|
||||
axios.post('{{ route('shop.checkout.cart.coupon.apply') }}', {code: self.couponCode})
|
||||
.then(function(response) {
|
||||
if (response.data.success) {
|
||||
self.$emit('onApplyCoupon');
|
||||
|
||||
self.appliedCoupon = self.couponCode;
|
||||
|
||||
self.couponCode = '';
|
||||
|
||||
window.flashMessages = [{'type': 'alert-success', 'message': response.data.message}];
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
|
||||
self.redirectIfCartPage();
|
||||
} else {
|
||||
self.errorMessage = response.data.message;
|
||||
}
|
||||
|
||||
self.disableButton = false;
|
||||
})
|
||||
.catch(function(error) {
|
||||
self.errorMessage = error.response.data.message;
|
||||
|
||||
self.disableButton = false;
|
||||
});
|
||||
},
|
||||
|
||||
removeCoupon: function () {
|
||||
let self = this;
|
||||
|
||||
if (self.removeIconEnabled) {
|
||||
self.removeIconEnabled = false;
|
||||
|
||||
axios.delete('{{ route('shop.checkout.coupon.remove.coupon') }}')
|
||||
.then(function(response) {
|
||||
self.$emit('onRemoveCoupon')
|
||||
|
||||
self.appliedCoupon = '';
|
||||
|
||||
self.removeIconEnabled = true;
|
||||
|
||||
window.flashMessages = [{'type': 'alert-success', 'message': response.data.message}];
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
|
||||
self.redirectIfCartPage();
|
||||
})
|
||||
.catch(function(error) {
|
||||
window.flashMessages = [{'type': 'alert-error', 'message': error.response.data.message}];
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
|
||||
self.removeIconEnabled = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
redirectIfCartPage: function() {
|
||||
if (this.routeName != 'shop.checkout.cart.index') return;
|
||||
|
||||
setTimeout(function() {
|
||||
window.location.reload();
|
||||
}, 700);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
|
@ -0,0 +1,342 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.checkout.cart.title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
<section class="cart">
|
||||
@if ($cart)
|
||||
<div class="title">
|
||||
{{ __('shop::app.checkout.cart.title') }}
|
||||
</div>
|
||||
|
||||
<div class="cart-content">
|
||||
<div class="left-side">
|
||||
<div style="display: flex;justify-content: flex-end;margin-bottom: 20px;">
|
||||
<form
|
||||
method="POST"
|
||||
action="{{ route('cart.remove.all.items') }}">
|
||||
@csrf
|
||||
<button
|
||||
type="submit"
|
||||
onclick="return confirm('{{ __('shop::app.checkout.cart.confirm-action') }}')"
|
||||
class="btn btn-lg btn-primary">
|
||||
|
||||
{{ __('shop::app.checkout.cart.remove-all-items') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<form action="{{ route('shop.checkout.cart.update') }}" method="POST" @submit.prevent="onSubmit">
|
||||
|
||||
<div class="cart-item-list" style="margin-top: 0">
|
||||
@csrf
|
||||
@foreach ($cart->items as $key => $item)
|
||||
@php
|
||||
$productBaseImage = $item->product->getTypeInstance()->getBaseImage($item);
|
||||
|
||||
if (is_null($item->product->url_key)) {
|
||||
if (! is_null($item->product->parent)) {
|
||||
$url_key = $item->product->parent->url_key;
|
||||
}
|
||||
} else {
|
||||
$url_key = $item->product->url_key;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="item mt-5">
|
||||
<div class="item-image" style="margin-right: 15px;">
|
||||
<a href="{{ route('shop.productOrCategory.index', $url_key) }}"><img src="{{ $productBaseImage['medium_image_url'] }}" alt="" /></a>
|
||||
</div>
|
||||
|
||||
<div class="item-details">
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.name.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-title">
|
||||
<a href="{{ route('shop.productOrCategory.index', $url_key) }}">
|
||||
{{ $item->product->name }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.name.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.price.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="price">
|
||||
{{ core()->currency($item->base_price) }}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.price.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.options.before', ['item' => $item]) !!}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.options.after', ['item' => $item]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.quantity.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="misc">
|
||||
@if ($item->product->getTypeInstance()->showQuantityBox() === true)
|
||||
<quantity-changer
|
||||
:control-name="'qty[{{$item->id}}]'"
|
||||
quantity="{{$item->quantity}}">
|
||||
</quantity-changer>
|
||||
@endif
|
||||
|
||||
<span class="remove">
|
||||
<a href="{{ route('shop.checkout.cart.remove', $item->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.remove-link') }}</a></span>
|
||||
|
||||
@auth('customer')
|
||||
@php
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
@if ($showWishlist)
|
||||
<span class="towishlist">
|
||||
@if (
|
||||
$item->parent_id != 'null'
|
||||
|| $item->parent_id != null
|
||||
)
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onclick="moveToWishlist('{{ __('shop::app.checkout.cart.cart-remove-action') }}', '{{ route('shop.movetowishlist', $item->id) }}')">
|
||||
{{ __('shop::app.checkout.cart.move-to-wishlist') }}
|
||||
</a>
|
||||
@else
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onclick="moveToWishlist('{{ __('shop::app.checkout.cart.cart-remove-action') }}', '{{ route('shop.movetowishlist', $item->child->id) }}')">
|
||||
{{ __('shop::app.checkout.cart.move-to-wishlist') }}
|
||||
</a>
|
||||
@endif
|
||||
</span>
|
||||
@endif
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.item.quantity.after', ['item' => $item]) !!}
|
||||
|
||||
@if (! cart()->isItemHaveQuantity($item))
|
||||
<div class="error-message mt-15">
|
||||
* {{ __('shop::app.checkout.cart.quantity-error') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.controls.after', ['cart' => $cart]) !!}
|
||||
|
||||
<div class="misc-controls">
|
||||
<a href="{{ route('shop.home.index') }}" class="link">{{ __('shop::app.checkout.cart.continue-shopping') }}</a>
|
||||
|
||||
<div style="display:flex;">
|
||||
@if ($cart->hasProductsWithQuantityBox())
|
||||
<button type="submit" class="btn btn-lg btn-primary" id="update_cart_button">
|
||||
{{ __('shop::app.checkout.cart.update-cart') }}
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if (! cart()->hasError())
|
||||
@php
|
||||
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
@endphp
|
||||
|
||||
<proceed-to-checkout
|
||||
href="{{ route('shop.checkout.onepage.index') }}"
|
||||
add-class="btn btn-lg btn-primary"
|
||||
text="{{ __('shop::app.checkout.cart.proceed-to-checkout') }}"
|
||||
is-minimum-order-completed="{{ $cart->checkMinimumOrder() }}"
|
||||
minimum-order-message="{{ __('shop::app.checkout.cart.minimum-order-message', ['amount' => core()->currency($minimumOrderAmount)]) }}">
|
||||
</proceed-to-checkout>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.controls.after', ['cart' => $cart]) !!}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="right-side">
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.summary.after', ['cart' => $cart]) !!}
|
||||
|
||||
@include('shop::checkout.total.summary', ['cart' => $cart])
|
||||
|
||||
<coupon-component></coupon-component>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.summary.after', ['cart' => $cart]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include ('shop::products.view.cross-sells')
|
||||
|
||||
@else
|
||||
|
||||
<div class="title">
|
||||
{{ __('shop::app.checkout.cart.title') }}
|
||||
</div>
|
||||
|
||||
<div class="cart-content">
|
||||
<p>
|
||||
{{ __('shop::app.checkout.cart.empty') }}
|
||||
</p>
|
||||
|
||||
<p style="display: inline-block;">
|
||||
<a style="display: inline-block;" href="{{ route('shop.home.index') }}" class="btn btn-lg btn-primary">{{ __('shop::app.checkout.cart.continue-shopping') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@include('shop::checkout.cart.coupon')
|
||||
|
||||
<script type="text/x-template" id="quantity-changer-template">
|
||||
<div class="quantity control-group" :class="[errors.has(controlName) ? 'has-error' : '']">
|
||||
<div class="wrap">
|
||||
<label>{{ __('shop::app.products.quantity') }}</label>
|
||||
|
||||
<button type="button" class="decrease" @click="decreaseQty()">-</button>
|
||||
|
||||
<input
|
||||
ref="quantityChanger"
|
||||
class="control"
|
||||
:name="controlName"
|
||||
:model="qty"
|
||||
v-validate="validations"
|
||||
data-vv-as=""{{ __('shop::app.products.quantity') }}""
|
||||
@keyup="setQty($event)">
|
||||
|
||||
<button type="button" class="increase" @click="increaseQty()">+</button>
|
||||
</div>
|
||||
|
||||
<span class="control-error" v-if="errors.has(controlName)">@{{ errors.first(controlName) }}</span>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('quantity-changer', {
|
||||
template: '#quantity-changer-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
||||
props: {
|
||||
controlName: {
|
||||
type: String,
|
||||
default: 'quantity'
|
||||
},
|
||||
|
||||
quantity: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
},
|
||||
|
||||
minQuantity: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
},
|
||||
|
||||
validations: {
|
||||
type: String,
|
||||
default: 'required|numeric|min_value:1'
|
||||
}
|
||||
},
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
qty: this.quantity
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
this.$refs.quantityChanger.value = this.qty > this.minQuantity
|
||||
? this.qty
|
||||
: this.minQuantity;
|
||||
},
|
||||
|
||||
watch: {
|
||||
qty: function (val) {
|
||||
this.$refs.quantityChanger.value = ! isNaN(parseFloat(val)) ? val : 0;
|
||||
|
||||
this.qty = ! isNaN(parseFloat(val)) ? this.qty : 0;
|
||||
|
||||
this.$emit('onQtyUpdated', this.qty);
|
||||
|
||||
this.$validator.validate();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
setQty: function({ target }) {
|
||||
this.qty = parseInt(target.value);
|
||||
},
|
||||
|
||||
decreaseQty: function() {
|
||||
if (this.qty > this.minQuantity) {
|
||||
this.qty = parseInt(this.qty) - 1;
|
||||
}
|
||||
},
|
||||
|
||||
increaseQty: function() {
|
||||
this.qty = parseInt(this.qty) + 1;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function removeLink(message) {
|
||||
if (! confirm(message)) {
|
||||
event.preventDefault();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function moveToWishlist(message, route) {
|
||||
if (! confirm(message)) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
axios.post(route, {'redirect': false})
|
||||
.then((response) => {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
function updateCartQunatity(operation, index) {
|
||||
var quantity = document.getElementById('cart-quantity'+index).value;
|
||||
|
||||
if (operation == 'add') {
|
||||
quantity = parseInt(quantity) + 1;
|
||||
} else if (operation == 'remove') {
|
||||
if (quantity > 1) {
|
||||
quantity = parseInt(quantity) - 1;
|
||||
} else {
|
||||
alert('{{ __('shop::app.products.less-quantity') }}');
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('cart-quantity'+index).value = quantity;
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
@php
|
||||
$cart = cart()->getCart();
|
||||
@endphp
|
||||
|
||||
@if ($cart)
|
||||
@php
|
||||
$items = $cart->items;
|
||||
@endphp
|
||||
|
||||
<div class="dropdown-toggle">
|
||||
<a class="cart-link" href="{{ route('shop.checkout.cart.index') }}">
|
||||
<span class="icon cart-icon"></span>
|
||||
</a>
|
||||
|
||||
<span class="name">
|
||||
{{ __('shop::app.header.cart') }}
|
||||
<span class="count"> ({{ $cart->items->count() }})</span>
|
||||
</span>
|
||||
|
||||
<i class="icon arrow-down-icon"></i>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-list" style="display: none; top: 52px; right: 0px;">
|
||||
<div class="dropdown-container">
|
||||
<div class="dropdown-cart">
|
||||
<div class="dropdown-header">
|
||||
<p class="heading">
|
||||
{{ __('shop::app.checkout.cart.cart-subtotal') }} -
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.subtotal.before', ['cart' => $cart]) !!}
|
||||
|
||||
@if (Webkul\Tax\Helpers\Tax::isTaxInclusive())
|
||||
<b>{{ core()->currency($cart->base_grand_total) }}</b>
|
||||
@else
|
||||
<b>{{ core()->currency($cart->base_sub_total) }}</b>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.subtotal.after', ['cart' => $cart]) !!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-content">
|
||||
@foreach ($items as $item)
|
||||
<div class="item">
|
||||
<div class="item-image" >
|
||||
@php
|
||||
$images = $item->product->getTypeInstance()->getBaseImage($item);
|
||||
@endphp
|
||||
|
||||
<a href="{{ route('shop.productOrCategory.index', $item->product->url_key) }}" title="{{ $item->name }}">
|
||||
<img src="{{ $images['small_image_url'] }}" alt=""/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="item-details">
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.name.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-name">
|
||||
<a href="{{ route('shop.productOrCategory.index', $item->product->url_key) }}" title="{{ $item->name }}">
|
||||
{{ $item->name }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.name.after', ['item' => $item]) !!}
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.options.before', ['item' => $item]) !!}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.options.after', ['item' => $item]) !!}
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.price.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-price">
|
||||
@if (Webkul\Tax\Helpers\Tax::isTaxInclusive())
|
||||
<b>{{ core()->currency($item->base_total + $item->tax_amount) }}</b>
|
||||
@else
|
||||
<b>{{ core()->currency($item->base_total) }}</b>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.price.after', ['item' => $item]) !!}
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.quantity.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-qty">Quantity : {{ $item->quantity }}</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart-mini.item.quantity.after', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-remove">
|
||||
<a href="{{ route('shop.checkout.cart.remove', $item->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.remove-link') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="dropdown-footer">
|
||||
<a href="{{ route('shop.checkout.cart.index') }}">{{ __('shop::app.minicart.view-cart') }}</a>
|
||||
|
||||
@php
|
||||
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
@endphp
|
||||
|
||||
<proceed-to-checkout
|
||||
href="{{ route('shop.checkout.onepage.index') }}"
|
||||
add-class="btn btn-primary btn-lg"
|
||||
text="{{ __('shop::app.minicart.checkout') }}"
|
||||
is-minimum-order-completed="{{ $cart->checkMinimumOrder() }}"
|
||||
minimum-order-message="{{ __('shop::app.checkout.cart.minimum-order-message', ['amount' => core()->currency($minimumOrderAmount)]) }}"
|
||||
style="color: white;">
|
||||
</proceed-to-checkout>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="dropdown-toggle">
|
||||
<div style="display: inline-block; cursor: not-allowed">
|
||||
<span class="icon cart-icon"></span>
|
||||
<span class="name">{{ __('shop::app.minicart.cart') }}<span class="count"> ({{ __('shop::app.minicart.zero') }}) </span></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -0,0 +1,608 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.checkout.onepage.title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
<checkout></checkout>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@include('shop::checkout.cart.coupon')
|
||||
|
||||
<script type="text/x-template" id="checkout-template">
|
||||
<div id="checkout" class="checkout-process">
|
||||
<div class="col-main">
|
||||
<ul class="checkout-steps">
|
||||
<li class="active" :class="[completed_step >= 0 ? 'active' : '', completed_step > 0 ? 'completed' : '']" @click="navigateToStep(1)">
|
||||
<div class="decorator address-info"></div>
|
||||
|
||||
<span>{{ __('shop::app.checkout.onepage.information') }}</span>
|
||||
</li>
|
||||
|
||||
<div class="line mb-25"></div>
|
||||
|
||||
@if ($cart->haveStockableItems())
|
||||
<li :class="[current_step == 2 || completed_step > 1 ? 'active' : '', completed_step > 1 ? 'completed' : '']" @click="navigateToStep(2)">
|
||||
<div class="decorator shipping"></div>
|
||||
|
||||
<span>{{ __('shop::app.checkout.onepage.shipping') }}</span>
|
||||
</li>
|
||||
|
||||
<div class="line mb-25"></div>
|
||||
@endif
|
||||
|
||||
<li :class="[current_step == 3 || completed_step > 2 ? 'active' : '', completed_step > 2 ? 'completed' : '']" @click="navigateToStep(3)">
|
||||
<div class="decorator payment"></div>
|
||||
|
||||
<span>{{ __('shop::app.checkout.onepage.payment') }}</span>
|
||||
</li>
|
||||
|
||||
<div class="line mb-25"></div>
|
||||
|
||||
<li :class="[current_step == 4 ? 'active' : '']">
|
||||
<div class="decorator review"></div>
|
||||
<span>{{ __('shop::app.checkout.onepage.review') }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="step-content information" v-show="current_step == 1" id="address-section">
|
||||
@include('shop::checkout.onepage.customer-info')
|
||||
|
||||
<div class="button-group">
|
||||
<button type="button" class="btn btn-lg btn-primary" @click="validateForm('address-form')" :disabled="disable_button" id="checkout-address-continue-button">
|
||||
{{ __('shop::app.checkout.onepage.continue') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step-content shipping" v-show="current_step == 2" id="shipping-section">
|
||||
<shipping-section v-if="current_step == 2" @onShippingMethodSelected="shippingMethodSelected($event)"></shipping-section>
|
||||
|
||||
<div class="button-group">
|
||||
<button type="button" class="btn btn-lg btn-primary" @click="validateForm('shipping-form')" :disabled="disable_button" id="checkout-shipping-continue-button">
|
||||
{{ __('shop::app.checkout.onepage.continue') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step-content payment" v-show="current_step == 3" id="payment-section">
|
||||
<payment-section v-if="current_step == 3" @onPaymentMethodSelected="paymentMethodSelected($event)"></payment-section>
|
||||
|
||||
<div class="button-group">
|
||||
<button type="button" class="btn btn-lg btn-primary" @click="validateForm('payment-form')" :disabled="disable_button" id="checkout-payment-continue-button">
|
||||
{{ __('shop::app.checkout.onepage.continue') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step-content review" v-show="current_step == 4" id="summary-section">
|
||||
<review-section v-if="current_step == 4" :key="reviewComponentKey">
|
||||
<div slot="summary-section">
|
||||
<summary-section :key="summeryComponentKey"></summary-section>
|
||||
|
||||
<coupon-component
|
||||
@onApplyCoupon="getOrderSummary"
|
||||
@onRemoveCoupon="getOrderSummary">
|
||||
</coupon-component>
|
||||
</div>
|
||||
</review-section>
|
||||
|
||||
<div class="button-group">
|
||||
<button type="button" class="btn btn-lg btn-primary" @click="placeOrder()" :disabled="disable_button" id="checkout-place-order-button" v-if="selected_payment_method.method != 'paypal_smart_button'">
|
||||
{{ __('shop::app.checkout.onepage.place-order') }}
|
||||
</button>
|
||||
|
||||
<div class="paypal-button-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-right" v-show="current_step != 4">
|
||||
<summary-section :key="summeryComponentKey"></summary-section>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
let shippingHtml = '';
|
||||
let paymentHtml = '';
|
||||
let reviewHtml = '';
|
||||
let summaryHtml = '';
|
||||
let customerAddress = '';
|
||||
let shippingMethods = '';
|
||||
let paymentMethods = '';
|
||||
|
||||
@auth('customer')
|
||||
@if(auth('customer')->user()->addresses)
|
||||
customerAddress = @json(auth('customer')->user()->addresses);
|
||||
customerAddress.email = "{{ auth('customer')->user()->email }}";
|
||||
customerAddress.first_name = "{{ auth('customer')->user()->first_name }}";
|
||||
customerAddress.last_name = "{{ auth('customer')->user()->last_name }}";
|
||||
@endif
|
||||
@endauth
|
||||
|
||||
Vue.component('checkout', {
|
||||
template: '#checkout-template',
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
step_numbers: {
|
||||
'information': 1,
|
||||
'shipping': 2,
|
||||
'payment': 3,
|
||||
'review': 4
|
||||
},
|
||||
|
||||
current_step: 1,
|
||||
|
||||
completed_step: 0,
|
||||
|
||||
address: {
|
||||
billing: {
|
||||
address1: [''],
|
||||
|
||||
use_for_shipping: true,
|
||||
},
|
||||
|
||||
shipping: {
|
||||
address1: ['']
|
||||
},
|
||||
},
|
||||
|
||||
selected_shipping_method: '',
|
||||
|
||||
selected_payment_method: '',
|
||||
|
||||
disable_button: false,
|
||||
|
||||
new_shipping_address: false,
|
||||
|
||||
new_billing_address: false,
|
||||
|
||||
allAddress: {},
|
||||
|
||||
countryStates: @json(core()->groupedStatesByCountries()),
|
||||
|
||||
country: @json(core()->countries()),
|
||||
|
||||
summeryComponentKey: 0,
|
||||
|
||||
reviewComponentKey: 0,
|
||||
|
||||
is_customer_exist: 0
|
||||
}
|
||||
},
|
||||
|
||||
created: function() {
|
||||
this.getOrderSummary();
|
||||
|
||||
if(! customerAddress) {
|
||||
this.new_shipping_address = true;
|
||||
this.new_billing_address = true;
|
||||
} else {
|
||||
this.address.billing.first_name = this.address.shipping.first_name = customerAddress.first_name;
|
||||
this.address.billing.last_name = this.address.shipping.last_name = customerAddress.last_name;
|
||||
this.address.billing.email = this.address.shipping.email = customerAddress.email;
|
||||
|
||||
if (customerAddress.length < 1) {
|
||||
this.new_shipping_address = true;
|
||||
this.new_billing_address = true;
|
||||
} else {
|
||||
this.allAddress = customerAddress;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
navigateToStep: function(step) {
|
||||
if (step <= this.completed_step) {
|
||||
this.current_step = step
|
||||
this.completed_step = step - 1;
|
||||
}
|
||||
},
|
||||
|
||||
haveStates: function(addressType) {
|
||||
if (this.countryStates[this.address[addressType].country] && this.countryStates[this.address[addressType].country].length)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
validateForm: async function(scope) {
|
||||
let self = this;
|
||||
|
||||
await this.$validator.validateAll(scope).then(function (result) {
|
||||
if (result) {
|
||||
if (scope == 'address-form') {
|
||||
self.saveAddress();
|
||||
} else if (scope == 'shipping-form') {
|
||||
self.saveShipping();
|
||||
} else if (scope == 'payment-form') {
|
||||
self.savePayment();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
isCustomerExist: function() {
|
||||
this.$validator.attach({ name: "email", rules: "required|email" });
|
||||
|
||||
let self = this;
|
||||
|
||||
this.$validator.validate('email', this.address.billing.email)
|
||||
.then(function(isValid) {
|
||||
if (! isValid)
|
||||
return;
|
||||
|
||||
self.$http.post("{{ route('customer.checkout.exist') }}", {email: self.address.billing.email})
|
||||
.then(function(response) {
|
||||
self.is_customer_exist = response.data ? 1 : 0;
|
||||
})
|
||||
.catch(function (error) {})
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
loginCustomer: function() {
|
||||
let self = this;
|
||||
|
||||
self.$http.post("{{ route('customer.checkout.login') }}", {
|
||||
email: self.address.billing.email,
|
||||
password: self.address.billing.password
|
||||
})
|
||||
.then(function(response) {
|
||||
if (response.data.success) {
|
||||
window.location.href = "{{ route('shop.checkout.onepage.index') }}";
|
||||
} else {
|
||||
window.flashMessages = [{'type': 'alert-error', 'message': response.data.error }];
|
||||
|
||||
self.$root.addFlashMessages()
|
||||
}
|
||||
})
|
||||
.catch(function (error) {})
|
||||
},
|
||||
|
||||
getOrderSummary () {
|
||||
let self = this;
|
||||
|
||||
this.$http.get("{{ route('shop.checkout.summary') }}")
|
||||
.then(function(response) {
|
||||
summaryHtml = Vue.compile(response.data.html)
|
||||
|
||||
self.summeryComponentKey++;
|
||||
})
|
||||
.catch(function (error) {})
|
||||
},
|
||||
|
||||
saveAddress: async function() {
|
||||
let self = this;
|
||||
|
||||
this.disable_button = true;
|
||||
this.saveAddressCheckbox = $('input[name="billing[save_as_address]"]');
|
||||
|
||||
if (this.saveAddressCheckbox.prop('checked') == true) {
|
||||
this.saveAddressCheckbox.attr('disabled', 'disabled');
|
||||
this.saveAddressCheckbox.prop('checked', true);
|
||||
}
|
||||
|
||||
if (this.allAddress.length > 0) {
|
||||
let address = this.allAddress.forEach(address => {
|
||||
if (address.id == this.address.billing.address_id) {
|
||||
this.address.billing.address1 = [address.address1];
|
||||
}
|
||||
|
||||
if (address.id == this.address.shipping.address_id) {
|
||||
this.address.shipping.address1 = [address.address1];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.$http.post("{{ route('shop.checkout.save-address') }}", this.address)
|
||||
.then(function(response) {
|
||||
self.disable_button = false;
|
||||
|
||||
if (self.step_numbers[response.data.jump_to_section] == 2)
|
||||
shippingHtml = Vue.compile(response.data.html)
|
||||
else
|
||||
paymentHtml = Vue.compile(response.data.html)
|
||||
|
||||
self.completed_step = self.step_numbers[response.data.jump_to_section] - 1;
|
||||
self.current_step = self.step_numbers[response.data.jump_to_section];
|
||||
|
||||
shippingMethods = response.data.shippingMethods;
|
||||
paymentMethods = response.data.paymentMethods;
|
||||
|
||||
self.getOrderSummary();
|
||||
})
|
||||
.catch(function (error) {
|
||||
self.disable_button = false;
|
||||
|
||||
self.handleErrorResponse(error.response, 'address-form')
|
||||
})
|
||||
},
|
||||
|
||||
saveShipping: async function() {
|
||||
let self = this;
|
||||
|
||||
this.disable_button = true;
|
||||
|
||||
this.$http.post("{{ route('shop.checkout.save-shipping') }}", {'shipping_method': this.selected_shipping_method})
|
||||
.then(function(response) {
|
||||
self.disable_button = false;
|
||||
|
||||
paymentHtml = Vue.compile(response.data.html)
|
||||
self.completed_step = self.step_numbers[response.data.jump_to_section] - 1;
|
||||
self.current_step = self.step_numbers[response.data.jump_to_section];
|
||||
|
||||
paymentMethods = response.data.paymentMethods;
|
||||
|
||||
self.getOrderSummary();
|
||||
})
|
||||
.catch(function (error) {
|
||||
self.disable_button = false;
|
||||
|
||||
self.handleErrorResponse(error.response, 'shipping-form')
|
||||
})
|
||||
},
|
||||
|
||||
savePayment: async function() {
|
||||
let self = this;
|
||||
|
||||
this.disable_button = true;
|
||||
|
||||
this.$http.post("{{ route('shop.checkout.save-payment') }}", {'payment': this.selected_payment_method})
|
||||
.then(function(response) {
|
||||
self.disable_button = false;
|
||||
|
||||
reviewHtml = Vue.compile(response.data.html)
|
||||
self.completed_step = self.step_numbers[response.data.jump_to_section] - 1;
|
||||
self.current_step = self.step_numbers[response.data.jump_to_section];
|
||||
|
||||
self.getOrderSummary();
|
||||
})
|
||||
.catch(function (error) {
|
||||
self.disable_button = false;
|
||||
|
||||
self.handleErrorResponse(error.response, 'payment-form')
|
||||
});
|
||||
},
|
||||
|
||||
placeOrder: async function() {
|
||||
let self = this;
|
||||
|
||||
this.disable_button = true;
|
||||
|
||||
this.$http.post("{{ route('shop.checkout.save-order') }}", {'_token': "{{ csrf_token() }}"})
|
||||
.then(function(response) {
|
||||
if (response.data.success) {
|
||||
if (response.data.redirect_url) {
|
||||
window.location.href = response.data.redirect_url;
|
||||
} else {
|
||||
window.location.href = "{{ route('shop.checkout.success') }}";
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
self.disable_button = true;
|
||||
|
||||
window.flashMessages = [{'type': 'alert-error', 'message': "{{ __('shop::app.common.error') }}" }];
|
||||
|
||||
self.$root.addFlashMessages()
|
||||
})
|
||||
},
|
||||
|
||||
handleErrorResponse: function(response, scope) {
|
||||
if (response.status == 422) {
|
||||
serverErrors = response.data.errors;
|
||||
this.$root.addServerErrors(scope)
|
||||
} else if (response.status == 403) {
|
||||
if (response.data.redirect_url) {
|
||||
window.location.href = response.data.redirect_url;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
shippingMethodSelected: function(shippingMethod) {
|
||||
this.selected_shipping_method = shippingMethod;
|
||||
},
|
||||
|
||||
paymentMethodSelected: function(paymentMethod) {
|
||||
this.selected_payment_method = paymentMethod;
|
||||
},
|
||||
|
||||
newBillingAddress: function() {
|
||||
this.new_billing_address = true;
|
||||
this.address.billing.address_id = null;
|
||||
},
|
||||
|
||||
newShippingAddress: function() {
|
||||
this.new_shipping_address = true;
|
||||
this.address.shipping.address_id = null;
|
||||
},
|
||||
|
||||
backToSavedBillingAddress: function() {
|
||||
this.new_billing_address = false;
|
||||
},
|
||||
|
||||
backToSavedShippingAddress: function() {
|
||||
this.new_shipping_address = false;
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
let shippingTemplateRenderFns = [];
|
||||
|
||||
Vue.component('shipping-section', {
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
templateRender: null,
|
||||
|
||||
selected_shipping_method: '',
|
||||
|
||||
first_iteration : true,
|
||||
}
|
||||
},
|
||||
|
||||
staticRenderFns: shippingTemplateRenderFns,
|
||||
|
||||
mounted: function() {
|
||||
for (method in shippingMethods) {
|
||||
if (this.first_iteration) {
|
||||
for (rate in shippingMethods[method]['rates']) {
|
||||
this.selected_shipping_method = shippingMethods[method]['rates'][rate]['method'];
|
||||
this.first_iteration = false;
|
||||
this.methodSelected();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.templateRender = shippingHtml.render;
|
||||
for (let i in shippingHtml.staticRenderFns) {
|
||||
shippingTemplateRenderFns.push(shippingHtml.staticRenderFns[i]);
|
||||
}
|
||||
|
||||
eventBus.$emit('after-checkout-shipping-section-added');
|
||||
},
|
||||
|
||||
render: function(h) {
|
||||
return h('div', [
|
||||
(this.templateRender ?
|
||||
this.templateRender() :
|
||||
'')
|
||||
]);
|
||||
},
|
||||
|
||||
methods: {
|
||||
methodSelected: function() {
|
||||
this.$emit('onShippingMethodSelected', this.selected_shipping_method)
|
||||
|
||||
eventBus.$emit('after-shipping-method-selected', this.selected_shipping_method);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let paymentTemplateRenderFns = [];
|
||||
|
||||
Vue.component('payment-section', {
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
templateRender: null,
|
||||
|
||||
payment: {
|
||||
method: ""
|
||||
},
|
||||
|
||||
first_iteration : true,
|
||||
}
|
||||
},
|
||||
|
||||
staticRenderFns: paymentTemplateRenderFns,
|
||||
|
||||
mounted: function() {
|
||||
for (method in paymentMethods) {
|
||||
if (this.first_iteration) {
|
||||
this.payment.method = paymentMethods[method]['method'];
|
||||
this.first_iteration = false;
|
||||
this.methodSelected();
|
||||
}
|
||||
}
|
||||
|
||||
this.templateRender = paymentHtml.render;
|
||||
for (let i in paymentHtml.staticRenderFns) {
|
||||
paymentTemplateRenderFns.push(paymentHtml.staticRenderFns[i]);
|
||||
}
|
||||
|
||||
eventBus.$emit('after-checkout-payment-section-added');
|
||||
},
|
||||
|
||||
render: function(h) {
|
||||
return h('div', [
|
||||
(this.templateRender ?
|
||||
this.templateRender() :
|
||||
'')
|
||||
]);
|
||||
},
|
||||
|
||||
methods: {
|
||||
methodSelected: function() {
|
||||
this.$emit('onPaymentMethodSelected', this.payment);
|
||||
|
||||
$('.paypal-button-container').empty();
|
||||
|
||||
eventBus.$emit('after-payment-method-selected', this.payment);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let reviewTemplateRenderFns = [];
|
||||
|
||||
Vue.component('review-section', {
|
||||
data: function() {
|
||||
return {
|
||||
templateRender: null,
|
||||
|
||||
error_message: ''
|
||||
}
|
||||
},
|
||||
|
||||
staticRenderFns: reviewTemplateRenderFns,
|
||||
|
||||
render: function(h) {
|
||||
return h('div', [
|
||||
(this.templateRender ?
|
||||
this.templateRender() :
|
||||
'')
|
||||
]);
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
this.templateRender = reviewHtml.render;
|
||||
|
||||
for (let i in reviewHtml.staticRenderFns) {
|
||||
reviewTemplateRenderFns[i] = reviewHtml.staticRenderFns[i];
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
}
|
||||
});
|
||||
|
||||
let summaryTemplateRenderFns = [];
|
||||
|
||||
Vue.component('summary-section', {
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
templateRender: null
|
||||
}
|
||||
},
|
||||
|
||||
staticRenderFns: summaryTemplateRenderFns,
|
||||
|
||||
mounted: function() {
|
||||
this.templateRender = summaryHtml.render;
|
||||
|
||||
for (let i in summaryHtml.staticRenderFns) {
|
||||
summaryTemplateRenderFns[i] = summaryHtml.staticRenderFns[i];
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
render: function(h) {
|
||||
return h('div', [
|
||||
(this.templateRender ?
|
||||
this.templateRender() :
|
||||
'')
|
||||
]);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<div v-if="is_customer_exist">
|
||||
<div class="control-group" id="password">
|
||||
<label for="password">{{ __('shop::app.checkout.onepage.password') }}</label>
|
||||
|
||||
<input type="password" class="control" id="password" name="password" v-model="address.billing.password"/>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="login-and-forgot-btn">
|
||||
<div class="forgot-password-link" style="float: right; margin-right: 503px; margin-top: 11px;">
|
||||
<a href="{{ route('customer.forgot-password.create') }}">{{ __('shop::app.customer.login-form.forgot_pass') }}</a>
|
||||
|
||||
<div class="mt-10">
|
||||
@if (
|
||||
Cookie::has('enable-resend')
|
||||
&& Cookie::get('enable-resend') == true
|
||||
)
|
||||
<a href="{{ route('customer.resend.verification-email', Cookie::get('email-for-resend')) }}">{{ __('shop::app.customer.login-form.resend-verification') }}</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type='button' id="" class="btn btn-primary btn-lg btn-login" @click="loginCustomer">
|
||||
{{ __('shop::app.customer.login-form.button_title') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,690 @@
|
|||
<form data-vv-scope="address-form">
|
||||
<div class="form-container" v-if="! this.new_billing_address">
|
||||
<div class="form-header mb-30">
|
||||
<span class="checkout-step-heading">{{ __('shop::app.checkout.onepage.billing-address') }}</span>
|
||||
|
||||
<a class="btn btn-lg btn-primary" @click="newBillingAddress()">
|
||||
{{ __('shop::app.checkout.onepage.new-address') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="address-holder">
|
||||
<div class="address-card" v-for='(addresses, index) in this.allAddress'>
|
||||
<div class="checkout-address-content" style="display: flex; flex-direction: row; justify-content: space-between; width: 100%;">
|
||||
<label class="radio-container" style="float: right; width: 10%;">
|
||||
<input type="radio" v-validate="'required'" id="billing[address_id]" name="billing[address_id]" :value="addresses.id" v-model="address.billing.address_id" data-vv-as=""{{ __('shop::app.checkout.onepage.billing-address') }}"">
|
||||
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
|
||||
<ul class="address-card-list" style="float: right; width: 85%;">
|
||||
<li class="mb-10">
|
||||
<b v-text="`${allAddress.first_name} ${allAddress.last_name}`"></b>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="mb-5"
|
||||
v-text="addresses.company_name"
|
||||
v-if="addresses.company_name != ''">
|
||||
</li>
|
||||
|
||||
<li class="mb-5" v-text="addresses.address1"></li>
|
||||
|
||||
<li class="mb-5" v-text="addresses.city"></li>
|
||||
|
||||
<li class="mb-5" v-text="addresses.state"></li>
|
||||
|
||||
<li class="mb-15">
|
||||
<span v-text="addresses.country" v-if="addresses.country"></span>
|
||||
<span v-text="addresses.postcode" v-if="addresses.postcode"></span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<b>{{ __('shop::app.customer.account.address.index.contact') }}</b> :
|
||||
<span v-text="addresses.phone"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="message"></div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[address_id]') ? 'has-error' : '']">
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[address_id]')"
|
||||
v-if="errors.has('address-form.billing[address_id]')">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($cart->haveStockableItems())
|
||||
<div class="control-group mt-5">
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" id="billing[use_for_shipping]" name="billing[use_for_shipping]" v-model="address.billing.use_for_shipping"/>
|
||||
<label class="checkbox-view" for="billing[use_for_shipping]"></label>
|
||||
|
||||
{{ __('shop::app.checkout.onepage.use_for_shipping') }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-container" v-if="this.new_billing_address">
|
||||
<div class="form-header">
|
||||
<h1>{{ __('shop::app.checkout.onepage.billing-address') }}</h1>
|
||||
|
||||
@auth('customer')
|
||||
@if(count(auth('customer')->user()->addresses))
|
||||
<a class="btn btn-lg btn-primary" @click="backToSavedBillingAddress()">
|
||||
{{ __('shop::app.checkout.onepage.back') }}
|
||||
</a>
|
||||
@endif
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[email]') ? 'has-error' : '']">
|
||||
<label for="billing[email]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.email') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="billing[email]"
|
||||
type="text"
|
||||
name="billing[email]"
|
||||
v-model="address.billing.email"
|
||||
v-validate="'required|email'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.email') }}""
|
||||
@blur="isCustomerExist"/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[email]')"
|
||||
v-if="errors.has('address-form.billing[email]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if (! auth()->guard('customer')->check())
|
||||
@include('shop::checkout.onepage.customer-checkout')
|
||||
@endif
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[company_name]') ? 'has-error' : '']">
|
||||
<label for="billing[company_name]">
|
||||
{{ __('shop::app.checkout.onepage.company-name') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="billing[company_name]"
|
||||
type="text"
|
||||
name="billing[company_name]"
|
||||
v-model="address.billing.company_name"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.company-name') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[company_name]')"
|
||||
v-if="errors.has('address-form.billing[company_name]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[first_name]') ? 'has-error' : '']">
|
||||
<label for="billing[first_name]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.first-name') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="billing[first_name]"
|
||||
type="text"
|
||||
name="billing[first_name]"
|
||||
v-model="address.billing.first_name"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.first-name') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[first_name]')"
|
||||
v-if="errors.has('address-form.billing[first_name]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[last_name]') ? 'has-error' : '']">
|
||||
<label for="billing[last_name]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.last-name') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="billing[last_name]"
|
||||
type="text"
|
||||
name="billing[last_name]"
|
||||
v-model="address.billing.last_name"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.last-name') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[last_name]')"
|
||||
v-if="errors.has('address-form.billing[last_name]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[address1][]') ? 'has-error' : '']">
|
||||
<label for="billing_address_0" class="required">
|
||||
{{ __('shop::app.checkout.onepage.address1') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="billing_address_0"
|
||||
type="text"
|
||||
name="billing[address1][]"
|
||||
v-model="address.billing.address1[0]"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.address1') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[address1][]')"
|
||||
v-if="errors.has('address-form.billing[address1][]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if (
|
||||
core()->getConfigData('customer.settings.address.street_lines')
|
||||
&& core()->getConfigData('customer.settings.address.street_lines') > 1
|
||||
)
|
||||
<div class="control-group" style="margin-top: -25px;">
|
||||
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
||||
<input
|
||||
class="control"
|
||||
id="billing_address_{{ $i }}"
|
||||
type="text"
|
||||
name="billing[address1][{{ $i }}]"
|
||||
v-model="address.billing.address1[{{$i}}]">
|
||||
@endfor
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[city]') ? 'has-error' : '']">
|
||||
<label for="billing[city]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.city') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="billing[city]"
|
||||
type="text"
|
||||
name="billing[city]"
|
||||
v-model="address.billing.city"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.city') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[city]')"
|
||||
v-if="errors.has('address-form.billing[city]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[country]') ? 'has-error' : '']">
|
||||
<label for="billing[country]" class="{{ core()->isCountryRequired() ? 'required' : '' }}">
|
||||
{{ __('shop::app.checkout.onepage.country') }}
|
||||
</label>
|
||||
|
||||
<select
|
||||
class="control"
|
||||
id="billing[country]"
|
||||
type="text"
|
||||
name="billing[country]"
|
||||
v-validate="'{{ core()->isCountryRequired() ? 'required' : '' }}'"
|
||||
v-model="address.billing.country"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.country') }}"">
|
||||
<option value=""></option>
|
||||
|
||||
@foreach (core()->countries() as $country)
|
||||
<option value="{{ $country->code }}">{{ $country->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[country]')"
|
||||
v-if="errors.has('address-form.billing[country]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[state]') ? 'has-error' : '']">
|
||||
<label for="billing[state]" class="{{ core()->isStateRequired() ? 'required' : '' }}">
|
||||
{{ __('shop::app.checkout.onepage.state') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="billing[state]"
|
||||
name="billing[state]"
|
||||
type="text"
|
||||
v-model="address.billing.state"
|
||||
v-validate="'{{ core()->isStateRequired() ? 'required' : '' }}'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.state') }}""
|
||||
v-if="! haveStates('billing')"/>
|
||||
|
||||
<select
|
||||
class="control"
|
||||
id="billing[state]"
|
||||
name="billing[state]"
|
||||
v-model="address.billing.state"
|
||||
v-validate=""
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.state') }}""
|
||||
v-if="haveStates('billing')">
|
||||
<option value="">{{ __('shop::app.checkout.onepage.select-state') }}</option>
|
||||
|
||||
<option v-for='(state, index) in countryStates[address.billing.country]' :value="state.code" v-text="state.default_name"></option>
|
||||
</select>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[state]')"
|
||||
v-if="errors.has('address-form.billing[state]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[postcode]') ? 'has-error' : '']">
|
||||
<label for="billing[postcode]" class="{{ core()->isPostCodeRequired() ? 'required' : '' }}">
|
||||
{{ __('shop::app.checkout.onepage.postcode') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="billing[postcode]"
|
||||
type="text"
|
||||
name="billing[postcode]"
|
||||
v-model="address.billing.postcode"
|
||||
v-validate="'{{ core()->isPostCodeRequired() ? 'required' : '' }}'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.postcode') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[postcode]')"
|
||||
v-if="errors.has('address-form.billing[postcode]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[phone]') ? 'has-error' : '']">
|
||||
<label for="billing[phone]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.phone') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="billing[phone]"
|
||||
type="text"
|
||||
name="billing[phone]"
|
||||
v-validate="'required|numeric'"
|
||||
v-model="address.billing.phone"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.phone') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.billing[phone]')"
|
||||
v-if="errors.has('address-form.billing[phone]')"></span>
|
||||
</div>
|
||||
|
||||
@if ($cart->haveStockableItems())
|
||||
<div class="control-group">
|
||||
<span class="checkbox">
|
||||
<input
|
||||
id="billing[use_for_shipping]"
|
||||
type="checkbox"
|
||||
name="billing[use_for_shipping]"
|
||||
v-model="address.billing.use_for_shipping"/>
|
||||
|
||||
<label class="checkbox-view" for="billing[use_for_shipping]"></label>
|
||||
|
||||
{{ __('shop::app.checkout.onepage.use_for_shipping') }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@auth('customer')
|
||||
<div class="control-group">
|
||||
<span class="checkbox">
|
||||
<input
|
||||
id="billing[save_as_address]"
|
||||
type="checkbox"
|
||||
name="billing[save_as_address]"
|
||||
v-model="address.billing.save_as_address"/>
|
||||
|
||||
<label class="checkbox-view" for="billing[save_as_address]"></label>
|
||||
|
||||
{{ __('shop::app.checkout.onepage.save_as_address') }}
|
||||
</span>
|
||||
</div>
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
@if ($cart->haveStockableItems())
|
||||
<div class="form-container" v-if="! address.billing.use_for_shipping && ! this.new_shipping_address">
|
||||
<div class="form-header mb-30">
|
||||
<span class="checkout-step-heading">{{ __('shop::app.checkout.onepage.shipping-address') }}</span>
|
||||
|
||||
<a class="btn btn-lg btn-primary" @click="newShippingAddress()">
|
||||
{{ __('shop::app.checkout.onepage.new-address') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="address-holder">
|
||||
<div class="address-card" v-for='(addresses, index) in this.allAddress'>
|
||||
<div class="checkout-address-content" style="display: flex; flex-direction: row; justify-content: space-between; width: 100%;">
|
||||
<label class="radio-container" style="float: right; width: 10%;">
|
||||
<input
|
||||
id="shipping[address_id]"
|
||||
type="radio"
|
||||
name="shipping[address_id]"
|
||||
:value="addresses.id"
|
||||
v-model="address.shipping.address_id"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.shipping-address') }}"">
|
||||
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
|
||||
<ul class="address-card-list" style="float: right; width: 85%;">
|
||||
<li class="mb-10">
|
||||
<b v-text="`${addresses.first_name} ${addresses.last_name}`"></b>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="mb-5"
|
||||
v-text="addresses.company_name"
|
||||
v-if="addresses.company_name != ''">
|
||||
</li>
|
||||
|
||||
<li class="mb-5" v-text="addresses.address1"></li>
|
||||
|
||||
<li class="mb-5" v-text="addresses.city"></li>
|
||||
|
||||
<li class="mb-5" v-text="addresses.state"></li>
|
||||
|
||||
<li class="mb-15">
|
||||
<span v-text="addresses.country" v-if="addresses.country"></span>
|
||||
<span v-text="addresses.postcode" v-if="addresses.postcode"></span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<b>{{ __('shop::app.customer.account.address.index.contact') }}</b> :
|
||||
<span v-text="addresses.phone"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.shipping[address_id]') ? 'has-error' : '']">
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.shipping[address_id]')"
|
||||
v-if="errors.has('address-form.shipping[address_id]')">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-container" v-if="! address.billing.use_for_shipping && this.new_shipping_address">
|
||||
<div class="form-header">
|
||||
<h1>{{ __('shop::app.checkout.onepage.shipping-address') }}</h1>
|
||||
|
||||
@auth('customer')
|
||||
@if(count(auth('customer')->user()->addresses))
|
||||
<a class="btn btn-lg btn-primary" @click="backToSavedShippingAddress()">
|
||||
{{ __('shop::app.checkout.onepage.back') }}
|
||||
</a>
|
||||
@endif
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.shipping[first_name]') ? 'has-error' : '']">
|
||||
<label for="shipping[first_name]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.first-name') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="shipping[first_name]"
|
||||
type="text"
|
||||
name="shipping[first_name]"
|
||||
v-model="address.shipping.first_name"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.first-name') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.shipping[first_name]')"
|
||||
v-if="errors.has('address-form.shipping[first_name]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.shipping[last_name]') ? 'has-error' : '']">
|
||||
<label for="shipping[last_name]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.last-name') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="shipping[last_name]"
|
||||
type="text"
|
||||
name="shipping[last_name]"
|
||||
v-model="address.shipping.last_name"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.last-name') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.shipping[last_name]')"
|
||||
v-if="errors.has('address-form.shipping[last_name]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.shipping[email]') ? 'has-error' : '']">
|
||||
<label for="shipping[email]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.email') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="shipping[email]"
|
||||
type="text"
|
||||
name="shipping[email]"
|
||||
v-validate="'required|email'"
|
||||
v-model="address.shipping.email"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.email') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.shipping[email]')"
|
||||
v-if="errors.has('address-form.shipping[email]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.shipping[address1][]') ? 'has-error' : '']">
|
||||
<label for="shipping_address_0" class="required">
|
||||
{{ __('shop::app.checkout.onepage.address1') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="shipping_address_0"
|
||||
type="text"
|
||||
name="shipping[address1][]"
|
||||
v-model="address.shipping.address1[0]"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.address1') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.shipping[address1][]')"
|
||||
v-if="errors.has('address-form.shipping[address1][]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if (
|
||||
core()->getConfigData('customer.settings.address.street_lines')
|
||||
&& core()->getConfigData('customer.settings.address.street_lines') > 1
|
||||
)
|
||||
<div class="control-group" style="margin-top: -25px;">
|
||||
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
||||
<input
|
||||
class="control"
|
||||
id="shipping_address_{{ $i }}"
|
||||
type="text"
|
||||
name="shipping[address1][{{ $i }}]"
|
||||
v-model="address.shipping.address1[{{$i}}]">
|
||||
@endfor
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.shipping[city]') ? 'has-error' : '']">
|
||||
<label for="shipping[city]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.city') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="shipping[city]"
|
||||
type="text"
|
||||
name="shipping[city]"
|
||||
v-model="address.shipping.city"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.city') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.shipping[city]')"
|
||||
v-if="errors.has('address-form.shipping[city]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.shipping[country]') ? 'has-error' : '']">
|
||||
<label for="shipping[country]" class="{{ core()->isCountryRequired() ? 'required' : '' }}">
|
||||
{{ __('shop::app.checkout.onepage.country') }}
|
||||
</label>
|
||||
|
||||
<select
|
||||
class="control"
|
||||
id="shipping[country]"
|
||||
type="text"
|
||||
name="shipping[country]"
|
||||
v-model="address.shipping.country"
|
||||
v-validate="'{{ core()->isCountryRequired() ? 'required' : '' }}'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.country') }}"">
|
||||
<option value=""></option>
|
||||
|
||||
@foreach (core()->countries() as $country)
|
||||
<option value="{{ $country->code }}">{{ $country->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.shipping[country]')"
|
||||
v-if="errors.has('address-form.shipping[country]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.shipping[state]') ? 'has-error' : '']">
|
||||
<label for="shipping[state]" class="{{ core()->isStateRequired() ? 'required' : '' }}">
|
||||
{{ __('shop::app.checkout.onepage.state') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="shipping[state]"
|
||||
type="text"
|
||||
name="shipping[state]"
|
||||
v-model="address.shipping.state"
|
||||
v-validate="'{{ core()->isStateRequired() ? 'required' : '' }}'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.state') }}""
|
||||
v-if="! haveStates('shipping')"/>
|
||||
|
||||
<select
|
||||
class="control" id="shipping[state]"
|
||||
name="shipping[state]"
|
||||
v-model="address.shipping.state"
|
||||
v-validate=""
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.state') }}""
|
||||
v-if="haveStates('shipping')">
|
||||
<option value="">{{ __('shop::app.checkout.onepage.select-state') }}</option>
|
||||
|
||||
<option v-for='(state, index) in countryStates[address.shipping.country]' :value="state.code">
|
||||
@{{ state.default_name }}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.shipping[state]')"
|
||||
v-if="errors.has('address-form.shipping[state]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.shipping[postcode]') ? 'has-error' : '']">
|
||||
<label for="shipping[postcode]" class="{{ core()->isPostCodeRequired() ? 'required' : '' }}">
|
||||
{{ __('shop::app.checkout.onepage.postcode') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="shipping[postcode]"
|
||||
type="text"
|
||||
name="shipping[postcode]"
|
||||
v-model="address.shipping.postcode"
|
||||
v-validate="'{{ core()->isPostCodeRequired() ? 'required' : '' }}'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.postcode') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.shipping[postcode]')"
|
||||
v-if="errors.has('address-form.shipping[postcode]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address-form.shipping[phone]') ? 'has-error' : '']">
|
||||
<label for="shipping[phone]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.phone') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="shipping[phone]"
|
||||
type="text"
|
||||
name="shipping[phone]"
|
||||
v-model="address.shipping.phone"
|
||||
v-validate="'required|numeric'"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.phone') }}""/>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('address-form.shipping[phone]')"
|
||||
v-if="errors.has('address-form.shipping[phone]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@auth('customer')
|
||||
<div class="control-group">
|
||||
<span class="checkbox">
|
||||
<input
|
||||
id="shipping[save_as_address]"
|
||||
type="checkbox"
|
||||
name="shipping[save_as_address]"
|
||||
v-model="address.shipping.save_as_address"/>
|
||||
|
||||
<label class="checkbox-view" for="shipping[save_as_address]"></label>
|
||||
|
||||
{{ __('shop::app.checkout.onepage.save_as_address') }}
|
||||
</span>
|
||||
</div>
|
||||
@endauth
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<form data-vv-scope="payment-form">
|
||||
<div class="form-container">
|
||||
<div class="form-header mb-30">
|
||||
<span class="checkout-step-heading">{{ __('shop::app.checkout.onepage.payment-methods') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="payment-methods">
|
||||
|
||||
<div class="control-group" :class="[errors.has('payment-form.payment[method]') ? 'has-error' : '']">
|
||||
|
||||
@foreach ($paymentMethods as $payment)
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.payment-method.before', ['payment' => $payment]) !!}
|
||||
|
||||
<div class="checkout-method-group mb-20">
|
||||
<div class="line-one">
|
||||
<label class="radio-container">
|
||||
<input v-validate="'required'" type="radio" id="{{ $payment['method'] }}" name="payment[method]" value="{{ $payment['method'] }}" v-model="payment.method" @change="methodSelected()" data-vv-as=""{{ __('shop::app.checkout.onepage.payment-method') }}"">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<span class="payment-method method-label">
|
||||
<b>{{ $payment['method_title'] }}</b>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="line-two mt-5">
|
||||
<span class="method-summary">{{ __($payment['description']) }}</span>
|
||||
</div>
|
||||
|
||||
<?php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($payment['method']); ?>
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div class="instructions" v-show="payment.method == '{{$payment['method']}}'">
|
||||
<label>{{ $additionalDetails['title'] }}</label>
|
||||
<p>{{ $additionalDetails['value'] }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.payment-method.after', ['payment' => $payment]) !!}
|
||||
|
||||
@endforeach
|
||||
|
||||
<span class="control-error" v-if="errors.has('payment-form.payment[method]')">
|
||||
@{{ errors.first('payment-form.payment[method]') }}
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
<div class="form-container">
|
||||
<div class="form-header mb-30">
|
||||
<span class="checkout-step-heading">{{ __('shop::app.checkout.onepage.summary') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="address-summary">
|
||||
@if ($billingAddress = $cart->billing_address)
|
||||
<div class="billing-address">
|
||||
<div class="card-title mb-20">
|
||||
<b>{{ __('shop::app.checkout.onepage.billing-address') }}</b>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<ul>
|
||||
<li class="mb-10">
|
||||
{{ $billingAddress->company_name ?? '' }}
|
||||
</li>
|
||||
<li class="mb-10">
|
||||
<b>{{ $billingAddress->first_name }} {{ $billingAddress->last_name }}</b>
|
||||
</li>
|
||||
<li class="mb-10">
|
||||
{{ $billingAddress->address1 }},<br/>
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ $billingAddress->postcode . " " . $billingAddress->city }}
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ $billingAddress->state }}
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ core()->country_name($billingAddress->country) }} {{ $billingAddress->postcode }}
|
||||
</li>
|
||||
|
||||
<span class="horizontal-rule mb-15 mt-15"></span>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ __('shop::app.checkout.onepage.contact') }} : {{ $billingAddress->phone }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (
|
||||
$cart->haveStockableItems()
|
||||
&& $shippingAddress = $cart->shipping_address
|
||||
)
|
||||
<div class="shipping-address">
|
||||
<div class="card-title mb-20">
|
||||
<b>{{ __('shop::app.checkout.onepage.shipping-address') }}</b>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<ul>
|
||||
<li class="mb-10">
|
||||
{{ $shippingAddress->company_name ?? '' }}
|
||||
</li>
|
||||
<li class="mb-10">
|
||||
<b>{{ $shippingAddress->first_name }} {{ $shippingAddress->last_name }}</b>
|
||||
</li>
|
||||
<li class="mb-10">
|
||||
{{ $shippingAddress->address1 }},<br/>
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ $shippingAddress->postcode . " " . $shippingAddress->city }}
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ $shippingAddress->state }}
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ core()->country_name($shippingAddress->country) }}
|
||||
</li>
|
||||
|
||||
<span class="horizontal-rule mb-15 mt-15"></span>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ __('shop::app.checkout.onepage.contact') }} : {{ $shippingAddress->phone }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<div class="cart-item-list mt-20">
|
||||
@foreach ($cart->items as $item)
|
||||
@php
|
||||
$productBaseImage = $item->product->getTypeInstance()->getBaseImage($item);
|
||||
@endphp
|
||||
|
||||
<div class="item mb-5" style="margin-bottom: 5px;">
|
||||
<div class="item-image">
|
||||
<img src="{{ $productBaseImage['medium_image_url'] }}" alt=""/>
|
||||
</div>
|
||||
|
||||
<div class="item-details">
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.name.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-title">
|
||||
{{ $item->product->name }}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.name.after', ['item' => $item]) !!}
|
||||
{!! view_render_event('bagisto.shop.checkout.price.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('shop::app.checkout.onepage.price') }}
|
||||
</span>
|
||||
<span class="value">
|
||||
{{ core()->currency($item->base_price) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.price.after', ['item' => $item]) !!}
|
||||
{!! view_render_event('bagisto.shop.checkout.quantity.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('shop::app.checkout.onepage.quantity') }}
|
||||
</span>
|
||||
<span class="value">
|
||||
{{ $item->quantity }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.quantity.after', ['item' => $item]) !!}
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.options.before', ['item' => $item]) !!}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.options.after', ['item' => $item]) !!}
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="order-description mt-20">
|
||||
<div class="pull-left" style="width: 60%; float: left;">
|
||||
@if ($cart->haveStockableItems())
|
||||
<div class="shipping">
|
||||
<div class="decorator">
|
||||
<i class="icon shipping-icon"></i>
|
||||
</div>
|
||||
|
||||
<div class="text">
|
||||
{{ core()->currency($cart->selected_shipping_rate->base_price) }}
|
||||
|
||||
<div class="info">
|
||||
{{ $cart->selected_shipping_rate->method_title }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="payment">
|
||||
<div class="decorator">
|
||||
<i class="icon payment-icon"></i>
|
||||
</div>
|
||||
|
||||
<div class="text">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $cart->payment->method . '.title') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pull-right" style="width: 40%; float: left;">
|
||||
<slot name="summary-section"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<form data-vv-scope="shipping-form">
|
||||
<div class="form-container">
|
||||
<div class="form-header mb-30">
|
||||
<span class="checkout-step-heading">{{ __('shop::app.checkout.onepage.shipping-method') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="shipping-methods">
|
||||
|
||||
<div class="control-group" :class="[errors.has('shipping-form.shipping_method') ? 'has-error' : '']">
|
||||
|
||||
@foreach ($shippingRateGroups as $rateGroup)
|
||||
{!! view_render_event('bagisto.shop.checkout.shipping-method.before', ['rateGroup' => $rateGroup]) !!}
|
||||
|
||||
<span class="carrier-title" id="carrier-title" style="font-size:18px; font-weight: bold;">
|
||||
{{ $rateGroup['carrier_title'] }}
|
||||
</span>
|
||||
|
||||
@foreach ($rateGroup['rates'] as $rate)
|
||||
<div class="checkout-method-group mb-20">
|
||||
<div class="line-one">
|
||||
<label class="radio-container">
|
||||
<input v-validate="'required'" type="radio" id="{{ $rate->method }}" name="shipping_method" data-vv-as=""{{ __('shop::app.checkout.onepage.shipping-method') }}"" value="{{ $rate->method }}" v-model="selected_shipping_method" @change="methodSelected()">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
{{-- <label class="radio-view" for="{{ $rate->method }}"></label> --}}
|
||||
<b class="ship-rate method-label">{{ core()->currency($rate->base_price) }}</b>
|
||||
</div>
|
||||
|
||||
<div class="line-two mt-5">
|
||||
<div class="method-summary">
|
||||
<b>{{ $rate->method_title }}</b> - {{ __($rate->method_description) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.shipping-method.after', ['rateGroup' => $rateGroup]) !!}
|
||||
|
||||
@endforeach
|
||||
|
||||
<span class="control-error" v-if="errors.has('shipping-form.shipping_method')">
|
||||
@{{ errors.first('shipping-form.shipping_method') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.checkout.success.title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="order-success-content" style="min-height: 300px;">
|
||||
<h1>{{ __('shop::app.checkout.success.thanks') }}</h1>
|
||||
|
||||
<p>
|
||||
@if (auth()->guard('customer')->user())
|
||||
{!!
|
||||
__('shop::app.checkout.success.order-id-info', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '">' . $order->increment_id . '</a>'
|
||||
])
|
||||
!!}
|
||||
@else
|
||||
{{ __('shop::app.checkout.success.order-id-info', ['order_id' => $order->increment_id]) }}
|
||||
@endif
|
||||
</p>
|
||||
|
||||
<p>{{ __('shop::app.checkout.success.info') }}</p>
|
||||
|
||||
{{ view_render_event('bagisto.shop.checkout.continue-shopping.before', ['order' => $order]) }}
|
||||
|
||||
<div class="misc-controls">
|
||||
<a style="display: inline-block" href="{{ route('shop.home.index') }}" class="btn btn-lg btn-primary">
|
||||
{{ __('shop::app.checkout.cart.continue-shopping') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{ view_render_event('bagisto.shop.checkout.continue-shopping.after', ['order' => $order]) }}
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<div class="order-summary">
|
||||
<h3>{{ __('shop::app.checkout.total.order-summary') }}</h3>
|
||||
|
||||
<div class="item-detail">
|
||||
<label>
|
||||
{{ intval($cart->items_qty) }}
|
||||
{{ __('shop::app.checkout.total.sub-total') }}
|
||||
{{ __('shop::app.checkout.total.price') }}
|
||||
</label>
|
||||
<label class="right">{{ core()->currency($cart->base_sub_total) }}</label>
|
||||
</div>
|
||||
|
||||
@if ($cart->selected_shipping_rate)
|
||||
<div class="item-detail">
|
||||
<label>{{ __('shop::app.checkout.total.delivery-charges') }}</label>
|
||||
<label class="right">{{ core()->currency($cart->selected_shipping_rate->base_price) }}</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($cart->base_tax_total)
|
||||
@foreach (Webkul\Tax\Helpers\Tax::getTaxRatesWithAmount($cart, true) as $taxRate => $baseTaxAmount )
|
||||
<div class="item-detail">
|
||||
<label id="taxrate-{{ core()->taxRateAsIdentifier($taxRate) }}">{{ __('shop::app.checkout.total.tax') }} {{ $taxRate }} %</label>
|
||||
<label class="right" id="basetaxamount-{{ core()->taxRateAsIdentifier($taxRate) }}">{{ core()->currency($baseTaxAmount) }}</label>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<div class="item-detail" id="discount-detail" @if ($cart->base_discount_amount && $cart->base_discount_amount > 0) style="display: block;" @else style="display: none;" @endif>
|
||||
<label>
|
||||
{{ __('shop::app.checkout.total.disc-amount') }}
|
||||
</label>
|
||||
<label class="right">
|
||||
-{{ core()->currency($cart->base_discount_amount) }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="payable-amount" id="grand-total-detail">
|
||||
<label>{{ __('shop::app.checkout.total.grand-total') }}</label>
|
||||
<label class="right" id="grand-total-amount-detail">
|
||||
{{ core()->currency($cart->base_grand_total) }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ $page->page_title }}
|
||||
@endsection
|
||||
|
||||
@section('seo')
|
||||
<meta name="title" content="{{ $page->meta_title }}" />
|
||||
|
||||
<meta name="description" content="{{ $page->meta_description }}" />
|
||||
|
||||
<meta name="keywords" content="{{ $page->meta_keywords }}" />
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
{!! DbView::make($page)->field('html_content')->render() !!}
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
<country-state></country-state>
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="country-state-template">
|
||||
<div>
|
||||
<div class="control-group" :class="[errors.has('country') ? 'has-error' : '']">
|
||||
<label for="country" class="{{ core()->isCountryRequired() ? 'required' : '' }}">
|
||||
{{ __('shop::app.customer.account.address.create.country') }}
|
||||
</label>
|
||||
|
||||
<select
|
||||
class="control"
|
||||
id="country"
|
||||
type="text"
|
||||
name="country"
|
||||
v-model="country"
|
||||
v-validate="'{{ core()->isCountryRequired() ? 'required' : '' }}'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.country') }}"">
|
||||
<option value=""></option>
|
||||
|
||||
@foreach (core()->countries() as $country)
|
||||
<option {{ $country->code === $defaultCountry ? 'selected' : '' }} value="{{ $country->code }}">{{ $country->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('country')"
|
||||
v-if="errors.has('country')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('state') ? 'has-error' : '']">
|
||||
<label for="state" class="{{ core()->isStateRequired() ? 'required' : '' }}">
|
||||
{{ __('shop::app.customer.account.address.create.state') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="state"
|
||||
type="text"
|
||||
name="state"
|
||||
v-model="state"
|
||||
v-validate="'{{ core()->isStateRequired() ? 'required' : '' }}'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.state') }}""
|
||||
v-if="! haveStates()"/>
|
||||
|
||||
<select
|
||||
class="control"
|
||||
id="state"
|
||||
name="state"
|
||||
v-model="state"
|
||||
v-validate="'{{ core()->isStateRequired() ? 'required' : '' }}'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.state') }}""
|
||||
v-if="haveStates()">
|
||||
<option value="">{{ __('shop::app.customer.account.address.create.select-state') }}</option>
|
||||
|
||||
<option v-for='(state, index) in countryStates[country]' :value="state.code">
|
||||
@{{ state.default_name }}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<span class="control-error" v-if="errors.has('state')">
|
||||
@{{ errors.first('state') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('country-state', {
|
||||
template: '#country-state-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
country: "{{ $countryCode ?? $defaultCountry }}",
|
||||
|
||||
state: "{{ $stateCode }}",
|
||||
|
||||
countryStates: @json(core()->groupedStatesByCountries())
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
haveStates() {
|
||||
if (this.countryStates[this.country] && this.countryStates[this.country].length)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,236 @@
|
|||
@php
|
||||
$currentCustomer = auth()->guard('customer')->user();
|
||||
@endphp
|
||||
|
||||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.address.create.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
<div class="account-head mb-15">
|
||||
<span class="back-icon">
|
||||
<a href="{{ route('customer.address.index') }}"><i class="icon icon-menu-back"></i></a>
|
||||
</span>
|
||||
|
||||
<span class="account-heading">{{ __('shop::app.customer.account.address.create.title') }}</span>
|
||||
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create.before') !!}
|
||||
|
||||
<form id="customer-address-form" method="post" action="{{ route('customer.address.store') }}" @submit.prevent="onSubmit">
|
||||
<div class="account-table-content">
|
||||
@csrf
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('company_name') ? 'has-error' : '']">
|
||||
<label for="company_name">{{ __('shop::app.customer.account.address.create.company_name') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="company_name"
|
||||
value="{{ old('company_name') }}"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.company_name') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('company_name')"
|
||||
v-if="errors.has('company_name')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.company_name.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.create.first_name') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="first_name"
|
||||
value="{{ old('first_name') ?? $currentCustomer->first_name }}"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.first_name') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('first_name')"
|
||||
v-if="errors.has('first_name')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.first_name.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required">{{ __('shop::app.customer.account.address.create.last_name') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="last_name"
|
||||
value="{{ old('last_name') ?? $currentCustomer->last_name }}"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.last_name') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('last_name')"
|
||||
v-if="errors.has('last_name')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.last_name.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('vat_id') ? 'has-error' : '']">
|
||||
<label for="vat_id">{{ __('shop::app.customer.account.address.create.vat_id') }}
|
||||
<span class="help-note">{{ __('shop::app.customer.account.address.create.vat_help_note') }}</span>
|
||||
</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="control"
|
||||
name="vat_id"
|
||||
value="{{ old('vat_id') }}"
|
||||
v-validate="''"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.vat_id') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('vat_id')"
|
||||
v-if="errors.has('vat_id')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.vat_id.after') !!}
|
||||
|
||||
@php
|
||||
$addresses = old('address1') ?? explode(PHP_EOL, '');
|
||||
@endphp
|
||||
|
||||
<div class="control-group {{ $errors->has('address1.*') ? 'has-error' : '' }}">
|
||||
<label for="address1" class="required">{{ __('shop::app.customer.account.address.create.street-address') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="address1"
|
||||
type="text"
|
||||
name="address1[]"
|
||||
value="{{ $addresses[0] ?? '' }}"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.street-address') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="'{{ $errors->first('address1.*') }}'">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if (
|
||||
core()->getConfigData('customer.settings.address.street_lines')
|
||||
&& core()->getConfigData('customer.settings.address.street_lines') > 1
|
||||
)
|
||||
<div class="control-group" style="margin-top: -25px;">
|
||||
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
||||
<input
|
||||
class="control"
|
||||
id="address_{{ $i }}"
|
||||
type="text"
|
||||
name="address1[{{ $i }}]">
|
||||
@endfor
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.street-address.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('city') ? 'has-error' : '']">
|
||||
<label for="city" class="required">{{ __('shop::app.customer.account.address.create.city') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="city"
|
||||
value="{{ old('city') }}"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.city') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('city')"
|
||||
v-if="errors.has('city')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.city.after') !!}
|
||||
|
||||
@include ('shop::customers.account.address.country-state', ['countryCode' => old('country'), 'stateCode' => old('state')])
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.country-state.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('postcode') ? 'has-error' : '']">
|
||||
<label for="postcode" class="{{ core()->isPostCodeRequired() ? 'required' : '' }}">{{ __('shop::app.customer.account.address.create.postcode') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="postcode"
|
||||
value="{{ old('postcode') }}"
|
||||
v-validate="'{{ core()->isPostCodeRequired() ? 'required' : '' }}'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.postcode') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('postcode')"
|
||||
v-if="errors.has('postcode')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.postcode.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('phone') ? 'has-error' : '']">
|
||||
<label for="phone" class="required">{{ __('shop::app.customer.account.address.create.phone') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="phone"
|
||||
value="{{ old('phone') }}"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.phone') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('phone')"
|
||||
v-if="errors.has('phone')"></span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.after') !!}
|
||||
|
||||
<div class="control-group">
|
||||
<span class="checkbox">
|
||||
<input
|
||||
class="control"
|
||||
id="default_address"
|
||||
type="checkbox"
|
||||
name="default_address" {{ old('default_address') ? 'checked' : '' }} >
|
||||
|
||||
<label class="checkbox-view" for="default_address"></label>
|
||||
|
||||
{{ __('shop::app.customer.account.address.default-address') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="button-group">
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.account.address.create.submit') }}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create.after') !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.address.edit.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
<div class="account-head mb-15">
|
||||
<span class="back-icon">
|
||||
<a href="{{ route('customer.address.index') }}"><i class="icon icon-menu-back"></i></a>
|
||||
</span>
|
||||
|
||||
<span class="account-heading">{{ __('shop::app.customer.account.address.edit.title') }}</span>
|
||||
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit.before', ['address' => $address]) !!}
|
||||
|
||||
<form id="customer-address-form" method="post" action="{{ route('customer.address.update', $address->id) }}" @submit.prevent="onSubmit">
|
||||
|
||||
<div class="account-table-content">
|
||||
@method('PUT')
|
||||
|
||||
@csrf
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.before', ['address' => $address]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('company_name') ? 'has-error' : '']">
|
||||
<label for="company_name">{{ __('shop::app.customer.account.address.edit.company_name') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="company_name"
|
||||
value="{{ old('company_name') ?: $address->company_name }}"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.edit.company_name') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('company_name')"
|
||||
v-if="errors.has('company_name')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.company_name.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.create.first_name') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="first_name"
|
||||
value="{{ old('first_name') ?: $address->first_name }}"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.first_name') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('first_name')"
|
||||
v-if="errors.has('first_name')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.first_name.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required">{{ __('shop::app.customer.account.address.create.last_name') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="last_name"
|
||||
value="{{ old('last_name') ?: $address->last_name }}"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.last_name') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('last_name')"
|
||||
v-if="errors.has('last_name')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.last_name.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('vat_id') ? 'has-error' : '']">
|
||||
<label for="vat_id">{{ __('shop::app.customer.account.address.create.vat_id') }}
|
||||
<span class="help-note">{{ __('shop::app.customer.account.address.create.vat_help_note') }}</span>
|
||||
</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="vat_id"
|
||||
value="{{ old('vat_id') ?: $address->vat_id }}"
|
||||
v-validate="''"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.vat_id') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('vat_id')"
|
||||
v-if="errors.has('vat_id')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.vat_id.after') !!}
|
||||
|
||||
<?php $addresses = explode(PHP_EOL, $address->address1); ?>
|
||||
|
||||
<div class="control-group {{ $errors->has('address1.*') ? 'has-error' : '' }}">
|
||||
<label for="address_0" class="required">{{ __('shop::app.customer.account.address.edit.street-address') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
id="address_0"
|
||||
type="text"
|
||||
name="address1[]"
|
||||
value="{{ $addresses[0] ?? '' }}"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.street-address') }}"">
|
||||
|
||||
<span class="control-error">{{ $errors->first('address1.*') }}</span>
|
||||
</div>
|
||||
|
||||
@if (
|
||||
core()->getConfigData('customer.settings.address.street_lines')
|
||||
&& core()->getConfigData('customer.settings.address.street_lines') > 1
|
||||
)
|
||||
<div class="control-group" style="margin-top: -25px;">
|
||||
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
||||
<input
|
||||
class="control"
|
||||
id="address_{{ $i }}"
|
||||
type="text"
|
||||
name="address1[{{ $i }}]"
|
||||
value="{{ $addresses[$i] ?? '' }}">
|
||||
@endfor
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.street-addres.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('city') ? 'has-error' : '']">
|
||||
<label for="city" class="required">{{ __('shop::app.customer.account.address.create.city') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="city"
|
||||
value="{{ old('city') ?: $address->city }}"
|
||||
v-validate="'required|regex:^[a-zA-Z \-]*$'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.city') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('city')"
|
||||
v-if="errors.has('city')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.create.after') !!}
|
||||
|
||||
@include ('shop::customers.account.address.country-state', ['countryCode' => old('country') ?? $address->country, 'stateCode' => old('state') ?? $address->state])
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.country-state.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('postcode') ? 'has-error' : '']">
|
||||
<label for="postcode" class="{{ core()->isPostCodeRequired() ? 'required' : '' }}">{{ __('shop::app.customer.account.address.create.postcode') }}</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="control"
|
||||
name="postcode"
|
||||
v-validate="'{{ core()->isPostCodeRequired() ? 'required' : '' }}'"
|
||||
value="{{ old('postcode') ?: $address->postcode }}"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.postcode') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('postcode')"
|
||||
v-if="errors.has('postcode')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.postcode.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('phone') ? 'has-error' : '']">
|
||||
<label for="phone" class="required">{{ __('shop::app.customer.account.address.create.phone') }}</label>
|
||||
|
||||
<input
|
||||
class="control"
|
||||
type="text"
|
||||
name="phone"
|
||||
value="{{ old('phone') ?: $address->phone }}"
|
||||
v-validate="'required'"
|
||||
data-vv-as=""{{ __('shop::app.customer.account.address.create.phone') }}"">
|
||||
|
||||
<span
|
||||
class="control-error"
|
||||
v-text="errors.first('phone')"
|
||||
v-if="errors.has('phone')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.after', ['address' => $address]) !!}
|
||||
|
||||
<div class="control-group">
|
||||
<span class="checkbox">
|
||||
<input
|
||||
class="control"
|
||||
id="default_address"
|
||||
type="checkbox"
|
||||
name="default_address"
|
||||
{{ $address->default_address ? 'checked' : '' }}>
|
||||
|
||||
<label class="checkbox-view" for="default_address"></label>
|
||||
|
||||
{{ __('shop::app.customer.account.address.default-address') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="button-group">
|
||||
<button class="btn btn-primary btn-lg" type="submit">
|
||||
{{ __('shop::app.customer.account.address.create.submit') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit.after', ['address' => $address]) !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.address.index.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
<div class="account-head">
|
||||
<span class="back-icon">
|
||||
<a href="{{ route('customer.profile.index') }}">
|
||||
<i class="icon icon-menu-back"></i>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<span class="account-heading">{{ __('shop::app.customer.account.address.index.title') }}</span>
|
||||
|
||||
@if (! $addresses->isEmpty())
|
||||
<span class="account-action">
|
||||
<a href="{{ route('customer.address.create') }}">{{ __('shop::app.customer.account.address.index.add') }}</a>
|
||||
</span>
|
||||
@else
|
||||
<span></span>
|
||||
@endif
|
||||
|
||||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.list.before', ['addresses' => $addresses]) !!}
|
||||
|
||||
<div class="account-table-content">
|
||||
@if ($addresses->isEmpty())
|
||||
<div>{{ __('shop::app.customer.account.address.index.empty') }}</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<a href="{{ route('customer.address.create') }}">{{ __('shop::app.customer.account.address.index.add') }}</a>
|
||||
@else
|
||||
<div class="address-holder">
|
||||
@foreach ($addresses as $address)
|
||||
<div class="address-card">
|
||||
<div class="details">
|
||||
<span class="bold">{{ auth()->guard('customer')->user()->name }}</span>
|
||||
|
||||
<ul class="address-card-list">
|
||||
<li class="mt-5">
|
||||
{{ $address->company_name }}
|
||||
</li>
|
||||
|
||||
<li class="mt-5">
|
||||
{{ $address->first_name }}
|
||||
</li>
|
||||
|
||||
<li class="mt-5">
|
||||
{{ $address->last_name }}
|
||||
</li>
|
||||
|
||||
<li class="mt-5">
|
||||
{{ $address->address1 }}
|
||||
</li>
|
||||
|
||||
<li class="mt-5">
|
||||
{{ $address->city }}
|
||||
</li>
|
||||
|
||||
<li class="mt-5">
|
||||
{{ $address->state }}
|
||||
</li>
|
||||
|
||||
<li class="mt-5">
|
||||
{{ core()->country_name($address->country) }} {{ $address->postcode }}
|
||||
</li>
|
||||
|
||||
<li class="mt-10">
|
||||
{{ __('shop::app.customer.account.address.index.contact') }}
|
||||
: {{ $address->phone }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="control-links mt-20">
|
||||
<span>
|
||||
<a href="{{ route('customer.address.edit', $address->id) }}">
|
||||
{{ __('shop::app.customer.account.address.index.edit') }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<a href="javascript:void(0);" onclick="deleteAddress('{{ __('shop::app.customer.account.address.index.confirm-delete') }}', '{{ $address->id }}')">
|
||||
{{ __('shop::app.customer.account.address.index.delete') }}
|
||||
</a>
|
||||
|
||||
<form id="deleteAddressForm{{ $address->id }}" action="{{ route('address.delete', $address->id) }}" method="post">
|
||||
@method('delete')
|
||||
|
||||
@csrf
|
||||
</form>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.list.after', ['addresses' => $addresses]) !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function deleteAddress(message, addressId) {
|
||||
if (! confirm(message)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(`#deleteAddressForm${addressId}`).submit();
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@include('shop::guest.compare.compare-products')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.compare.compare_similar_items') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
{!! view_render_event('bagisto.shop.customers.account.comparison.list.before') !!}
|
||||
|
||||
<div class="account-items-list">
|
||||
<div class="account-table-content">
|
||||
<compare-product></compare-product>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.comparison.list.after') !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.downloadable_products.title') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
<div class="account-head mb-10">
|
||||
<span class="back-icon"><a href="{{ route('customer.profile.index') }}"><i class="icon icon-menu-back"></i></a></span>
|
||||
|
||||
<span class="account-heading">
|
||||
{{ __('shop::app.customer.account.downloadable_products.title') }}
|
||||
</span>
|
||||
|
||||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.downloadable_products.list.before') !!}
|
||||
|
||||
<div class="account-items-list">
|
||||
<div class="account-table-content">
|
||||
|
||||
<datagrid-plus src="{{ route('customer.downloadable_products.index') }}"></datagrid-plus>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.downloadable_products.list.after') !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('content-wrapper')
|
||||
<div>
|
||||
@if (request()->route()->getName() !== 'customer.profile.index')
|
||||
@if (Breadcrumbs::exists())
|
||||
{{ Breadcrumbs::render() }}
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="account-content">
|
||||
@include('shop::customers.account.partials.sidemenu')
|
||||
|
||||
@yield('account-content')
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.order.index.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
<div class="account-head mb-10">
|
||||
<span class="back-icon"><a href="{{ route('customer.profile.index') }}"><i class="icon icon-menu-back"></i></a></span>
|
||||
|
||||
<span class="account-heading">
|
||||
{{ __('shop::app.customer.account.order.index.title') }}
|
||||
</span>
|
||||
|
||||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.list.before') !!}
|
||||
|
||||
<div class="account-items-list">
|
||||
<div class="account-table-content">
|
||||
|
||||
<datagrid-plus src="{{ route('customer.orders.index') }}"></datagrid-plus>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.list.after') !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,369 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
{{-- meta tags --}}
|
||||
<meta http-equiv="Cache-control" content="no-cache">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
{{-- lang supports inclusion --}}
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: 'Hind';
|
||||
src: url({{ asset('vendor/webkul/ui/assets/fonts/Hind/Hind-Regular.ttf') }}) format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Noto Sans';
|
||||
src: url({{ asset('vendor/webkul/ui/assets/fonts/Noto/NotoSans-Regular.ttf') }}) format('truetype');
|
||||
}
|
||||
</style>
|
||||
|
||||
@php
|
||||
/* main font will be set on locale based */
|
||||
$mainFontFamily = app()->getLocale() === 'ar' ? 'DejaVu Sans' : 'Noto Sans';
|
||||
@endphp
|
||||
|
||||
{{-- main css --}}
|
||||
<style type="text/css">
|
||||
* {
|
||||
font-family: '{{ $mainFontFamily }}';
|
||||
}
|
||||
|
||||
body, th, td, h5 {
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 20px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.invoice-summary {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.table table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
text-align: left;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.table thead th {
|
||||
font-weight: 700;
|
||||
border-top: solid 1px #d3d3d3;
|
||||
border-bottom: solid 1px #d3d3d3;
|
||||
border-left: solid 1px #d3d3d3;
|
||||
padding: 5px 10px;
|
||||
background: #F4F4F4;
|
||||
}
|
||||
|
||||
.table thead th:last-child {
|
||||
border-right: solid 1px #d3d3d3;
|
||||
}
|
||||
|
||||
.table tbody td {
|
||||
padding: 5px 10px;
|
||||
border-bottom: solid 1px #d3d3d3;
|
||||
border-left: solid 1px #d3d3d3;
|
||||
color: #3A3A3A;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table tbody td p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.table tbody td:last-child {
|
||||
border-right: solid 1px #d3d3d3;
|
||||
}
|
||||
|
||||
.sale-summary {
|
||||
margin-top: 40px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sale-summary tr td {
|
||||
padding: 3px 5px;
|
||||
}
|
||||
|
||||
.sale-summary tr.bold {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 70px;
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
.merchant-details {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.merchant-details-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="background-image: none;background-color: #fff;">
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1 class="text-center">{{ __('admin::app.sales.invoices.invoice') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (core()->getConfigData('sales.invoice_setttings.invoice_slip_design.logo'))
|
||||
<div class="image">
|
||||
<img class="logo" src="{{ Storage::url(core()->getConfigData('sales.invoice_setttings.invoice_slip_design.logo')) }}" alt=""/>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="merchant-details">
|
||||
<div>
|
||||
<span class="merchant-details-title">{{ core()->getConfigData('sales.shipping.origin.store_name') ? core()->getConfigData('sales.shipping.origin.store_name') : '' }}</span>
|
||||
</div>
|
||||
|
||||
<div>{{ core()->getConfigData('sales.shipping.origin.address1') ? core()->getConfigData('sales.shipping.origin.address1') : '' }}</div>
|
||||
|
||||
<div>
|
||||
<span>{{ core()->getConfigData('sales.shipping.origin.zipcode') ? core()->getConfigData('sales.shipping.origin.zipcode') : '' }}</span>
|
||||
<span>{{ core()->getConfigData('sales.shipping.origin.city') ? core()->getConfigData('sales.shipping.origin.city') : '' }}</span>
|
||||
</div>
|
||||
|
||||
<div>{{ core()->getConfigData('sales.shipping.origin.state') ? core()->getConfigData('sales.shipping.origin.state') : '' }}</div>
|
||||
|
||||
<div>{{ core()->getConfigData('sales.shipping.origin.country') ? core()->country_name(core()->getConfigData('sales.shipping.origin.country')) : '' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="merchant-details">
|
||||
@if (core()->getConfigData('sales.shipping.origin.contact'))
|
||||
<div><span class="merchant-details-title">{{ __('admin::app.admin.system.contact-number') }}:</span> {{ core()->getConfigData('sales.shipping.origin.contact') }}</div>
|
||||
@endif
|
||||
|
||||
@if (core()->getConfigData('sales.shipping.origin.vat_number'))
|
||||
<div><span class="merchant-details-title">{{ __('admin::app.admin.system.vat-number') }}:</span> {{ core()->getConfigData('sales.shipping.origin.vat_number') }}</div>
|
||||
@endif
|
||||
|
||||
@if (core()->getConfigData('sales.shipping.origin.bank_details'))
|
||||
<div><span class="merchant-details-title">{{ __('admin::app.admin.system.bank-details') }}:</span> {{ core()->getConfigData('sales.shipping.origin.bank_details') }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="invoice-summary">
|
||||
<div class="row">
|
||||
<span class="label">{{ __('shop::app.customer.account.order.view.invoice-id') }} -</span>
|
||||
<span class="value">#{{ $invoice->increment_id ?? $invoice->id }}</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="label">{{ __('shop::app.customer.account.order.view.invoice-date') }} -</span>
|
||||
<span class="value">{{ core()->formatDate($invoice->created_at, 'd-m-Y') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="label">{{ __('shop::app.customer.account.order.view.order-id') }} -</span>
|
||||
<span class="value">#{{ $invoice->order->increment_id }}</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="label">{{ __('shop::app.customer.account.order.view.order-date') }} -</span>
|
||||
<span class="value">{{ core()->formatDate($invoice->order->created_at, 'd-m-Y') }}</span>
|
||||
</div>
|
||||
|
||||
@if ($invoice->hasPaymentTerm())
|
||||
<div class="row">
|
||||
<span class="label">{{ __('shop::app.customer.account.order.view.payment-terms') }} -</span>
|
||||
<span class="value">{{ $invoice->getFormattedPaymentTerm() }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="table address">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50%">{{ __('shop::app.customer.account.order.view.bill-to') }}</th>
|
||||
@if ($invoice->order->shipping_address)
|
||||
<th>{{ __('shop::app.customer.account.order.view.ship-to') }}</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
@if ($invoice->order->billing_address)
|
||||
<td>
|
||||
<p>{{ $invoice->order->billing_address->company_name ?? '' }}</p>
|
||||
<p>{{ $invoice->order->billing_address->name }}</p>
|
||||
<p>{{ $invoice->order->billing_address->address1 }}</p>
|
||||
<p>{{ $invoice->order->billing_address->city }}</p>
|
||||
<p>{{ $invoice->order->billing_address->state }}</p>
|
||||
<p>
|
||||
{{ core()->country_name($invoice->order->billing_address->country) }}
|
||||
{{ $invoice->order->billing_address->postcode }}
|
||||
</p>
|
||||
{{ __('shop::app.customer.account.order.view.contact') }} : {{ $invoice->order->billing_address->phone }}
|
||||
</td>
|
||||
@endif
|
||||
|
||||
@if ($invoice->order->shipping_address)
|
||||
<td>
|
||||
<p>{{ $invoice->order->shipping_address->company_name ?? '' }}</p>
|
||||
<p>{{ $invoice->order->shipping_address->name }}</p>
|
||||
<p>{{ $invoice->order->shipping_address->address1 }}</p>
|
||||
<p>{{ $invoice->order->shipping_address->city }}</p>
|
||||
<p>{{ $invoice->order->shipping_address->state }}</p>
|
||||
<p>{{ core()->country_name($invoice->order->shipping_address->country) }} {{ $invoice->order->shipping_address->postcode }}</p>
|
||||
{{ __('shop::app.customer.account.order.view.contact') }} : {{ $invoice->order->shipping_address->phone }}
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="table payment-shipment">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50%">{{ __('shop::app.customer.account.order.view.payment-method') }}</th>
|
||||
|
||||
@if ($invoice->order->shipping_address)
|
||||
<th>{{ __('shop::app.customer.account.order.view.shipping-method') }}</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $invoice->order->payment->method . '.title') }}
|
||||
|
||||
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($invoice->order->payment->method); @endphp
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div>
|
||||
<label class="label">{{ $additionalDetails['title'] }}:</label>
|
||||
<p class="value">{{ $additionalDetails['value'] }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
@if ($invoice->order->shipping_address)
|
||||
<td>
|
||||
{{ $invoice->order->shipping_title }}
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="table items">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th class="text-center">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th class="text-center">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th class="text-center">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
<th class="text-center">{{ __('shop::app.customer.account.order.view.subtotal') }}</th>
|
||||
<th class="text-center">{{ __('shop::app.customer.account.order.view.tax-amount') }}</th>
|
||||
<th class="text-center">{{ __('shop::app.customer.account.order.view.grand-total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($invoice->items as $item)
|
||||
<tr>
|
||||
<td class="text-center">{{ $item->child ? $item->child->sku : $item->sku }}</td>
|
||||
|
||||
<td class="text-center">
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td class="text-center">{{ core()->formatPrice($item->price, $invoice->order->order_currency_code) }}</td>
|
||||
|
||||
<td class="text-center">{{ $item->qty }}</td>
|
||||
|
||||
<td class="text-center">{{ core()->formatPrice($item->total, $invoice->order->order_currency_code) }}</td>
|
||||
|
||||
<td class="text-center">{{ core()->formatPrice($item->tax_amount, $invoice->order->order_currency_code) }}</td>
|
||||
|
||||
<td class="text-center">{{ core()->formatPrice(($item->total + $item->tax_amount), $invoice->order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table class="sale-summary">
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.subtotal') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($invoice->sub_total, $invoice->order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.shipping-handling') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($invoice->shipping_amount, $invoice->order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($invoice->base_discount_amount > 0)
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.discount') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($invoice->discount_amount, $invoice->order_currency_code) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.tax') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($invoice->tax_amount, $invoice->order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.grand-total') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($invoice->grand_total, $invoice->order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,556 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.order.view.page-tile', ['order_id' => $order->increment_id]) }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
|
||||
<div class="account-head">
|
||||
<span class="back-icon"><a href="{{ route('customer.orders.index') }}"><i class="icon icon-menu-back"></i></a></span>
|
||||
|
||||
<span class="account-heading">
|
||||
{{ __('shop::app.customer.account.order.view.page-tile', ['order_id' => $order->increment_id]) }}
|
||||
</span>
|
||||
|
||||
<span></span>
|
||||
|
||||
@if ($order->canCancel())
|
||||
<form id="cancelOrderForm" action="{{ route('customer.orders.cancel', $order->id) }}" method="post">
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
<a href="javascript:void(0);" class="btn btn-lg btn-primary" onclick="cancelOrder('{{ __('shop::app.customer.account.order.view.cancel-confirm-msg') }}')" style="float: right;">
|
||||
{{ __('shop::app.customer.account.order.view.cancel-btn-title') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.view.before', ['order' => $order]) !!}
|
||||
|
||||
<div class="sale-container">
|
||||
<tabs>
|
||||
<tab name="{{ __('shop::app.customer.account.order.view.info') }}" :selected="true">
|
||||
<div class="sale-section">
|
||||
<div class="section-content">
|
||||
<div class="sale">
|
||||
<span class="title">
|
||||
{{ __('shop::app.customer.account.order.view.placed-on') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->formatDate($order->created_at, 'd M Y') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('shop::app.customer.account.order.view.products-ordered') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table">
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.item-status') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.subtotal') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.tax-percent') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.tax-amount') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.grand-total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($order->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}">
|
||||
{{ $item->getTypeInstance()->getOrderedItem($item)->sku }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}">
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}">
|
||||
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.item-status') }}">
|
||||
<span class="qty-row">
|
||||
{{ __('shop::app.customer.account.order.view.item-ordered', ['qty_ordered' => $item->qty_ordered]) }}
|
||||
</span>
|
||||
|
||||
<span class="qty-row">
|
||||
{{ $item->qty_invoiced ? __('shop::app.customer.account.order.view.item-invoice', ['qty_invoiced' => $item->qty_invoiced]) : '' }}
|
||||
</span>
|
||||
|
||||
<span class="qty-row">
|
||||
{{ $item->qty_shipped ? __('shop::app.customer.account.order.view.item-shipped', ['qty_shipped' => $item->qty_shipped]) : '' }}
|
||||
</span>
|
||||
|
||||
<span class="qty-row">
|
||||
{{ $item->qty_refunded ? __('shop::app.customer.account.order.view.item-refunded', ['qty_refunded' => $item->qty_refunded]) : '' }}
|
||||
</span>
|
||||
|
||||
<span class="qty-row">
|
||||
{{ $item->qty_canceled ? __('shop::app.customer.account.order.view.item-canceled', ['qty_canceled' => $item->qty_canceled]) : '' }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.subtotal') }}">
|
||||
{{ core()->formatPrice($item->total, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.tax-percent') }}">
|
||||
{{ number_format($item->tax_percent, 2) }}%
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.tax-amount') }}">
|
||||
{{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.grand-total') }}">
|
||||
{{ core()->formatPrice($item->total + $item->tax_amount - $item->discount_amount, $order->order_currency_code) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="totals">
|
||||
<table class="sale-summary">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.subtotal') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->sub_total, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($order->haveStockableItems())
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.shipping-handling') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($order->base_discount_amount > 0)
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.discount') }}
|
||||
@if ($order->coupon_code)
|
||||
({{ $order->coupon_code }})
|
||||
@endif
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr class="border">
|
||||
<td>{{ __('shop::app.customer.account.order.view.tax') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->tax_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bold">
|
||||
<td>{{ __('shop::app.customer.account.order.view.grand-total') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bold">
|
||||
<td>{{ __('shop::app.customer.account.order.view.total-paid') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->grand_total_invoiced, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bold">
|
||||
<td>{{ __('shop::app.customer.account.order.view.total-refunded') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->grand_total_refunded, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bold">
|
||||
<td>{{ __('shop::app.customer.account.order.view.total-due') }}</td>
|
||||
|
||||
<td>-</td>
|
||||
|
||||
@if($order->status !== 'canceled')
|
||||
<td>{{ core()->formatPrice($order->total_due, $order->order_currency_code) }}</td>
|
||||
@else
|
||||
<td>{{ core()->formatPrice(0.00, $order->order_currency_code) }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tab>
|
||||
|
||||
@if ($order->invoices->count())
|
||||
<tab name="{{ __('shop::app.customer.account.order.view.invoices') }}">
|
||||
@foreach ($order->invoices as $invoice)
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('shop::app.customer.account.order.view.individual-invoice', ['invoice_id' => $invoice->increment_id ?? $invoice->id]) }}</span>
|
||||
|
||||
<a href="{{ route('customer.orders.print', $invoice->id) }}" class="pull-right">
|
||||
{{ __('shop::app.customer.account.order.view.print') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table">
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.subtotal') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.tax-amount') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.grand-total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($invoice->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}">
|
||||
{{ $item->getTypeInstance()->getOrderedItem($item)->sku }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}">
|
||||
{{ $item->name }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}">
|
||||
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}">
|
||||
{{ $item->qty }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.subtotal') }}">
|
||||
{{ core()->formatPrice($item->total, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.tax-amount') }}">
|
||||
{{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.grand-total') }}">
|
||||
{{ core()->formatPrice($item->total + $item->tax_amount, $order->order_currency_code) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="totals">
|
||||
<table class="sale-summary">
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.subtotal') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($invoice->sub_total, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.shipping-handling') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($invoice->shipping_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($invoice->base_discount_amount > 0)
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.discount') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($invoice->discount_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.tax') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($invoice->tax_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bold">
|
||||
<td>{{ __('shop::app.customer.account.order.view.grand-total') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($invoice->grand_total, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</tab>
|
||||
@endif
|
||||
|
||||
@if ($order->shipments->count())
|
||||
<tab name="{{ __('shop::app.customer.account.order.view.shipments') }}">
|
||||
@foreach ($order->shipments as $shipment)
|
||||
<div class="sale-section">
|
||||
<div class="section-content">
|
||||
<div class="sale">
|
||||
<span class="title">
|
||||
{{ __('shop::app.customer.account.order.view.tracking-number') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $shipment->track_number }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('shop::app.customer.account.order.view.individual-shipment', ['shipment_id' => $shipment->id]) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
<div class="table">
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($shipment->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}">{{ $item->sku }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}">{{ $item->name }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}">{{ $item->qty }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</tab>
|
||||
@endif
|
||||
|
||||
@if ($order->refunds->count())
|
||||
<tab name="{{ __('shop::app.customer.account.order.view.refunds') }}">
|
||||
@foreach ($order->refunds as $refund)
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('shop::app.customer.account.order.view.individual-refund', ['refund_id' => $refund->id]) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.subtotal') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.tax-amount') }}</th>
|
||||
<th>{{ __('shop::app.customer.account.order.view.grand-total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($refund->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}">{{ $item->child ? $item->child->sku : $item->sku }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}">{{ $item->name }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}">{{ core()->formatPrice($item->price, $order->order_currency_code) }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}">{{ $item->qty }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.subtotal') }}">{{ core()->formatPrice($item->total, $order->order_currency_code) }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.tax-amount') }}">{{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}</td>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.grand-total') }}">{{ core()->formatPrice($item->total + $item->tax_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@if (! $refund->items->count())
|
||||
<tr>
|
||||
<td class="empty" colspan="7">{{ __('shop::app.common.no-result-found') }}</td>
|
||||
<tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="totals">
|
||||
<table class="sale-summary">
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.subtotal') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($refund->sub_total, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($refund->shipping_amount > 0)
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.shipping-handling') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($refund->shipping_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($refund->discount_amount > 0)
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.discount') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($refund->tax_amount > 0)
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.tax') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($refund->tax_amount, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.adjustment-refund') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($refund->adjustment_refund, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.order.view.adjustment-fee') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($refund->adjustment_fee, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bold">
|
||||
<td>{{ __('shop::app.customer.account.order.view.grand-total') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($refund->grand_total, $order->order_currency_code) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</tab>
|
||||
@endif
|
||||
</tabs>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="section-content" style="border-bottom: 0">
|
||||
<div class="order-box-container">
|
||||
@if ($order->billing_address)
|
||||
<div class="box">
|
||||
<div class="box-title">
|
||||
{{ __('shop::app.customer.account.order.view.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div class="box-content">
|
||||
@include ('admin::sales.address', ['address' => $order->billing_address])
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.view.billing-address.after', ['order' => $order]) !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($order->shipping_address)
|
||||
<div class="box">
|
||||
<div class="box-title">
|
||||
{{ __('shop::app.customer.account.order.view.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div class="box-content">
|
||||
@include ('admin::sales.address', ['address' => $order->shipping_address])
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.view.shipping-address.after', ['order' => $order]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="box-title">
|
||||
{{ __('shop::app.customer.account.order.view.shipping-method') }}
|
||||
</div>
|
||||
|
||||
<div class="box-content">
|
||||
{{ $order->shipping_title }}
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.view.shipping-method.after', ['order' => $order]) !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="box">
|
||||
<div class="box-title">
|
||||
{{ __('shop::app.customer.account.order.view.payment-method') }}
|
||||
</div>
|
||||
|
||||
<div class="box-content">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
|
||||
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div class="instructions">
|
||||
<label>{{ $additionalDetails['title'] }}</label>
|
||||
<p>{{ $additionalDetails['value'] }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.view.payment-method.after', ['order' => $order]) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.view.after', ['order' => $order]) !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function cancelOrder(message) {
|
||||
if (! confirm(message)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#cancelOrderForm').submit();
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<div class="sidebar">
|
||||
@foreach ($menu->items as $menuItem)
|
||||
<div class="menu-block">
|
||||
<div class="menu-block-title">
|
||||
{{ trans($menuItem['name']) }}
|
||||
|
||||
<i class="icon icon-arrow-down right" id="down-icon"></i>
|
||||
</div>
|
||||
|
||||
<div class="menu-block-content">
|
||||
<ul class="menubar">
|
||||
@php
|
||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
|
||||
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
@if (! $showCompare)
|
||||
@php
|
||||
unset($menuItem['children']['compare']);
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
@if (! $showWishlist)
|
||||
@php
|
||||
unset($menuItem['children']['wishlist']);
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
@foreach ($menuItem['children'] as $subMenuItem)
|
||||
<li class="menu-item {{ $menu->getActive($subMenuItem) }}">
|
||||
<a href="{{ $subMenuItem['url'] }}">
|
||||
{{ trans($subMenuItem['name']) }}
|
||||
</a>
|
||||
|
||||
<i class="icon angle-right-icon"></i>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".icon.icon-arrow-down.right").on('click', function(e){
|
||||
var currentElement = $(e.currentTarget);
|
||||
if (currentElement.hasClass('icon-arrow-down')) {
|
||||
$(this).parents('.menu-block').find('.menubar').show();
|
||||
currentElement.removeClass('icon-arrow-down');
|
||||
currentElement.addClass('icon-arrow-up');
|
||||
} else {
|
||||
$(this).parents('.menu-block').find('.menubar').hide();
|
||||
currentElement.removeClass('icon-arrow-up');
|
||||
currentElement.addClass('icon-arrow-down');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.profile.edit-profile.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
<div class="account-head mb-10">
|
||||
<span class="back-icon"><a href="{{ route('customer.profile.index') }}"><i class="icon icon-menu-back"></i></a></span>
|
||||
|
||||
<span class="account-heading">{{ __('shop::app.customer.account.profile.edit-profile.title') }}</span>
|
||||
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.before', ['customer' => $customer]) !!}
|
||||
|
||||
<form method="post" action="{{ route('customer.profile.store') }}" @submit.prevent="onSubmit">
|
||||
<div class="edit-form">
|
||||
@csrf
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit_form_controls.before', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.account.profile.fname') }}</label>
|
||||
|
||||
<input type="text" class="control" name="first_name" value="{{ old('first_name') ?? $customer->first_name }}" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.profile.fname') }}"">
|
||||
|
||||
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.first_name.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required">{{ __('shop::app.customer.account.profile.lname') }}</label>
|
||||
|
||||
<input type="text" class="control" name="last_name" value="{{ old('last_name') ?? $customer->last_name }}" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.profile.lname') }}"">
|
||||
|
||||
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.last_name.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('gender') ? 'has-error' : '']">
|
||||
<label for="email" class="required">{{ __('shop::app.customer.account.profile.gender') }}</label>
|
||||
|
||||
<select name="gender" class="control" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.profile.gender') }}"">
|
||||
<option value="" @if ($customer->gender == "") selected @endif>{{ __('admin::app.customers.customers.select-gender') }}</option>
|
||||
<option value="Other" @if ($customer->gender == "Other") selected @endif>{{ __('shop::app.customer.account.profile.other') }}</option>
|
||||
<option value="Male" @if ($customer->gender == "Male") selected @endif>{{ __('shop::app.customer.account.profile.male') }}</option>
|
||||
<option value="Female" @if ($customer->gender == "Female") selected @endif>{{ __('shop::app.customer.account.profile.female') }}</option>
|
||||
</select>
|
||||
|
||||
<span class="control-error" v-if="errors.has('gender')">@{{ errors.first('gender') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.gender.after') !!}
|
||||
|
||||
<div class="control-group date" :class="[errors.has('date_of_birth') ? 'has-error' : '']">
|
||||
<label for="date_of_birth">{{ __('shop::app.customer.account.profile.dob') }}</label>
|
||||
|
||||
<date>
|
||||
<input type="date" class="control" name="date_of_birth" value="{{ old('date_of_birth') ?? $customer->date_of_birth }}" v-validate="" data-vv-as=""{{ __('shop::app.customer.account.profile.dob') }}"">
|
||||
</date>
|
||||
|
||||
<span class="control-error" v-if="errors.has('date_of_birth')">@{{ errors.first('date_of_birth') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.date_of_birth.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email" class="required">{{ __('shop::app.customer.account.profile.email') }}</label>
|
||||
|
||||
<input type="email" class="control" name="email" value="{{ old('email') ?? $customer->email }}" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.profile.email') }}"">
|
||||
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.email.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('phone') ? 'has-error' : '']">
|
||||
<label for="phone">{{ __('shop::app.customer.account.profile.phone') }}</label>
|
||||
|
||||
<input type="text" class="control" name="phone" value="{{ old('phone') ?? $customer->phone }}" data-vv-as=""{{ __('shop::app.customer.account.profile.phone') }}"">
|
||||
|
||||
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.phone.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('oldpassword') ? 'has-error' : '']">
|
||||
<label for="password">{{ __('shop::app.customer.account.profile.opassword') }}</label>
|
||||
|
||||
<input type="password" class="control" name="oldpassword" data-vv-as=""{{ __('shop::app.customer.account.profile.opassword') }}"" v-validate="'min:6'">
|
||||
|
||||
<span class="control-error" v-if="errors.has('oldpassword')">@{{ errors.first('oldpassword') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.oldpassword.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('password') ? 'has-error' : '']">
|
||||
<label for="password">{{ __('shop::app.customer.account.profile.password') }}</label>
|
||||
|
||||
<input type="password" id="password" class="control" name="password" ref="password" data-vv-as=""{{ __('shop::app.customer.account.profile.password') }}"" v-validate="'min:6'">
|
||||
|
||||
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.password.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('password_confirmation') ? 'has-error' : '']">
|
||||
<label for="password">{{ __('shop::app.customer.account.profile.cpassword') }}</label>
|
||||
|
||||
<input type="password" id="password_confirmation" class="control" name="password_confirmation" data-vv-as=""{{ __('shop::app.customer.account.profile.cpassword') }}"" v-validate="'min:6|confirmed:password'">
|
||||
|
||||
<span class="control-error" v-if="errors.has('password_confirmation')">@{{ errors.first('password_confirmation') }}</span>
|
||||
</div>
|
||||
|
||||
@if (core()->getConfigData('customer.settings.newsletter.subscription'))
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="subscribed_to_news_letter"@if (isset($customer->subscription)) value="{{ $customer->subscription->is_subscribed }}" {{ $customer->subscription->is_subscribed ? 'checked' : ''}} @endif>
|
||||
|
||||
<span>{{ __('shop::app.customer.signup-form.subscribe-to-newsletter') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit_form_controls.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="button-group">
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.account.profile.submit') }}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.after', ['customer' => $customer]) !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.profile.index.title') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
<div class="account-head">
|
||||
<span class="back-icon"><a href="{{ route('customer.profile.index') }}"><i class="icon icon-menu-back"></i></a></span>
|
||||
|
||||
<span class="account-heading">{{ __('shop::app.customer.account.profile.index.title') }}</span>
|
||||
|
||||
<span class="account-action">
|
||||
<a href="{{ route('customer.profile.edit') }}">{{ __('shop::app.customer.account.profile.index.edit') }}</a>
|
||||
</span>
|
||||
|
||||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.before', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="account-table-content" style="width: 50%;">
|
||||
<table style="color: #5E5E5E;">
|
||||
<tbody>
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.table.before', ['customer' => $customer]) !!}
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.profile.fname') }}</td>
|
||||
<td>{{ $customer->first_name }}</td>
|
||||
</tr>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.table.first_name.after', ['customer' => $customer]) !!}
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.profile.lname') }}</td>
|
||||
<td>{{ $customer->last_name }}</td>
|
||||
</tr>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.table.last_name.after', ['customer' => $customer]) !!}
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.profile.gender') }}</td>
|
||||
<td>{{ __($customer->gender) }}</td>
|
||||
</tr>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.table.gender.after', ['customer' => $customer]) !!}
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.profile.dob') }}</td>
|
||||
<td>{{ $customer->date_of_birth }}</td>
|
||||
</tr>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.table.date_of_birth.after', ['customer' => $customer]) !!}
|
||||
|
||||
<tr>
|
||||
<td>{{ __('shop::app.customer.account.profile.email') }}</td>
|
||||
<td>{{ $customer->email }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<button type="submit" @click="showModal('deleteProfile')" class="btn btn-lg btn-primary mt-10">
|
||||
{{ __('shop::app.customer.account.address.index.delete') }}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.table.after', ['customer' => $customer]) !!}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<form method="POST" action="{{ route('customer.profile.destroy') }}" @submit.prevent="onSubmit">
|
||||
@csrf
|
||||
|
||||
<modal id="deleteProfile" :is-open="modalIds.deleteProfile">
|
||||
<h3 slot="header">{{ __('shop::app.customer.account.address.index.enter-password') }}</h3>
|
||||
|
||||
<div slot="body">
|
||||
<div class="control-group" :class="[errors.has('password') ? 'has-error' : '']">
|
||||
<label for="password" class="required">{{ __('admin::app.users.users.password') }}</label>
|
||||
<input type="password" v-validate="'required|min:6|max:18'" class="control" id="password" name="password" data-vv-as=""{{ __('admin::app.users.users.password') }}""/>
|
||||
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
<button type="submit" class="btn btn-lg btn-primary mt-10">
|
||||
{{ __('shop::app.customer.account.address.index.delete') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</modal>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.after', ['customer' => $customer]) !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.review.index.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
<div class="account-head">
|
||||
<span class="back-icon"><a href="{{ route('customer.profile.index') }}"><i class="icon icon-menu-back"></i></a></span>
|
||||
|
||||
<span class="account-heading">{{ __('shop::app.customer.account.review.index.title') }}</span>
|
||||
|
||||
@if (count($reviews) > 1)
|
||||
<div class="account-action">
|
||||
<form id="deleteAllReviewForm" action="{{ route('customer.review.deleteall') }}" method="post">
|
||||
@method('delete')
|
||||
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
<a href="javascript:void(0);" onclick="confirm('{{ __('shop::app.customer.account.review.delete-all.confirmation-message') }}') ? document.getElementById('deleteAllReviewForm').submit() : null;">
|
||||
{{ __('shop::app.customer.account.review.delete-all.title') }}
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<span></span>
|
||||
|
||||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.reviews.list.before', ['reviews' => $reviews]) !!}
|
||||
|
||||
<div class="account-items-list">
|
||||
@if (! $reviews->isEmpty())
|
||||
@foreach ($reviews as $review)
|
||||
<div class="account-item-card mt-15 mb-15">
|
||||
<div class="media-info">
|
||||
@php $image = productimage()->getProductBaseImage($review->product); @endphp
|
||||
|
||||
<a href="{{ route('shop.productOrCategory.index', $review->product->url_key) }}" title="{{ $review->product->name }}">
|
||||
<img class="media" src="{{ $image['small_image_url'] }}" alt=""/>
|
||||
</a>
|
||||
|
||||
<div class="info">
|
||||
<div class="product-name">
|
||||
<a href="{{ route('shop.productOrCategory.index', $review->product->url_key) }}" title="{{ $review->product->name }}">
|
||||
{{$review->product->name}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="stars mt-10">
|
||||
@for($i=0 ; $i < $review->rating ; $i++)
|
||||
<span class="icon star-icon"></span>
|
||||
@endfor
|
||||
</div>
|
||||
|
||||
<div class="mt-10" v-pre>
|
||||
{{ $review->comment }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="operations">
|
||||
<form id="deleteReviewForm{{ $review->id }}" action="{{ route('customer.review.delete', $review->id) }}" method="post">
|
||||
@method('delete')
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
<a class="mb-50" href="javascript:void(0);" onclick="deleteReview('{{ $review->id }}')">
|
||||
<span class="icon trash-icon"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="horizontal-rule mb-10 mt-10"></div>
|
||||
@endforeach
|
||||
|
||||
<div class="bottom-toolbar">
|
||||
{{ $reviews->links() }}
|
||||
</div>
|
||||
@else
|
||||
<div class="empty mt-15">
|
||||
{{ __('customer::app.reviews.empty') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.reviews.list.after', ['reviews' => $reviews]) !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function deleteReview(reviewId) {
|
||||
if (! confirm('{{ __("shop::app.customer.account.review.delete.confirmation-message") }}')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(`#deleteReviewForm${reviewId}`).submit();
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.review.view.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
<div class="account-layout">
|
||||
<div class="account-head">
|
||||
<span class="account-heading">Reviews</span>
|
||||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
<div class="account-items-list">
|
||||
@if (count($reviews))
|
||||
@foreach ($reviews as $review)
|
||||
<div class="account-item-card mt-15 mb-15">
|
||||
<div class="media-info">
|
||||
<?php $image = productimage()->getGalleryImages($review->product); ?>
|
||||
<img class="media" src="{{ $image[0]['small_image_url'] }}" alt="" />
|
||||
|
||||
<div class="info mt-20">
|
||||
<div class="product-name">{{$review->product->name}}</div>
|
||||
|
||||
<div>
|
||||
@for($i=0;$i<$review->rating;$i++)
|
||||
<span class="icon star-icon"></span>
|
||||
@endfor
|
||||
</div>
|
||||
|
||||
<div v-pre>
|
||||
{{ $review->comment }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="horizontal-rule mb-10 mt-10"></div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="empty">
|
||||
{{ __('customer::app.reviews.empty') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<div class="account-item-card mt-15 mb-15">
|
||||
<div class="media-info">
|
||||
@php
|
||||
$image = $item->product->getTypeInstance()->getBaseImage($item);
|
||||
@endphp
|
||||
|
||||
<a href="{{ route('shop.productOrCategory.index', $item->product->url_key) }}" title="{{ $item->product->name }}">
|
||||
<img class="media" src="{{ $image['small_image_url'] }}" alt="" />
|
||||
</a>
|
||||
|
||||
<div class="info">
|
||||
<div class="product-name">
|
||||
{{ $item->product->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b> {{ $attribute['option_label'] }}
|
||||
</br>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($visibility ?? false)
|
||||
<div class="mb-2">
|
||||
<span class="fs16">
|
||||
{{ __('shop::app.customer.account.wishlist.visibility') }} :
|
||||
|
||||
<span class="badge badge-sm {{ $item->shared ? 'badge-success' : 'badge-danger' }}">
|
||||
{{ $item->shared ? __('shop::app.customer.account.wishlist.public') : __('shop::app.customer.account.wishlist.private') }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<span class="stars" style="display: inline">
|
||||
@for ($i = 1; $i <= $reviewHelper->getAverageRating($item->product); $i++)
|
||||
<span class="icon star-icon"></span>
|
||||
@endfor
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="operations">
|
||||
<form id="wishlist-{{ $item->id }}" action="{{ route('customer.wishlist.remove', $item->id) }}" method="POST">
|
||||
@method('DELETE')
|
||||
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
@auth('customer')
|
||||
<a
|
||||
class="mb-50"
|
||||
href="javascript:void(0);"
|
||||
onclick="document.getElementById('wishlist-{{ $item->id }}').submit();">
|
||||
<span class="icon trash-icon"></span>
|
||||
</a>
|
||||
@endauth
|
||||
|
||||
<a href="{{ route('customer.wishlist.move', $item->id) }}" class="btn btn-primary btn-md">
|
||||
{{ __('shop::app.customer.account.wishlist.move-to-cart') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="horizontal-rule mb-10 mt-10"></div>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.wishlist.customer-name', ['name' => $customer->name]) }}
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||
|
||||
<div class="account-layout">
|
||||
<div class="account-head mb-15">
|
||||
<span class="account-heading">{{ __('shop::app.customer.account.wishlist.customer-name', ['name' => $customer->name]) }}</span>
|
||||
|
||||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
<div class="account-items-list">
|
||||
@foreach ($items as $item)
|
||||
@include('shop::customers.account.wishlist.wishlist-product', ['item' => $item])
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,217 @@
|
|||
@extends('shop::customers.account.index')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.account.wishlist.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('account-content')
|
||||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||
|
||||
<div class="account-layout">
|
||||
<div class="account-head mb-15">
|
||||
<span class="account-heading">{{ __('shop::app.customer.account.wishlist.title') }}</span>
|
||||
|
||||
@if (count($items))
|
||||
<div class="account-action">
|
||||
<form id="remove-all-wishlist" action="{{ route('customer.wishlist.removeall') }}" method="POST">
|
||||
@method('DELETE')
|
||||
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
@if ($isSharingEnabled)
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onclick="window.showShareWishlistModal();" class="m-20">
|
||||
{{ __('shop::app.customer.account.wishlist.share') }}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onclick="window.deleteAllWishlist()">
|
||||
{{ __('shop::app.customer.account.wishlist.deleteall') }}
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.before', ['wishlist' => $items]) !!}
|
||||
|
||||
<div class="account-items-list">
|
||||
@if ($items->count())
|
||||
@foreach ($items as $item)
|
||||
@include('shop::customers.account.wishlist.wishlist-product', [
|
||||
'item' => $item,
|
||||
'visibility' => $isSharingEnabled
|
||||
])
|
||||
@endforeach
|
||||
|
||||
<div class="bottom-toolbar">
|
||||
{{ $items->links() }}
|
||||
</div>
|
||||
@else
|
||||
<div class="empty">
|
||||
{{ __('customer::app.wishlist.empty') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($isSharingEnabled)
|
||||
<div id="shareWishlistModal" class="d-none">
|
||||
<modal id="shareWishlist" :is-open="modalIds.shareWishlist">
|
||||
<h3 slot="header">
|
||||
{{ __('shop::app.customer.account.wishlist.share-wishlist') }}
|
||||
</h3>
|
||||
|
||||
<div slot="body">
|
||||
<share-component></share-component>
|
||||
</div>
|
||||
</modal>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.after', ['wishlist' => $items]) !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@if ($isSharingEnabled)
|
||||
<script type="text/x-template" id="share-component-template">
|
||||
<form method="POST">
|
||||
@csrf
|
||||
|
||||
<div class="control-group">
|
||||
<label for="shared" class="required">{{ __('shop::app.customer.account.wishlist.wishlist-sharing') }}</label>
|
||||
|
||||
<select name="shared" class="control" @change="shareWishlist($event.target.value)">
|
||||
<option value="0" :selected="! isWishlistShared">{{ __('shop::app.customer.account.wishlist.disable') }}</option>
|
||||
<option value="1" :selected="isWishlistShared">{{ __('shop::app.customer.account.wishlist.enable') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="required">{{ __('shop::app.customer.account.wishlist.visibility') }}</label>
|
||||
|
||||
<div style="margin-top: 10px; margin-bottom: 5px;">
|
||||
<span class="badge badge-sm badge-success" v-if="isWishlistShared">
|
||||
{{ __('shop::app.customer.account.wishlist.public') }}
|
||||
</span>
|
||||
|
||||
<span class="badge badge-sm badge-danger" v-else>
|
||||
{{ __('shop::app.customer.account.wishlist.private') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="required">{{ __('shop::app.customer.account.wishlist.shared-link') }}</label>
|
||||
|
||||
<div style="margin-top: 10px; margin-bottom: 5px;">
|
||||
<div class="input-group" v-if="isWishlistShared">
|
||||
<input
|
||||
type="text"
|
||||
class="control"
|
||||
v-model="wishlistSharedLink"
|
||||
v-on:focus="$event.target.select()"
|
||||
ref="sharedLink"
|
||||
/>
|
||||
|
||||
<div class="input-group-append">
|
||||
<button
|
||||
class="btn btn-primary btn-md"
|
||||
type="button"
|
||||
id="copy-btn"
|
||||
title="{{ __('shop::app.customer.account.wishlist.copy-link') }}"
|
||||
@click="copyToClipboard"
|
||||
>
|
||||
{{ __('shop::app.customer.account.wishlist.copy') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="alert alert-danger" v-else>
|
||||
{{ __('shop::app.customer.account.wishlist.enable-wishlist-info') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* Show share wishlist modal.
|
||||
*/
|
||||
function showShareWishlistModal() {
|
||||
document.getElementById('shareWishlistModal').classList.remove('d-none');
|
||||
|
||||
window.app.showModal('shareWishlist');
|
||||
}
|
||||
|
||||
Vue.component('share-component', {
|
||||
template: '#share-component-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
isWishlistShared: parseInt("{{ $isWishlistShared }}"),
|
||||
|
||||
wishlistSharedLink: "{{ $wishlistSharedLink }}",
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
shareWishlist: function(val) {
|
||||
var self = this;
|
||||
|
||||
this.$root.showLoader();
|
||||
|
||||
this.$http.post("{{ route('customer.wishlist.share') }}", {
|
||||
shared: val
|
||||
})
|
||||
.then(function(response) {
|
||||
self.$root.hideLoader();
|
||||
|
||||
self.isWishlistShared = response.data.isWishlistShared;
|
||||
|
||||
self.wishlistSharedLink = response.data.wishlistSharedLink;
|
||||
})
|
||||
.catch(function (error) {
|
||||
self.$root.hideLoader();
|
||||
|
||||
window.location.reload();
|
||||
})
|
||||
},
|
||||
|
||||
copyToClipboard: function() {
|
||||
this.$refs.sharedLink.focus();
|
||||
|
||||
document.execCommand('copy');
|
||||
showCopyMessage();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
||||
<script>
|
||||
/**
|
||||
* Delete all wishlist.
|
||||
*/
|
||||
function deleteAllWishlist() {
|
||||
if (confirm('{{ __('shop::app.customer.account.wishlist.confirm-delete-all') }}')) document.getElementById('remove-all-wishlist').submit();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function showCopyMessage()
|
||||
{
|
||||
$('#copy-btn').text("{{ __('shop::app.customer.account.wishlist.copied') }}");
|
||||
$('#copy-btn').css({backgroundColor: '#146e24'});
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.login-form.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
<div class="auth-content">
|
||||
<div class="sign-up-text">
|
||||
{{ __('shop::app.customer.login-text.no_account') }} - <a href="{{ route('customer.register.index') }}">{{ __('shop::app.customer.login-text.title') }}</a>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login.before') !!}
|
||||
|
||||
<form method="POST" action="{{ route('customer.session.create') }}" @submit.prevent="onSubmit">
|
||||
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="login-form">
|
||||
<div class="login-text">{{ __('shop::app.customer.login-form.title') }}</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email" class="required">{{ __('shop::app.customer.login-form.email') }}</label>
|
||||
<input type="text" class="control" name="email" v-validate="'required|email'" value="{{ old('email') }}" data-vv-as=""{{ __('shop::app.customer.login-form.email') }}"">
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('password') ? 'has-error' : '']">
|
||||
<label for="password" class="required">{{ __('shop::app.customer.login-form.password') }} </label>
|
||||
<input type="password" v-validate="'required|min:6'" class="control" id="password" name="password" data-vv-as=""{{ __('admin::app.users.sessions.password') }}"" value=""/>
|
||||
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<input type="checkbox" id="shoPassword" >{{ __('shop::app.customer.login-form.show-password') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="forgot-password-link">
|
||||
<a href="{{ route('customer.forgot-password.create') }}">{{ __('shop::app.customer.login-form.forgot_pass') }}</a>
|
||||
|
||||
<div class="mt-10">
|
||||
@if (Cookie::has('enable-resend'))
|
||||
@if (Cookie::get('enable-resend') == true)
|
||||
<a href="{{ route('customer.resend.verification-email', Cookie::get('email-for-resend')) }}">{{ __('shop::app.customer.login-form.resend-verification') }}</a>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
{!! Captcha::render() !!}
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login_form_controls.after') !!}
|
||||
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.login-form.button_title') }}">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login.after') !!}
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
|
||||
{!! Captcha::renderJS() !!}
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#shoPassword").click(function() {
|
||||
var input = $('#password').attr("type");
|
||||
if (input == "password") {
|
||||
$('#password').attr("type", "text");
|
||||
} else {
|
||||
$('#password').attr("type", "password");
|
||||
}
|
||||
});
|
||||
$(":input[name=email]").focus();
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.forgot-password.page_title') }}
|
||||
@stop
|
||||
|
||||
@push('css')
|
||||
<style>
|
||||
.button-group {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
.primary-back-icon {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="auth-content">
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.forget_password.before') !!}
|
||||
|
||||
<form method="post" action="{{ route('customer.forgot-password.store') }}" @submit.prevent="onSubmit">
|
||||
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="login-form">
|
||||
|
||||
<div class="login-text">{{ __('shop::app.customer.forgot-password.title') }}</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email">{{ __('shop::app.customer.forgot-password.email') }}</label>
|
||||
<input type="email" class="control" name="email" v-validate="'required|email'">
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.before') !!}
|
||||
|
||||
<div class="button-group">
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('shop::app.customer.forgot-password.submit') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="control-group" style="margin-bottom: 0px;">
|
||||
<a href="{{ route('customer.session.index') }}">
|
||||
<i class="icon primary-back-icon"></i>
|
||||
{{ __('shop::app.customer.reset-password.back-link-title') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.forget_password.before') !!}
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
@extends('shop::layouts.master')
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.signup-form.page-title') }}
|
||||
@endsection
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="auth-content">
|
||||
|
||||
<div class="sign-up-text">
|
||||
{{ __('shop::app.customer.signup-text.account_exists') }} - <a href="{{ route('customer.session.index') }}">{{ __('shop::app.customer.signup-text.title') }}</a>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup.before') !!}
|
||||
|
||||
<form method="post" action="{{ route('customer.register.create') }}" @submit.prevent="onSubmit">
|
||||
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="login-form">
|
||||
<div class="login-text">{{ __('shop::app.customer.signup-form.title') }}</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.signup-form.firstname') }}</label>
|
||||
<input type="text" class="control" name="first_name" v-validate="'required'" value="{{ old('first_name') }}" data-vv-as=""{{ __('shop::app.customer.signup-form.firstname') }}"">
|
||||
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.firstname.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required">{{ __('shop::app.customer.signup-form.lastname') }}</label>
|
||||
<input type="text" class="control" name="last_name" v-validate="'required'" value="{{ old('last_name') }}" data-vv-as=""{{ __('shop::app.customer.signup-form.lastname') }}"">
|
||||
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.lastname.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email" class="required">{{ __('shop::app.customer.signup-form.email') }}</label>
|
||||
<input type="email" class="control" name="email" v-validate="'required|email'" value="{{ old('email') }}" data-vv-as=""{{ __('shop::app.customer.signup-form.email') }}"">
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.email.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('password') ? 'has-error' : '']">
|
||||
<label for="password" class="required">{{ __('shop::app.customer.signup-form.password') }}</label>
|
||||
<input type="password" class="control" name="password" v-validate="'required|min:6'" ref="password" value="{{ old('password') }}" data-vv-as=""{{ __('shop::app.customer.signup-form.password') }}"">
|
||||
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.password.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('password_confirmation') ? 'has-error' : '']">
|
||||
<label for="password_confirmation" class="required">{{ __('shop::app.customer.signup-form.confirm_pass') }}</label>
|
||||
<input type="password" class="control" name="password_confirmation" v-validate="'required|min:6|confirmed:password'" data-vv-as=""{{ __('shop::app.customer.signup-form.confirm_pass') }}"">
|
||||
<span class="control-error" v-if="errors.has('password_confirmation')">@{{ errors.first('password_confirmation') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.password_confirmation.after') !!}
|
||||
|
||||
{{-- <div class="signup-confirm" :class="[errors.has('agreement') ? 'has-error' : '']">
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" id="checkbox2" name="agreement" v-validate="'required'">
|
||||
<label class="checkbox-view" for="checkbox2"></label>
|
||||
<span>{{ __('shop::app.customer.signup-form.agree') }}
|
||||
<a href="">{{ __('shop::app.customer.signup-form.terms') }}</a> & <a href="">{{ __('shop::app.customer.signup-form.conditions') }}</a> {{ __('shop::app.customer.signup-form.using') }}.
|
||||
</span>
|
||||
</span>
|
||||
<span class="control-error" v-if="errors.has('agreement')">@{{ errors.first('agreement') }}</span>
|
||||
</div> --}}
|
||||
|
||||
{{-- <span class="checkbox">
|
||||
<input type="checkbox" id="checkbox1" name="checkbox[]">
|
||||
<label class="checkbox-view" for="checkbox1"></label>
|
||||
Checkbox Value 1
|
||||
</span> --}}
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
{!! Captcha::render() !!}
|
||||
|
||||
</div>
|
||||
|
||||
@if (core()->getConfigData('customer.settings.newsletter.subscription'))
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="is_subscribed">
|
||||
<span>{{ __('shop::app.customer.signup-form.subscribe-to-newsletter') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.after') !!}
|
||||
|
||||
<button class="btn btn-primary btn-lg" type="submit">
|
||||
{{ __('shop::app.customer.signup-form.button_title') }}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup.after') !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$(":input[name=first_name]").focus();
|
||||
});
|
||||
</script>
|
||||
|
||||
{!! Captcha::renderJS() !!}
|
||||
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.reset-password.title') }}
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="auth-content">
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.reset_password.before') !!}
|
||||
|
||||
<form method="post" action="{{ route('customer.reset-password.store') }}" >
|
||||
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="login-form">
|
||||
|
||||
<div class="login-text">{{ __('shop::app.customer.reset-password.title') }}</div>
|
||||
|
||||
<input type="hidden" name="token" value="{{ old('token') ?: $token }}">
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.reset_password_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email">{{ __('shop::app.customer.reset-password.email') }}</label>
|
||||
<input type="text" v-validate="'required|email'" class="control" id="email" name="email" value="{{ old('email') }}"/>
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('password') ? 'has-error' : '']">
|
||||
<label for="password">{{ __('shop::app.customer.reset-password.password') }}</label>
|
||||
<input type="password" class="control" name="password" v-validate="'required|min:6'" ref="password">
|
||||
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('confirm_password') ? 'has-error' : '']">
|
||||
<label for="confirm_password">{{ __('shop::app.customer.reset-password.confirm-password') }}</label>
|
||||
<input type="password" class="control" name="password_confirmation" v-validate="'required|min:6|confirmed:password'">
|
||||
<span class="control-error" v-if="errors.has('confirm_password')">@{{ errors.first('confirm_password') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.reset_password_form_controls.before') !!}
|
||||
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.reset-password.submit-btn-title') }}">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.reset_password.before') !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@if (core()->getConfigData('general.design.admin_logo.logo_image'))
|
||||
<img src="{{ \Illuminate\Support\Facades\Storage::url(core()->getConfigData('general.design.admin_logo.logo_image')) }}" alt="{{ config('app.name') }}" style="height: 40px; width: 110px;"/>
|
||||
@else
|
||||
<img src="{{ asset('vendor/webkul/ui/assets/images/logo.png') }}" alt="{{ config('app.name') }}"/>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.forget-password.dear', ['name' => $user_name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.forget-password.info') }}
|
||||
</p>
|
||||
|
||||
<p style="text-align: center;padding: 20px 0;">
|
||||
<a href="{{ route('admin.reset-password.create', $token) }}" style="padding: 10px 20px;background: #0041FF;color: #ffffff;text-transform: uppercase;text-decoration: none; font-size: 16px">
|
||||
{{ __('shop::app.mail.forget-password.reset-password') }}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.forget-password.final-summary') }}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.forget-password.thanks') }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
|
||||
<div>
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<p style="font-weight: bold;font-size: 20px;color: #242424;line-height: 24px;">
|
||||
{{ __('shop::app.mail.customer.registration.dear-admin', ['admin_name' => core()->getAdminEmailDetails()['name']]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.customer.registration.greeting-admin') !!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.customer.registration.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@if (core()->getConfigData('general.design.admin_logo.logo_image'))
|
||||
<img src="{{ \Illuminate\Support\Facades\Storage::url(core()->getConfigData('general.design.admin_logo.logo_image')) }}" alt="{{ config('app.name') }}" style="height: 40px; width: 110px;"/>
|
||||
@else
|
||||
<img src="{{ asset('vendor/webkul/ui/assets/images/logo.png') }}" alt="{{ config('app.name') }}"/>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.update-password.dear', ['name' => $user->name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.update-password.info') }}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.update-password.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.forget-password.dear', ['name' => $user_name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.forget-password.info') }}
|
||||
</p>
|
||||
|
||||
<p style="text-align: center;padding: 20px 0;">
|
||||
<a href="{{ route('customer.reset-password.create', $token) }}" style="padding: 10px 20px;background: #0041FF;color: #ffffff;text-transform: uppercase;text-decoration: none; font-size: 16px">
|
||||
{{ __('shop::app.mail.forget-password.reset-password') }}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.forget-password.final-summary') }}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.forget-password.thanks') }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
|
||||
<div>
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="font-size:16px; color:#242424; font-weight:600; margin-top: 60px; margin-bottom: 15px">
|
||||
{{ __('shop::app.mail.customer.new.dear', ['customer_name' => $customer['name']]) }},
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{!! __('shop::app.mail.invoice.reminder.your-invoice-is-overdue', ['invoice' => $invoice->increment_id, 'time' => $invoice->created_at->diffForHumans()]) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{!! __('shop::app.mail.invoice.reminder.please-make-your-payment-as-soon-as-possible') !!}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{!! __('shop::app.mail.invoice.reminder.if-you-ve-already-paid-just-disregard-this-email') !!}
|
||||
</div>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.customer.new.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
|
||||
<div>
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="font-size:16px; color:#242424; font-weight:600; margin-top: 60px; margin-bottom: 15px">
|
||||
{{ __('shop::app.mail.customer.new.dear', ['customer_name' => $customer['name']]) }},
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{!! __('shop::app.mail.customer.new.summary') !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<b> {!! __('shop::app.mail.customer.new.username-email') !!} </b> - {{ $customer['email'] }} <br>
|
||||
<b> {!! __('shop::app.mail.customer.new.password') !!} </b> - {{ $password}}
|
||||
</div>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.customer.new.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
|
||||
<div>
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<p style="font-weight: bold;font-size: 20px;color: #242424;line-height: 24px;">
|
||||
{{ __('shop::app.mail.customer.registration.dear', ['customer_name' => $data['first_name']. ' ' .$data['last_name']]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.customer.registration.greeting') !!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #5E5E5E;line-height: 30px;margin-bottom: 20px !important;">
|
||||
{{ __('shop::app.mail.customer.registration.summary') }}
|
||||
</div>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.customer.registration.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
|
||||
<div>
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="font-size:16px; color:#242424; font-weight:600; margin-top: 60px; margin-bottom: 15px">
|
||||
{!! __('shop::app.mail.customer.subscription.greeting') !!}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{!! __('shop::app.mail.customer.subscription.summary') !!}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 40px; text-align: center">
|
||||
<a href="{{ route('shop.unsubscribe', $data['token']) }}" style="font-size: 16px;
|
||||
color: #FFFFFF; text-align: center; background: #0031F0; padding: 10px 100px;text-decoration: none;">
|
||||
{!! __('shop::app.mail.customer.subscription.unsubscribe') !!}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.update-password.dear', ['name' => $user->name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.update-password.info') }}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.update-password.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
|
||||
<div>
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="font-size:16px; color:#242424; font-weight:600; margin-top: 60px; margin-bottom: 15px">
|
||||
{!! __('shop::app.mail.customer.verification.heading') !!}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{!! __('shop::app.mail.customer.verification.summary') !!}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 40px; text-align: center">
|
||||
<a href="{{ route('customer.verify', $data['token']) }}" style="font-size: 16px;
|
||||
color: #FFFFFF; text-align: center; background: #0031F0; padding: 10px 100px;text-decoration: none;">
|
||||
{!! __('shop::app.mail.customer.verification.verify') !!}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@if ($logo = core()->getCurrentChannel()->logo_url)
|
||||
<img src="{{ $logo }}" alt="{{ config('app.name') }}" style="height: 40px; width: 110px;"/>
|
||||
@else
|
||||
<img src="{{ asset('themes/default/assets/images/logo.svg') }}" alt="{{ config('app.name') }}"/>
|
||||
@endif
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,500" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
|
||||
<body style="font-family: montserrat, sans-serif;">
|
||||
<div style="max-width: 1000px; margin-left: auto; margin-right: auto;">
|
||||
<div style="text-align: center;">
|
||||
{{ $header ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $slot }}
|
||||
|
||||
{{ $subcopy ?? '' }}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,241 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@if (core()->getConfigData('general.design.admin_logo.logo_image'))
|
||||
<img src="{{ \Illuminate\Support\Facades\Storage::url(core()->getConfigData('general.design.admin_logo.logo_image')) }}" alt="{{ config('app.name') }}" style="height: 40px; width: 110px;"/>
|
||||
@else
|
||||
<img src="{{ asset('vendor/webkul/ui/assets/images/logo.png') }}" alt="{{ config('app.name') }}"/>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<span style="font-weight: bold;">
|
||||
{{ __('shop::app.mail.order.heading') }}
|
||||
</span> <br>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.dear-admin', ['admin_name' => config('mail.from.name')]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.order.greeting-admin', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->increment_id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
|
||||
{{ __('shop::app.mail.order.summary') }}
|
||||
</div>
|
||||
|
||||
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||
@if ($order->shipping_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->postcode . " " . $order->shipping_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->shipping_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping') }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ $order->shipping_title }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($order->billing_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->postcode . " " . $order->billing_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->billing_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ __('shop::app.mail.order.payment') }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold; font-size: 16px; color: #242424; margin-bottom: 20px;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
|
||||
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
<div>{{ $additionalDetails['title'] }}</div>
|
||||
<div>{{ $additionalDetails['value'] }}</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($order->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->getTypeInstance()->getOrderedItem($item)->sku }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">
|
||||
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->qty_ordered }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;line-height: 30px;float: right;width: 40%;margin-top: 20px;">
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.subtotal') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatBasePrice($order->base_sub_total) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.shipping-handling') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatBasePrice($order->base_shipping_amount) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@foreach (Webkul\Tax\Helpers\Tax::getTaxRatesWithAmount($order, true) as $taxRate => $baseTaxAmount )
|
||||
<div>
|
||||
<span id="taxrate-{{ core()->taxRateAsIdentifier($taxRate) }}">{{ __('shop::app.mail.order.tax') }} {{ $taxRate }} %</span>
|
||||
<span id="basetaxamount-{{ core()->taxRateAsIdentifier($taxRate) }}" style="float: right;">
|
||||
{{ core()->formatBasePrice($baseTaxAmount) }}
|
||||
</span>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@if ($order->discount_amount > 0)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.discount') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatBasePrice($order->base_discount_amount) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div style="font-weight: bold">
|
||||
<span>{{ __('shop::app.mail.order.grand-total') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatBasePrice($order->base_grand_total) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width: 100%;margin-top: 65px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.admin.address') . '">' . config('mail.admin.address') . '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@if (core()->getConfigData('general.design.admin_logo.logo_image'))
|
||||
<img src="{{ \Illuminate\Support\Facades\Storage::url(core()->getConfigData('general.design.admin_logo.logo_image')) }}" alt="{{ config('app.name') }}" style="height: 40px; width: 110px;"/>
|
||||
@else
|
||||
<img src="{{ asset('vendor/webkul/ui/assets/images/logo.png') }}" alt="{{ config('app.name') }}"/>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php $order = $shipment->order; ?>
|
||||
<?php $inventory = $shipment->inventory_source; ?>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<span style="font-weight: bold;">
|
||||
{{ __('shop::app.mail.shipment.inventory-heading', ['order_id' => $order->increment_id, 'shipment_id' => $shipment->id]) }}
|
||||
</span> <br>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.dear', ['customer_name' => $inventory->name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.shipment.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->increment_id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||
@if ($order->shipping_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->postcode . " " . $order->shipping_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->shipping_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping') }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
<div style="font-weight: bold;">
|
||||
{{ $order->shipping_title }}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="font-weight: bold;">{{ __('shop::app.mail.shipment.carrier') }} : </span>{{ $shipment->carrier_title }}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="font-weight: bold;">{{ __('shop::app.mail.shipment.tracking-number') }} : </span>{{ $shipment->track_number }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($order->billing_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->postcode . " " . $order->billing_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->billing_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold; font-size: 16px; color: #242424;">
|
||||
{{ __('shop::app.mail.order.payment') }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold; font-size: 16px; color: #242424;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($shipment->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">{{ $item->sku }}</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">{{ core()->formatPrice($item->price, $order->order_currency_code) }}</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">{{ $item->qty }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- <div style="margin-top: 20px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div> --}}
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php $order = $invoice->order; ?>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<span style="font-weight: bold;">
|
||||
{{ __('shop::app.mail.invoice.heading', ['order_id' => $order->increment_id, 'invoice_id' => $invoice->increment_id ?? $invoice->id]) }}
|
||||
</span> <br>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.dear', ['customer_name' => $order->customer_full_name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.order.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->increment_id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
|
||||
{{ __('shop::app.mail.invoice.summary') }}
|
||||
</div>
|
||||
|
||||
<div
|
||||
style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||
@if ($order->shipping_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->postcode . " " . $order->shipping_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->shipping_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping') }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ $order->shipping_title }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($order->billing_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->postcode . " " . $order->billing_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->billing_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ __('shop::app.mail.order.payment') }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px; color: #242424;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($invoice->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}"
|
||||
style="text-align: left;padding: 8px">
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }}
|
||||
: </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}"
|
||||
style="text-align: left;padding: 8px">{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}"
|
||||
style="text-align: left;padding: 8px">{{ $item->qty }}</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;line-height: 30px;float: right;width: 40%;margin-top: 20px;">
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.subtotal') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($invoice->sub_total, $invoice->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if ($order->shipping_address)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.shipping-handling') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($invoice->shipping_amount, $invoice->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.tax') }}</span>
|
||||
<span id="taxamount" style="float: right;">
|
||||
{{ core()->formatPrice($invoice->tax_amount, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if ($invoice->discount_amount > 0)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.discount') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($invoice->discount_amount, $invoice->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div style="font-weight: bold">
|
||||
<span>{{ __('shop::app.mail.order.grand-total') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($invoice->grand_total, $invoice->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
style="margin-top: 65px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.comment.dear', ['customer_name' => $comment->order->customer_full_name]) }},
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="line-height: 30px;margin-bottom: 20px !important;">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;font-style: italic;">
|
||||
{{ $comment->comment }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 20px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.comment.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.comment.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,238 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<span style="font-weight: bold;">
|
||||
{{ __('shop::app.mail.order.heading') }}
|
||||
</span> <br>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.dear', ['customer_name' => $order->customer_full_name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.order.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->increment_id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
|
||||
{{ __('shop::app.mail.order.summary') }}
|
||||
</div>
|
||||
|
||||
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||
@if ($order->shipping_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->postcode . " " . $order->shipping_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->shipping_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping') }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ $order->shipping_title }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($order->billing_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->postcode ." " . $order->billing_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->billing_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ __('shop::app.mail.order.payment') }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold; font-size: 16px; color: #242424; margin-bottom: 20px;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
|
||||
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
<div>{{ $additionalDetails['title'] }}</div>
|
||||
<div>{{ $additionalDetails['value'] }}</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($order->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">{{ $item->getTypeInstance()->getOrderedItem($item)->sku }}</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">{{ $item->qty_ordered }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;line-height: 30px;float: right;width: 40%;margin-top: 20px;">
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.subtotal') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->sub_total, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if ($order->shipping_address)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.shipping-handling') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@foreach (Webkul\Tax\Helpers\Tax::getTaxRatesWithAmount($order, false) as $taxRate => $taxAmount )
|
||||
<div>
|
||||
<span id="taxrate-{{ core()->taxRateAsIdentifier($taxRate) }}">{{ __('shop::app.mail.order.tax') }} {{ $taxRate }} %</span>
|
||||
<span id="taxamount-{{ core()->taxRateAsIdentifier($taxRate) }}" style="float: right;">
|
||||
{{ core()->formatPrice($taxAmount, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@if ($order->discount_amount > 0)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.discount') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div style="font-weight: bold">
|
||||
<span>{{ __('shop::app.mail.order.grand-total') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 65px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.final-summary') }}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,248 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php $order = $refund->order; ?>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<span style="font-weight: bold;">
|
||||
{{ __('shop::app.mail.refund.heading', ['order_id' => $order->increment_id, 'refund_id' => $refund->id]) }}
|
||||
</span> <br>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.dear', ['customer_name' => $order->customer_full_name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.order.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->increment_id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
|
||||
{{ __('shop::app.mail.refund.summary') }}
|
||||
</div>
|
||||
|
||||
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||
@if ($order->shipping_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->postcode . " " . $order->shipping_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->shipping_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping') }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ $order->shipping_title }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($order->billing_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->postcode . " " . $order->billing_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->billing_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ __('shop::app.mail.order.payment') }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px; color: #242424;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($refund->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">
|
||||
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->qty }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;line-height: 30px;float: right;width: 40%;margin-top: 20px;">
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.subtotal') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($refund->sub_total, $refund->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if ($order->shipping_address)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.shipping-handling') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($refund->shipping_amount, $refund->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($refund->tax_amount > 0)
|
||||
@foreach (Webkul\Tax\Helpers\Tax::getTaxRatesWithAmount($refund, false) as $taxRate => $taxAmount)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.tax') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($refund->tax_amount, $refund->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@if ($refund->discount_amount > 0)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.discount') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($refund->discount_amount, $refund->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($refund->adjustment_refund > 0)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.refund.adjustment-refund') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($refund->adjustment_refund, $refund->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($refund->adjustment_fee > 0)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.refund.adjustment-fee') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($refund->adjustment_fee, $refund->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div style="font-weight: bold">
|
||||
<span>{{ __('shop::app.mail.order.grand-total') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($refund->grand_total, $refund->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 65px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php $order = $shipment->order; ?>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<span style="font-weight: bold;">
|
||||
{{ __('shop::app.mail.shipment.heading', ['order_id' => $order->increment_id, 'shipment_id' => $shipment->id]) }}
|
||||
</span> <br>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.dear', ['customer_name' => $order->customer_full_name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.order.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->increment_id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
|
||||
{{ __('shop::app.mail.shipment.summary') }}
|
||||
</div>
|
||||
|
||||
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||
@if ($order->shipping_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->postcode . " " . $order->shipping_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->shipping_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.shipping') }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
<div style="font-weight: bold;">
|
||||
{{ $order->shipping_title }}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="font-weight: bold;">{{ __('shop::app.mail.shipment.carrier') }} : </span>{{ $shipment->carrier_title }}
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="font-weight: bold;">{{ __('shop::app.mail.shipment.tracking-number') }} : </span>{{ $shipment->track_number }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($order->billing_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->postcode . " " . $order->billing_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->billing_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold; font-size: 16px; color: #242424;">
|
||||
{{ __('shop::app.mail.order.payment') }}
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold; font-size: 16px; color: #242424;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($shipment->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">{{ $item->sku }}</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">{{ core()->formatPrice($item->price, $order->order_currency_code) }}</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">{{ $item->qty }}</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 20px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,232 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@if (core()->getConfigData('general.design.admin_logo.logo_image'))
|
||||
<img src="{{ \Illuminate\Support\Facades\Storage::url(core()->getConfigData('general.design.admin_logo.logo_image')) }}" alt="{{ config('app.name') }}" style="height: 40px; width: 110px;"/>
|
||||
@else
|
||||
<img src="{{ asset('vendor/webkul/ui/assets/images/logo.png') }}" alt="{{ config('app.name') }}"/>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<span style="font-weight: bold;">
|
||||
{{ __('shop::app.mail.order.cancel.heading') }}
|
||||
</span> <br>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.cancel.dear', ['customer_name' => config('mail.from.name')]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.order.cancel.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->increment_id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
|
||||
{{ __('shop::app.mail.order.cancel.summary') }}
|
||||
</div>
|
||||
|
||||
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||
@if ($order->shipping_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.cancel.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->postcode . " " . $order->shipping_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->shipping_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.cancel.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424; font-weight: bold">
|
||||
{{ __('shop::app.mail.order.cancel.shipping') }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
{{ $order->shipping_title }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($order->billing_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.cancel.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->postcode . " " . $order->billing_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->billing_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.cancel.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424; font-weight: bold">
|
||||
{{ __('shop::app.mail.order.cancel.payment') }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($order->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->child ? $item->child->sku : $item->sku }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">
|
||||
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->qty_canceled }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;line-height: 30px;float: right;width: 40%;margin-top: 20px;">
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.cancel.subtotal') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->sub_total, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.cancel.shipping-handling') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@foreach (Webkul\Tax\Helpers\Tax::getTaxRatesWithAmount($order, false) as $taxRate => $taxAmount )
|
||||
<div>
|
||||
<span id="taxrate-{{ core()->taxRateAsIdentifier($taxRate) }}">{{ __('shop::app.mail.order.cancel.tax') }} {{ $taxRate }} %</span>
|
||||
<span id="taxamount-{{ core()->taxRateAsIdentifier($taxRate) }}" style="float: right;">
|
||||
{{ core()->formatPrice($taxAmount, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@if ($order->discount_amount > 0)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.cancel.discount') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div style="font-weight: bold">
|
||||
<span>{{ __('shop::app.mail.order.cancel.grand-total') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 65px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.cancel.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.cancel.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,228 @@
|
|||
@component('shop::emails.layouts.master')
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ config('app.url') }}">
|
||||
@include ('shop::emails.layouts.logo')
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div style="padding: 30px;">
|
||||
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||
<span style="font-weight: bold;">
|
||||
{{ __('shop::app.mail.order.cancel.heading') }}
|
||||
</span> <br>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.cancel.dear', ['customer_name' => $order->customer_full_name]) }},
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!! __('shop::app.mail.order.cancel.greeting', [
|
||||
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->increment_id . '</a>',
|
||||
'created_at' => $order->created_at
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
|
||||
{{ __('shop::app.mail.order.cancel.summary') }}
|
||||
</div>
|
||||
|
||||
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||
@if ($order->shipping_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.cancel.shipping-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->name }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->postcode . " " . $order->shipping_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->shipping_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->shipping_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.cancel.contact') }} : {{ $order->shipping_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424; font-weight: bold">
|
||||
{{ __('shop::app.mail.order.cancel.shipping') }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;">
|
||||
{{ $order->shipping_title }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($order->billing_address)
|
||||
<div style="line-height: 25px;">
|
||||
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||
{{ __('shop::app.mail.order.cancel.billing-address') }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->company_name ?? '' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->address1 }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->postcode . " " . $order->billing_address->city }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ $order->billing_address->state }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ core()->country_name($order->billing_address->country) }}
|
||||
</div>
|
||||
|
||||
<div>---</div>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
{{ __('shop::app.mail.order.cancel.contact') }} : {{ $order->billing_address->phone }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424; font-weight: bold">
|
||||
{{ __('shop::app.mail.order.cancel.payment') }}
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="table mb-20">
|
||||
<table style="overflow-x: auto; border-collapse: collapse;
|
||||
border-spacing: 0;width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2">
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.SKU') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.product-name') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.price') }}</th>
|
||||
<th style="text-align: left;padding: 8px">{{ __('shop::app.customer.account.order.view.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($order->items as $item)
|
||||
<tr>
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.SKU') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->child ? $item->child->sku : $item->sku }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.product-name') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.price') }}" style="text-align: left;padding: 8px">
|
||||
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||
</td>
|
||||
|
||||
<td data-value="{{ __('shop::app.customer.account.order.view.qty') }}" style="text-align: left;padding: 8px">
|
||||
{{ $item->qty_canceled }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;color: #242424;line-height: 30px;float: right;width: 40%;margin-top: 20px;">
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.cancel.subtotal') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->sub_total, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.cancel.shipping-handling') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@foreach (Webkul\Tax\Helpers\Tax::getTaxRatesWithAmount($order, false) as $taxRate => $taxAmount )
|
||||
<div>
|
||||
<span id="taxrate-{{ core()->taxRateAsIdentifier($taxRate) }}">{{ __('shop::app.mail.order.cancel.tax') }} {{ $taxRate }} %</span>
|
||||
<span id="taxamount-{{ core()->taxRateAsIdentifier($taxRate) }}" style="float: right;">
|
||||
{{ core()->formatPrice($taxAmount, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@if ($order->discount_amount > 0)
|
||||
<div>
|
||||
<span>{{ __('shop::app.mail.order.cancel.discount') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->discount_amount, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div style="font-weight: bold">
|
||||
<span>{{ __('shop::app.mail.order.cancel.grand-total') }}</span>
|
||||
<span style="float: right;">
|
||||
{{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 65px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block">
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.cancel.final-summary') }}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{!!
|
||||
__('shop::app.mail.order.cancel.help', [
|
||||
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||
])
|
||||
!!}
|
||||
</p>
|
||||
|
||||
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||
{{ __('shop::app.mail.order.cancel.thanks') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
@extends('shop::layouts.master')
|
||||
@section('content-wrapper')
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
<div class="wrapper" style="display: flex; height: 100vh; width: 80vw;
|
||||
justify-content: space-between; align-items: center;">
|
||||
<div class="error-box">
|
||||
<div class="error-title">404</div>
|
||||
<div class="error-messgae">Page Not Found</div>
|
||||
<div class="error-description"></div>
|
||||
<a href="url()->to('/')">GO TO HOME</a>
|
||||
{{-- pass the content dynamically --}}
|
||||
Show the exception here or error message here.
|
||||
</div>
|
||||
|
||||
<div class="error-graphic" style="height: 236px; width: 255px; border: 1px solid red; background-image: url('.{{ asset('images.error') }}.')">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.error.401.page-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
|
||||
<div class="wrapper" style="display: flex; height: 60vh; width: 100%;
|
||||
justify-content: start; align-items: center;">
|
||||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E"> {{ __('admin::app.error.401.name') }} </div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E; margin-top: 40px;">
|
||||
{{ __('admin::app.error.401.title') }}
|
||||
</div>
|
||||
|
||||
<div class="error-description" style="margin-top: 20px;margin-bottom: 20px;color: #242424">
|
||||
{{ __('admin::app.error.401.message') }}
|
||||
</div>
|
||||
|
||||
<a href="{{ route('shop.home.index') }}">
|
||||
{{ __('admin::app.error.go-to-home') }}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="error-graphic icon-404" style="margin-left: 10% ;"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.error.403.page-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
|
||||
<div class="wrapper" style="display: flex; height: 60vh; width: 100%;
|
||||
justify-content: start; align-items: center;">
|
||||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E"> {{ __('admin::app.error.403.name') }} </div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E; margin-top: 40px">
|
||||
{{ __('admin::app.error.403.title') }}
|
||||
</div>
|
||||
|
||||
<div class="error-description" style="margin-top: 20px;margin-bottom: 20px;color: #242424">
|
||||
{{ __('admin::app.error.403.message') }}
|
||||
</div>
|
||||
|
||||
<a href="{{ route('shop.home.index') }}">
|
||||
{{ __('admin::app.error.go-to-home') }}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="error-graphic icon-404" style="margin-left: 10% ;"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.error.404.page-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
|
||||
<div class="wrapper" style="display: flex; height: 60vh; width: 100%;
|
||||
justify-content: start; align-items: center;">
|
||||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.404.name') }}
|
||||
</div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E; margin-top: 40px">
|
||||
{{ __('admin::app.error.404.title') }}
|
||||
</div>
|
||||
|
||||
<div class="error-description" style="margin-top: 20px;margin-bottom: 20px;color: #242424">
|
||||
{{ __('admin::app.error.404.message') }}
|
||||
</div>
|
||||
|
||||
<a href="{{ route('shop.home.index') }}">
|
||||
{{ __('admin::app.error.go-to-home') }}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="error-graphic icon-404" style="margin-left: 10% ;"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.error.500.page-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
|
||||
<div class="wrapper" style="display: flex; height: 60vh; width: 100%;
|
||||
justify-content: start; align-items: center;">
|
||||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.500.name') }}
|
||||
</div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E; margin-top: 40px">
|
||||
{{ __('admin::app.error.500.title') }}
|
||||
</div>
|
||||
|
||||
<div class="error-description" style="margin-top: 20px;margin-bottom: 20px;color: #242424">
|
||||
{{ __('admin::app.error.500.message') }}
|
||||
</div>
|
||||
|
||||
<a href="{{ route('shop.home.index') }}">
|
||||
{{ __('admin::app.error.go-to-home') }}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="error-graphic icon-404" style="margin-left: 10% ;"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="error-container" style="width: 100%; display: flex; justify-content: center;">
|
||||
|
||||
<div class="wrapper" style="display: flex; height: 60vh; width: 100%;
|
||||
justify-content: start; align-items: center;">
|
||||
|
||||
<div class="error-box" style="width: 50%">
|
||||
|
||||
<div class="error-title" style="font-size: 100px;color: #5E5E5E">
|
||||
{{ __('admin::app.error.in-maitainace') }}
|
||||
</div>
|
||||
|
||||
<div class="error-messgae" style="font-size: 24px;color: #5E5E5E">
|
||||
{{ core()->getCurrentChannel()->maintenance_mode_text ?: __('admin::app.error.right-back') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="error-graphic icon-404" style="margin-left: 10% ;"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,366 @@
|
|||
@php
|
||||
$attributeRepository = app('\Webkul\Attribute\Repositories\AttributeFamilyRepository');
|
||||
|
||||
$comparableAttributes = $attributeRepository->getComparableAttributesBelongsToFamily();
|
||||
|
||||
$locale = core()->getRequestedLocaleCode();
|
||||
|
||||
$attributeOptionTranslations = DB::table('attribute_option_translations')->where('locale', $locale)->get();
|
||||
@endphp
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="compare-product-template">
|
||||
<section class="comparison-component">
|
||||
<h1>
|
||||
{{ __('shop::app.customer.compare.compare_similar_items') }}
|
||||
</h1>
|
||||
|
||||
<button
|
||||
v-if="products.length > 0"
|
||||
class="btn btn-primary btn-md {{ core()->getCurrentLocale()->direction == 'rtl' ? 'pull-left' : 'pull-right' }}"
|
||||
@click="removeProductCompare('all')">
|
||||
{{ __('shop::app.customer.account.wishlist.deleteall') }}
|
||||
</button>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.compare.view.before') !!}
|
||||
|
||||
<table class="compare-products">
|
||||
<template v-if="isProductListLoaded && products.length > 0">
|
||||
@php
|
||||
$comparableAttributes = $comparableAttributes->toArray();
|
||||
|
||||
array_splice($comparableAttributes, 1, 0, [[
|
||||
'code' => 'product_image',
|
||||
'admin_name' => __('velocity::app.customer.compare.product_image'),
|
||||
]]);
|
||||
|
||||
array_splice($comparableAttributes, 2, 0, [[
|
||||
'code' => 'addToCartHtml',
|
||||
'admin_name' => __('velocity::app.customer.compare.actions'),
|
||||
]]);
|
||||
@endphp
|
||||
|
||||
@foreach ($comparableAttributes as $attribute)
|
||||
<tr>
|
||||
<td>
|
||||
<h4 class="fs16">{{ $attribute['admin_name'] }}</h4>
|
||||
</td>
|
||||
|
||||
<td :key="`title-${index}`" v-for="(product, index) in products">
|
||||
@switch ($attribute['code'])
|
||||
@case('name')
|
||||
<a :href="`${baseUrl}/${product.url_key}`" class="unset remove-decoration active-hover">
|
||||
<h5 class="fw6 fs18 mt-0" v-text="product['{{ $attribute['code'] }}']"></h5>
|
||||
</a>
|
||||
@break
|
||||
|
||||
@case('product_image')
|
||||
<a :href="`${baseUrl}/${product.url_key}`" class="unset">
|
||||
<img
|
||||
class="image-wrapper"
|
||||
:src="product['{{ $attribute['code'] }}']"
|
||||
:onerror="`this.src='${baseUrl}/vendor/webkul/ui/assets/images/product/large-product-placeholder.png'`" alt="" />
|
||||
</a>
|
||||
@break
|
||||
|
||||
@case('price')
|
||||
<span v-html="product['priceHTML']"></span>
|
||||
@break
|
||||
|
||||
@case('addToCartHtml')
|
||||
<div class="action">
|
||||
<div>
|
||||
<span class="d-inline-block">
|
||||
<form :action="`${baseUrl}/checkout/cart/add/${product.product_id}`" method="POST">
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="product_id" :value="product.product_id">
|
||||
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
|
||||
<span v-html="product.addToCartHtml"></span>
|
||||
</form>
|
||||
</span>
|
||||
|
||||
<span class="icon white-cross-sm-icon remove-product" @click="removeProductCompare(product.id)"></span>
|
||||
</div>
|
||||
</div>
|
||||
@break
|
||||
|
||||
@case('color')
|
||||
<span v-html="product.color_label" class="fs16"></span>
|
||||
@break
|
||||
|
||||
@case('size')
|
||||
<span v-html="product.size_label" class="fs16"></span>
|
||||
@break
|
||||
|
||||
@case('description')
|
||||
<span v-html="product.description" class="desc"></span>
|
||||
@break
|
||||
|
||||
@default
|
||||
@switch ($attribute['type'])
|
||||
@case('boolean')
|
||||
<span
|
||||
v-text="product.product['{{ $attribute['code'] }}']
|
||||
? '{{ __('velocity::app.shop.general.yes') }}'
|
||||
: '{{ __('velocity::app.shop.general.no') }}'"
|
||||
></span>
|
||||
@break;
|
||||
|
||||
@case('checkbox')
|
||||
<span v-if="product.product['{{ $attribute['code'] }}']" v-html="getAttributeOptions(product['{{ $attribute['code'] }}'] ? product : product.product['{{ $attribute['code'] }}'] ? product.product : null, '{{ $attribute['code'] }}', 'multiple')" class="fs16"></span>
|
||||
<span v-else class="fs16">__</span>
|
||||
@break;
|
||||
|
||||
@case('select')
|
||||
<span v-if="product.product['{{ $attribute['code'] }}']" v-html="getAttributeOptions(product['{{ $attribute['code'] }}'] ? product : product.product['{{ $attribute['code'] }}'] ? product.product : null, '{{ $attribute['code'] }}', 'single')" class="fs16"></span>
|
||||
<span v-else class="fs16">__</span>
|
||||
@break;
|
||||
|
||||
@case('multiselect')
|
||||
<span v-if="product.product['{{ $attribute['code'] }}']" v-html="getAttributeOptions(product['{{ $attribute['code'] }}'] ? product : product.product['{{ $attribute['code'] }}'] ? product.product : null, '{{ $attribute['code'] }}', 'multiple')" class="fs16"></span>
|
||||
<span v-else class="fs16">__</span>
|
||||
@break
|
||||
|
||||
@case ('file')
|
||||
@case ('image')
|
||||
<a :href="`${baseUrl}/${product.url_key}`" class="unset">
|
||||
<img
|
||||
class="image-wrapper"
|
||||
:src="storageUrl + product.product['{{ $attribute['code'] }}']"
|
||||
:onerror="`this.src='${baseUrl}/vendor/webkul/ui/assets/images/product/large-product-placeholder.png'`" alt="" />
|
||||
</a>
|
||||
@break;
|
||||
@default
|
||||
<span v-html="product['{{ $attribute['code'] }}'] ? product['{{ $attribute['code'] }}'] : product.product['{{ $attribute['code'] }}'] ? product.product['{{ $attribute['code'] }}'] : '__'" class="fs16"></span>
|
||||
@break;
|
||||
@endswitch
|
||||
|
||||
@break
|
||||
|
||||
@endswitch
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</template>
|
||||
|
||||
<span v-else-if="isProductListLoaded && products.length == 0">
|
||||
{{ __('shop::app.customer.compare.empty-text') }}
|
||||
</span>
|
||||
</table>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.compare.view.after') !!}
|
||||
</section>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('compare-product', {
|
||||
template: '#compare-product-template',
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
'products': [],
|
||||
'baseUrl': '{{ url()->to('/') }}',
|
||||
'storageUrl': '{{ Storage::url('/') }}',
|
||||
'isCustomer': '{{ auth()->guard('customer')->user() ? "true" : "false" }}' == 'true',
|
||||
'isProductListLoaded': false,
|
||||
'attributeOptions': @json($attributeOptionTranslations),
|
||||
};
|
||||
},
|
||||
|
||||
mounted: function () {
|
||||
this.getComparedProducts();
|
||||
},
|
||||
|
||||
methods: {
|
||||
'getComparedProducts': function () {
|
||||
let items = '';
|
||||
let url = `${this.baseUrl}/${this.isCustomer ? 'comparison' : 'detailed-products'}`;
|
||||
|
||||
let data = {
|
||||
params: {'data': true}
|
||||
}
|
||||
|
||||
if (! this.isCustomer) {
|
||||
items = this.getStorageValue('compared_product');
|
||||
items = items ? items.join('&') : '';
|
||||
|
||||
data = {
|
||||
params: {
|
||||
items
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (this.isCustomer || (! this.isCustomer && items != "")) {
|
||||
this.$http.get(url, data)
|
||||
.then(response => {
|
||||
this.isProductListLoaded = true;
|
||||
|
||||
if (response.data.products.length > 2) {
|
||||
$('.comparison-component').css('overflow-x', 'scroll');
|
||||
}
|
||||
|
||||
this.products = response.data.products;
|
||||
})
|
||||
.catch(error => {
|
||||
this.isProductListLoaded = true;
|
||||
console.log("{{ __('shop::app.common.error') }}");
|
||||
});
|
||||
} else {
|
||||
this.isProductListLoaded = true;
|
||||
}
|
||||
},
|
||||
|
||||
'removeProductCompare': function (productId) {
|
||||
if (productId == 'all' && ! confirm('{{ __('shop::app.customer.compare.confirm-remove-all') }}')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.isCustomer) {
|
||||
this.$http.delete(`${this.baseUrl}/comparison?productId=${productId}`)
|
||||
.then(response => {
|
||||
if (productId == 'all') {
|
||||
this.$set(this, 'products', this.products.filter(product => false));
|
||||
} else {
|
||||
this.$set(this, 'products', this.products.filter(product => product.id != productId));
|
||||
}
|
||||
|
||||
window.flashMessages = [{'type': 'alert-success', 'message': response.data.message }];
|
||||
|
||||
this.updateCompareCount();
|
||||
|
||||
this.$root.addFlashMessages();
|
||||
})
|
||||
.catch(error => {
|
||||
console.log("{{ __('shop::app.common.error') }}");
|
||||
});
|
||||
} else {
|
||||
let existingItems = this.getStorageValue('compared_product');
|
||||
|
||||
if (productId == "all") {
|
||||
updatedItems = [];
|
||||
this.$set(this, 'products', []);
|
||||
window.flashMessages = [{'type': 'alert-success', 'message': '{{ __('shop::app.customer.compare.removed-all') }}' }];
|
||||
} else {
|
||||
updatedItems = existingItems.filter(item => item != productId);
|
||||
this.$set(this, 'products', this.products.filter(product => product.id != productId));
|
||||
window.flashMessages = [{'type': 'alert-success', 'message': '{{ __('shop::app.customer.compare.removed') }}' }];
|
||||
}
|
||||
|
||||
this.setStorageValue('compared_product', updatedItems);
|
||||
|
||||
this.$root.addFlashMessages();
|
||||
}
|
||||
|
||||
this.updateCompareCount();
|
||||
},
|
||||
|
||||
'getDynamicHTML': function (input) {
|
||||
var _staticRenderFns;
|
||||
const { render, staticRenderFns } = Vue.compile(input);
|
||||
|
||||
if (this.$options.staticRenderFns.length > 0) {
|
||||
_staticRenderFns = this.$options.staticRenderFns;
|
||||
} else {
|
||||
_staticRenderFns = this.$options.staticRenderFns = staticRenderFns;
|
||||
}
|
||||
|
||||
try {
|
||||
var output = render.call(this, this.$createElement);
|
||||
} catch (exception) {
|
||||
console.log(this.__('error.something_went_wrong'));
|
||||
}
|
||||
|
||||
this.$options.staticRenderFns = _staticRenderFns;
|
||||
|
||||
return output;
|
||||
},
|
||||
|
||||
'isMobile': function () {
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
|
||||
'getStorageValue': function (key) {
|
||||
let value = window.localStorage.getItem(key);
|
||||
|
||||
if (value) {
|
||||
value = JSON.parse(value);
|
||||
}
|
||||
|
||||
return value;
|
||||
},
|
||||
|
||||
'setStorageValue': function (key, value) {
|
||||
window.localStorage.setItem(key, JSON.stringify(value));
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
'getAttributeOptions': function (productDetails, attributeValues, type) {
|
||||
var attributeOptions = '__';
|
||||
|
||||
if (productDetails && attributeValues) {
|
||||
var attributeItems;
|
||||
|
||||
if (type == "multiple") {
|
||||
attributeItems = productDetails[attributeValues].split(',');
|
||||
} else if (type == "single") {
|
||||
attributeItems = productDetails[attributeValues];
|
||||
}
|
||||
|
||||
attributeOptions = this.attributeOptions.filter(option => {
|
||||
if (type == "multiple") {
|
||||
if (attributeItems.indexOf(option.attribute_option_id.toString()) > -1) {
|
||||
return true;
|
||||
}
|
||||
} else if (type == "single") {
|
||||
if (attributeItems == option.attribute_option_id.toString()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
attributeOptions = attributeOptions.map(option => {
|
||||
return option.label;
|
||||
});
|
||||
|
||||
attributeOptions = attributeOptions.join(', ');
|
||||
}
|
||||
|
||||
return attributeOptions;
|
||||
},
|
||||
|
||||
'updateCompareCount': function () {
|
||||
if (this.isCustomer == "true" || this.isCustomer == true) {
|
||||
this.$http.get(`${this.baseUrl}/items-count`)
|
||||
.then(response => {
|
||||
$('#compare-items-count').html(response.data.compareProductsCount);
|
||||
})
|
||||
.catch(exception => {
|
||||
window.flashMessages = [{
|
||||
'type': `alert-error`,
|
||||
'message': "{{ __('shop::app.common.error') }}"
|
||||
}];
|
||||
|
||||
this.$root.addFlashMessages();
|
||||
});
|
||||
} else {
|
||||
let comparedItems = JSON.parse(localStorage.getItem('compared_product'));
|
||||
comparedItemsCount = comparedItems ? comparedItems.length : 0;
|
||||
|
||||
$('#compare-items-count').html(comparedItemsCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@include('shop::guest.compare.compare-products')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.customer.compare.compare_similar_items') }}
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
<compare-product></compare-product>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<script>
|
||||
window.location.href = window.location.href.replace('/guest-wishlist', '');
|
||||
</script>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
@if (count(app('Webkul\Product\Repositories\ProductRepository')->getFeaturedProducts()))
|
||||
<section class="featured-products">
|
||||
|
||||
<div class="featured-heading">
|
||||
{{ __('shop::app.home.featured-products') }}<br/>
|
||||
|
||||
<span class="featured-seperator" style="color: #d7dfe2;">_____</span>
|
||||
</div>
|
||||
|
||||
<div class="featured-grid product-grid-4">
|
||||
|
||||
@foreach (app('Webkul\Product\Repositories\ProductRepository')->getFeaturedProducts() as $productFlat)
|
||||
|
||||
@if (core()->getConfigData('catalog.products.homepage.out_of_stock_items'))
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
@else
|
||||
@if ($productFlat->isSaleable())
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
@endif
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@php
|
||||
$channel = core()->getCurrentChannel();
|
||||
|
||||
$homeSEO = $channel->home_seo;
|
||||
|
||||
if (isset($homeSEO)) {
|
||||
$homeSEO = json_decode($channel->home_seo);
|
||||
|
||||
$metaTitle = $homeSEO->meta_title;
|
||||
|
||||
$metaDescription = $homeSEO->meta_description;
|
||||
|
||||
$metaKeywords = $homeSEO->meta_keywords;
|
||||
}
|
||||
@endphp
|
||||
|
||||
@section('page_title')
|
||||
{{ isset($metaTitle) ? $metaTitle : "" }}
|
||||
@endsection
|
||||
|
||||
@section('head')
|
||||
|
||||
@if (isset($homeSEO))
|
||||
@isset($metaTitle)
|
||||
<meta name="title" content="{{ $metaTitle }}" />
|
||||
@endisset
|
||||
|
||||
@isset($metaDescription)
|
||||
<meta name="description" content="{{ $metaDescription }}" />
|
||||
@endisset
|
||||
|
||||
@isset($metaKeywords)
|
||||
<meta name="keywords" content="{{ $metaKeywords }}" />
|
||||
@endisset
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
{!! view_render_event('bagisto.shop.home.content.before') !!}
|
||||
|
||||
@if (! is_null($channel->home_page_content))
|
||||
{!! DbView::make($channel)->field('home_page_content')->with(['sliderData' => $sliderData])->render() !!}
|
||||
@else
|
||||
@include('shop::home.slider', ['sliderData' => $sliderData])
|
||||
@include('shop::home.featured-products')
|
||||
@include('shop::home.new-products')
|
||||
@endif
|
||||
|
||||
{{ view_render_event('bagisto.shop.home.content.after') }}
|
||||
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
@if (count(app('Webkul\Product\Repositories\ProductRepository')->getNewProducts()))
|
||||
<section class="featured-products">
|
||||
|
||||
<div class="featured-heading">
|
||||
{{ __('shop::app.home.new-products') }}<br/>
|
||||
|
||||
<span class="featured-seperator" style="color: #d7dfe2;">_____</span>
|
||||
</div>
|
||||
|
||||
<div class="product-grid-4">
|
||||
|
||||
@foreach (app('Webkul\Product\Repositories\ProductRepository')->getNewProducts() as $productFlat)
|
||||
|
||||
@if (core()->getConfigData('catalog.products.homepage.out_of_stock_items'))
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
@else
|
||||
@if ($productFlat->isSaleable())
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
@endif
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<section class="news-update">
|
||||
<div class="news-update-grid">
|
||||
<div class="block1">
|
||||
<img src="vendor/webkul/shop/assets/images/1.png" alt="" />
|
||||
</div>
|
||||
<div class="block2">
|
||||
<div class="sub-block1">
|
||||
<img src="vendor/webkul/shop/assets/images/2.png" alt="" />
|
||||
</div>
|
||||
<div class="sub-block2">
|
||||
<img src="vendor/webkul/shop/assets/images/3.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@if (count($sliderData))
|
||||
<section class="slider-block">
|
||||
<image-slider :slides='@json($sliderData)' public_path="{{ url()->to('/') }}"></image-slider>
|
||||
</section>
|
||||
@endif
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
@inject('rateHelper' , 'Webkul\Shipping\Helper\Rate')
|
||||
<div>
|
||||
@foreach ($rateHelper->collectRates() as $key=>$count)
|
||||
<div class="shipping-method">
|
||||
<input type="radio" name="price"> ${{ core()->currency($count) }} <span> {{ $key }} </span>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<style>
|
||||
span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<div class="footer">
|
||||
<div class="footer-content">
|
||||
<div class="footer-list-container">
|
||||
|
||||
<?php
|
||||
$categories = [];
|
||||
|
||||
foreach (app('Webkul\Category\Repositories\CategoryRepository')->getVisibleCategoryTree(core()->getCurrentChannel()->root_category_id) as $category){
|
||||
if ($category->slug)
|
||||
array_push($categories, $category);
|
||||
}
|
||||
?>
|
||||
|
||||
@if (count($categories))
|
||||
<div class="list-container">
|
||||
<span class="list-heading">Categories</span>
|
||||
|
||||
<ul class="list-group">
|
||||
@foreach ($categories as $key => $category)
|
||||
<li>
|
||||
<a href="{{ route('shop.productOrCategory.index', $category->slug) }}">{{ $category->name }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! DbView::make(core()->getCurrentChannel())->field('footer_content')->render() !!}
|
||||
|
||||
<div class="list-container">
|
||||
@if(core()->getConfigData('customer.settings.newsletter.subscription'))
|
||||
<label class="list-heading" for="subscribe-field">{{ __('shop::app.footer.subscribe-newsletter') }}</label>
|
||||
<div class="form-container">
|
||||
<form action="{{ route('shop.subscribe') }}">
|
||||
<div class="control-group" :class="[errors.has('subscriber_email') ? 'has-error' : '']">
|
||||
<input type="email" id="subscribe-field" class="control subscribe-field" name="subscriber_email" placeholder="Email Address" required><br/>
|
||||
|
||||
<button class="btn btn-md btn-primary">{{ __('shop::app.subscription.subscribe') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<?php
|
||||
$term = request()->input('term');
|
||||
|
||||
if (! is_null($term)) {
|
||||
$serachQuery = 'term='.request()->input('term');
|
||||
}
|
||||
?>
|
||||
|
||||
<label class="list-heading" for="locale-switcher">{{ __('shop::app.footer.locale') }}</label>
|
||||
<div class="form-container">
|
||||
<div class="control-group">
|
||||
<select class="control locale-switcher" id="locale-switcher" onchange="window.location.href = this.value" @if (count(core()->getCurrentChannel()->locales) == 1) disabled="disabled" @endif>
|
||||
|
||||
@foreach (core()->getCurrentChannel()->locales()->orderBy('name')->get() as $locale)
|
||||
<option value="?locale={{ $locale->code }}" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}>{{ $locale->name }}</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="currency">
|
||||
<label class="list-heading" for="currency-switcher">{{ __('shop::app.footer.currency') }}</label>
|
||||
<div class="form-container">
|
||||
<div class="control-group">
|
||||
<select class="control locale-switcher" id="currency-switcher" onchange="window.location.href = this.value">
|
||||
|
||||
@foreach (core()->getCurrentChannel()->currencies as $currency)
|
||||
<option value="?currency={{ $currency->code }}" {{ $currency->code == core()->getCurrentCurrencyCode() ? 'selected' : '' }}>{{ $currency->code }}</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,427 @@
|
|||
<?php
|
||||
$term = request()->input('term');
|
||||
$image_search = request()->input('image-search');
|
||||
|
||||
if (! is_null($term)) {
|
||||
$serachQuery = 'term='.request()->input('term');
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="header" id="header">
|
||||
<div class="header-top">
|
||||
<div class="left-content">
|
||||
<ul class="logo-container">
|
||||
<li>
|
||||
<a href="{{ route('shop.home.index') }}" aria-label="Logo">
|
||||
@if ($logo = core()->getCurrentChannel()->logo_url)
|
||||
<img class="logo" src="{{ $logo }}" alt="" />
|
||||
@else
|
||||
<img class="logo" src="{{ bagisto_asset('images/logo.svg') }}" alt="" />
|
||||
@endif
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="search-container">
|
||||
<li class="search-group">
|
||||
<form role="search" action="{{ route('shop.search.index') }}" method="GET" style="display: inherit;">
|
||||
<label for="search-bar" style="position: absolute; z-index: -1;">Search</label>
|
||||
<input
|
||||
required
|
||||
name="term"
|
||||
type="search"
|
||||
value="{{ ! $image_search ? $term : '' }}"
|
||||
class="search-field"
|
||||
id="search-bar"
|
||||
placeholder="{{ __('shop::app.header.search-text') }}"
|
||||
>
|
||||
|
||||
<image-search-component></image-search-component>
|
||||
|
||||
<div class="search-icon-wrapper">
|
||||
|
||||
<button class="" class="background: none;" aria-label="Search">
|
||||
<i class="icon icon-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="right-content">
|
||||
|
||||
<span class="search-box"><span class="icon icon-search" id="search"></span></span>
|
||||
|
||||
<ul class="right-content-menu">
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.comppare-item.before') !!}
|
||||
|
||||
@php
|
||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false
|
||||
@endphp
|
||||
|
||||
@php
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.compare-item.after') !!}
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.currency-item.before') !!}
|
||||
|
||||
@if (core()->getCurrentChannel()->currencies->count() > 1)
|
||||
<li class="currency-switcher">
|
||||
<span class="dropdown-toggle">
|
||||
{{ core()->getCurrentCurrencyCode() }}
|
||||
|
||||
<i class="icon arrow-down-icon"></i>
|
||||
</span>
|
||||
|
||||
<ul class="dropdown-list currency">
|
||||
@foreach (core()->getCurrentChannel()->currencies as $currency)
|
||||
<li>
|
||||
@if (isset($serachQuery))
|
||||
<a href="?{{ $serachQuery }}¤cy={{ $currency->code }}">{{ $currency->code }}</a>
|
||||
@else
|
||||
<a href="?currency={{ $currency->code }}">{{ $currency->code }}</a>
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.currency-item.after') !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.account-item.before') !!}
|
||||
|
||||
<li>
|
||||
<span class="dropdown-toggle">
|
||||
<i class="icon account-icon"></i>
|
||||
|
||||
<span class="name">{{ __('shop::app.header.account') }}</span>
|
||||
|
||||
<i class="icon arrow-down-icon"></i>
|
||||
</span>
|
||||
|
||||
@guest('customer')
|
||||
<ul class="dropdown-list account guest">
|
||||
<li>
|
||||
<div>
|
||||
<label style="color: #9e9e9e; font-weight: 700; text-transform: uppercase; font-size: 15px;">
|
||||
{{ __('shop::app.header.title') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 5px;">
|
||||
<span style="font-size: 12px;">{{ __('shop::app.header.dropdown-text') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="button-group">
|
||||
<a class="btn btn-primary btn-md" href="{{ route('customer.session.index') }}" style="color: #ffffff">
|
||||
{{ __('shop::app.header.sign-in') }}
|
||||
</a>
|
||||
|
||||
<a class="btn btn-primary btn-md" href="{{ route('customer.register.index') }}" style="float: right; color: #ffffff">
|
||||
{{ __('shop::app.header.sign-up') }}
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<hr>
|
||||
|
||||
@if ($showWishlist)
|
||||
<li>
|
||||
<a href="{{ route('customer.wishlist.index') }}">
|
||||
{{ __('shop::app.header.wishlist') }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($showCompare)
|
||||
<li>
|
||||
<a href="{{ route('velocity.product.compare') }}">
|
||||
{{ __('shop::app.customer.compare.text') }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
@endguest
|
||||
|
||||
@auth('customer')
|
||||
<ul class="dropdown-list account customer">
|
||||
<li>
|
||||
<div>
|
||||
<label style="color: #9e9e9e; font-weight: 700; text-transform: uppercase; font-size: 15px;">
|
||||
{{ auth()->guard('customer')->user()->first_name }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('customer.profile.index') }}">{{ __('shop::app.header.profile') }}</a>
|
||||
</li>
|
||||
|
||||
@if ($showWishlist)
|
||||
<li>
|
||||
<a href="{{ route('customer.wishlist.index') }}">
|
||||
{{ __('shop::app.header.wishlist') }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($showCompare)
|
||||
<li>
|
||||
<a href="{{ route('velocity.customer.product.compare') }}">
|
||||
{{ __('shop::app.customer.compare.text') }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li>
|
||||
<form id="customerLogout" action="{{ route('customer.session.destroy') }}" method="POST">
|
||||
@csrf
|
||||
|
||||
@method('DELETE')
|
||||
</form>
|
||||
|
||||
<a
|
||||
href="{{ route('customer.session.destroy') }}"
|
||||
onclick="event.preventDefault(); document.getElementById('customerLogout').submit();">
|
||||
{{ __('shop::app.header.logout') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@endauth
|
||||
</li>
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.account-item.after') !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.cart-item.before') !!}
|
||||
|
||||
<li class="cart-dropdown-container">
|
||||
|
||||
@include('shop::checkout.cart.mini-cart')
|
||||
|
||||
</li>
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.cart-item.after') !!}
|
||||
|
||||
</ul>
|
||||
|
||||
<span class="menu-box" ><span class="icon icon-menu" id="hammenu"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header-bottom" id="header-bottom">
|
||||
@include('shop::layouts.header.nav-menu.navmenu')
|
||||
</div>
|
||||
|
||||
<div class="search-responsive mt-10" id="search-responsive">
|
||||
<form role="search" action="{{ route('shop.search.index') }}" method="GET" style="display: inherit;">
|
||||
<div class="search-content">
|
||||
<button style="background: none; border: none; padding: 0px;">
|
||||
<i class="icon icon-search"></i>
|
||||
</button>
|
||||
|
||||
<image-search-component></image-search-component>
|
||||
|
||||
<input type="search" name="term" class="search">
|
||||
<i class="icon icon-menu-back right"></i>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/mobilenet" defer></script>
|
||||
|
||||
<script type="text/x-template" id="image-search-component-template">
|
||||
<div v-if="image_search_status">
|
||||
<label class="image-search-container" :for="'image-search-container-' + _uid">
|
||||
<i class="icon camera-icon"></i>
|
||||
|
||||
<input type="file" :id="'image-search-container-' + _uid" ref="image_search_input" v-on:change="uploadImage()"/>
|
||||
|
||||
<img :id="'uploaded-image-url-' + + _uid" :src="uploaded_image_url" alt="" width="20" height="20" style="display:none" />
|
||||
</label>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
Vue.component('image-search-component', {
|
||||
|
||||
template: '#image-search-component-template',
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
uploaded_image_url: '',
|
||||
image_search_status: "{{core()->getConfigData('general.content.shop.image_search') == '1' ? 'true' : 'false'}}" == 'true'
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
uploadImage: function() {
|
||||
var imageInput = this.$refs.image_search_input;
|
||||
|
||||
if (imageInput.files && imageInput.files[0]) {
|
||||
if (imageInput.files[0].type.includes('image/')) {
|
||||
var self = this;
|
||||
|
||||
if (imageInput.files[0].size <= 2000000) {
|
||||
self.$root.showLoader();
|
||||
|
||||
var formData = new FormData();
|
||||
|
||||
formData.append('image', imageInput.files[0]);
|
||||
|
||||
axios.post("{{ route('shop.image.search.upload') }}", formData, {headers: {'Content-Type': 'multipart/form-data'}})
|
||||
.then(function(response) {
|
||||
self.uploaded_image_url = response.data;
|
||||
|
||||
var net;
|
||||
|
||||
async function app() {
|
||||
var analysedResult = [];
|
||||
|
||||
var queryString = '';
|
||||
|
||||
net = await mobilenet.load();
|
||||
|
||||
const imgElement = document.getElementById('uploaded-image-url-' + + self._uid);
|
||||
|
||||
try {
|
||||
const result = await net.classify(imgElement);
|
||||
|
||||
result.forEach(function(value) {
|
||||
queryString = value.className.split(',');
|
||||
|
||||
if (queryString.length > 1) {
|
||||
analysedResult = analysedResult.concat(queryString)
|
||||
} else {
|
||||
analysedResult.push(queryString[0])
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
self.$root.hideLoader();
|
||||
|
||||
window.flashMessages = [
|
||||
{
|
||||
'type': 'alert-error',
|
||||
'message': "{{ __('shop::app.common.error') }}"
|
||||
}
|
||||
];
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
};
|
||||
|
||||
localStorage.searched_image_url = self.uploaded_image_url;
|
||||
|
||||
queryString = localStorage.searched_terms = analysedResult.join('_');
|
||||
|
||||
self.$root.hideLoader();
|
||||
|
||||
window.location.href = "{{ route('shop.search.index') }}" + '?term=' + queryString + '&image-search=1';
|
||||
}
|
||||
|
||||
app();
|
||||
})
|
||||
.catch(function(error) {
|
||||
self.$root.hideLoader();
|
||||
|
||||
window.flashMessages = [
|
||||
{
|
||||
'type': 'alert-error',
|
||||
'message': "{{ __('shop::app.common.error') }}"
|
||||
}
|
||||
];
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
});
|
||||
} else {
|
||||
|
||||
imageInput.value = '';
|
||||
|
||||
window.flashMessages = [
|
||||
{
|
||||
'type': 'alert-error',
|
||||
'message': "{{ __('shop::app.common.image-upload-limit') }}"
|
||||
}
|
||||
];
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
|
||||
}
|
||||
} else {
|
||||
imageInput.value = '';
|
||||
|
||||
alert('Only images (.jpeg, .jpg, .png, ..) are allowed.');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('body').delegate('#search, .icon-menu-close, .icon.icon-menu', 'click', function(e) {
|
||||
toggleDropdown(e);
|
||||
});
|
||||
|
||||
@auth('customer')
|
||||
@php
|
||||
$compareCount = app('Webkul\Velocity\Repositories\VelocityCustomerCompareProductRepository')
|
||||
->count([
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
]);
|
||||
@endphp
|
||||
|
||||
let comparedItems = JSON.parse(localStorage.getItem('compared_product'));
|
||||
$('#compare-items-count').html({{ $compareCount }});
|
||||
@endauth
|
||||
|
||||
@guest('customer')
|
||||
let comparedItems = JSON.parse(localStorage.getItem('compared_product'));
|
||||
$('#compare-items-count').html(comparedItems ? comparedItems.length : 0);
|
||||
@endguest
|
||||
|
||||
function toggleDropdown(e) {
|
||||
var currentElement = $(e.currentTarget);
|
||||
|
||||
if (currentElement.hasClass('icon-search')) {
|
||||
currentElement.removeClass('icon-search');
|
||||
currentElement.addClass('icon-menu-close');
|
||||
$('#hammenu').removeClass('icon-menu-close');
|
||||
$('#hammenu').addClass('icon-menu');
|
||||
$("#search-responsive").css("display", "block");
|
||||
$("#header-bottom").css("display", "none");
|
||||
} else if (currentElement.hasClass('icon-menu')) {
|
||||
currentElement.removeClass('icon-menu');
|
||||
currentElement.addClass('icon-menu-close');
|
||||
$('#search').removeClass('icon-menu-close');
|
||||
$('#search').addClass('icon-search');
|
||||
$("#search-responsive").css("display", "none");
|
||||
$("#header-bottom").css("display", "block");
|
||||
} else {
|
||||
currentElement.removeClass('icon-menu-close');
|
||||
$("#search-responsive").css("display", "none");
|
||||
$("#header-bottom").css("display", "none");
|
||||
if (currentElement.attr("id") == 'search') {
|
||||
currentElement.addClass('icon-search');
|
||||
} else {
|
||||
currentElement.addClass('icon-menu');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
{!! view_render_event('bagisto.shop.layout.header.category.before') !!}
|
||||
|
||||
<?php
|
||||
$categories = [];
|
||||
foreach (app('Webkul\Category\Repositories\CategoryRepository')->getVisibleCategoryTree(core()->getCurrentChannel()->root_category_id) as $category) {
|
||||
if ($category->slug) {
|
||||
array_push($categories, $category);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<category-nav categories='@json($categories)' url="{{url()->to('/')}}"></category-nav>
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.category.after') !!}
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script type="text/x-template" id="category-nav-template">
|
||||
|
||||
<ul class="nav">
|
||||
<category-item
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
:url="url"
|
||||
:item="item"
|
||||
:parent="index">
|
||||
</category-item>
|
||||
</ul>
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('category-nav', {
|
||||
template: '#category-nav-template',
|
||||
props: {
|
||||
categories: {
|
||||
type: [Array, String, Object],
|
||||
required: false,
|
||||
default: (function () {
|
||||
return [];
|
||||
})
|
||||
},
|
||||
url: String
|
||||
},
|
||||
data: function(){
|
||||
return {
|
||||
items_count:0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
items: function() {
|
||||
return JSON.parse(this.categories)
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/x-template" id="category-item-template">
|
||||
<li>
|
||||
<a :href="url+'/'+this.item['translations'][0].url_path">
|
||||
@{{ name }} 
|
||||
<i class="icon dropdown-right-icon" v-if="haveChildren && item.parent_id != null"></i>
|
||||
</a>
|
||||
|
||||
<i :class="[show ? 'icon icon-arrow-down mt-15' : 'icon dropdown-right-icon left mt-15']"
|
||||
v-if="haveChildren" @click="showOrHide"></i>
|
||||
|
||||
<ul v-if="haveChildren && show">
|
||||
<category-item
|
||||
v-for="(child, index) in item.children"
|
||||
:key="index"
|
||||
:url="url"
|
||||
:item="child">
|
||||
</category-item>
|
||||
</ul>
|
||||
</li>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('category-item', {
|
||||
template: '#category-item-template',
|
||||
props: {
|
||||
item: Object,
|
||||
url: String,
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
items_count:0,
|
||||
show: false,
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
if(window.innerWidth > 770){
|
||||
this.show = true;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
haveChildren: function() {
|
||||
return this.item.children.length ? true : false;
|
||||
},
|
||||
name: function() {
|
||||
if (this.item.translations && this.item.translations.length) {
|
||||
this.item.translations.forEach(function(translation) {
|
||||
if (translation.locale == document.documentElement.lang)
|
||||
return translation.name;
|
||||
});
|
||||
}
|
||||
return this.item.name;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showOrHide: function() {
|
||||
this.show = !this.show;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
|
||||
<title>@yield('page_title')</title>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="base-url" content="{{ url()->to('/') }}">
|
||||
<meta http-equiv="content-language" content="{{ app()->getLocale() }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/webkul/ui/assets/css/ui.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ bagisto_asset('css/shop.css') }}">
|
||||
|
||||
@if ($favicon = core()->getCurrentChannel()->favicon_url)
|
||||
<link rel="icon" sizes="16x16" href="{{ $favicon }}" />
|
||||
@else
|
||||
<link rel="icon" sizes="16x16" href="{{ bagisto_asset('images/favicon.ico') }}" />
|
||||
@endif
|
||||
|
||||
@yield('head')
|
||||
|
||||
@section('seo')
|
||||
@if (! request()->is('/'))
|
||||
<meta name="description" content="{{ core()->getCurrentChannel()->description }}"/>
|
||||
@endif
|
||||
@show
|
||||
|
||||
@stack('css')
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.head') !!}
|
||||
|
||||
<style>
|
||||
{!! core()->getConfigData('general.content.custom_scripts.custom_css') !!}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body @if (core()->getCurrentLocale() && core()->getCurrentLocale()->direction == 'rtl') class="rtl" @endif style="scroll-behavior: smooth;">
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.body.before') !!}
|
||||
|
||||
<div id="app">
|
||||
<flash-wrapper ref='flashes'></flash-wrapper>
|
||||
|
||||
<div class="main-container-wrapper">
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.before') !!}
|
||||
|
||||
@include('shop::layouts.header.index')
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.after') !!}
|
||||
|
||||
@yield('slider')
|
||||
|
||||
<main class="content-container">
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.content.before') !!}
|
||||
|
||||
@yield('content-wrapper')
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.content.after') !!}
|
||||
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.footer.before') !!}
|
||||
|
||||
@include('shop::layouts.footer.footer')
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.footer.after') !!}
|
||||
|
||||
@if (core()->getConfigData('general.content.footer.footer_toggle'))
|
||||
<div class="footer">
|
||||
<p style="text-align: center;">
|
||||
@if (core()->getConfigData('general.content.footer.footer_content'))
|
||||
{{ core()->getConfigData('general.content.footer.footer_content') }}
|
||||
@else
|
||||
{!! trans('admin::app.footer.copy-right') !!}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<overlay-loader :is-open="show_loader"></overlay-loader>
|
||||
|
||||
<go-top bg-color="#0041ff"></go-top>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.flashMessages = [];
|
||||
|
||||
@if ($success = session('success'))
|
||||
window.flashMessages = [{'type': 'alert-success', 'message': "{{ $success }}" }];
|
||||
@elseif ($warning = session('warning'))
|
||||
window.flashMessages = [{'type': 'alert-warning', 'message': "{{ $warning }}" }];
|
||||
@elseif ($error = session('error'))
|
||||
window.flashMessages = [{'type': 'alert-error', 'message': "{{ $error }}" }];
|
||||
@elseif ($info = session('info'))
|
||||
window.flashMessages = [{'type': 'alert-info', 'message': "{{ $info }}" }];
|
||||
@endif
|
||||
|
||||
window.serverErrors = [];
|
||||
|
||||
@if (isset($errors))
|
||||
@if (count($errors))
|
||||
window.serverErrors = @json($errors->getMessages());
|
||||
@endif
|
||||
@endif
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="{{ bagisto_asset('js/shop.js') }}" ></script>
|
||||
<script type="text/javascript" src="{{ asset('vendor/webkul/ui/assets/js/ui.js') }}"></script>
|
||||
|
||||
@stack('scripts')
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.body.after') !!}
|
||||
|
||||
<div class="modal-overlay"></div>
|
||||
|
||||
<script>
|
||||
{!! core()->getConfigData('general.content.custom_scripts.custom_javascript') !!}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
@if ($paginator->hasPages())
|
||||
<div class="pagination shop mt-50">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<a class="page-item previous">
|
||||
<i class="icon angle-left-icon"></i>
|
||||
</a>
|
||||
@else
|
||||
<a data-page="{{ urldecode($paginator->previousPageUrl()) }}" href="{{ urldecode($paginator->previousPageUrl()) }}" id="previous" class="page-item previous">
|
||||
<i class="icon angle-left-icon"></i>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<a class="page-item disabled" aria-disabled="true">
|
||||
{{ $element }}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<a class="page-item active">
|
||||
{{ $page }}
|
||||
</a>
|
||||
@else
|
||||
<a class="page-item as" href="{{ urldecode($url) }}">
|
||||
{{ $page }}
|
||||
</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a href="{{ urldecode($paginator->nextPageUrl()) }}" data-page="{{ urldecode($paginator->nextPageUrl()) }}" id="next" class="page-item next">
|
||||
<i class="icon angle-right-icon"></i>
|
||||
</a>
|
||||
@else
|
||||
<a class="page-item next">
|
||||
<i class="icon angle-right-icon"></i>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
|
||||
|
||||
@php
|
||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
|
||||
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
<div class="{{ $toolbarHelper->isModeActive('grid') ? 'cart-wish-wrap' : 'default-wrap' }}">
|
||||
<form action="{{ route('cart.add', $product->product_id) }}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="product_id" value="{{ $product->product_id }}">
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
<button class="btn btn-lg btn-primary addtocart" {{ $product->isSaleable() ? '' : 'disabled' }}>{{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}</button>
|
||||
</form>
|
||||
|
||||
@if ($showWishlist)
|
||||
@include('shop::products.wishlist')
|
||||
@endif
|
||||
|
||||
@if ($showCompare)
|
||||
@include('shop::products.compare', [
|
||||
'productId' => $product->id
|
||||
])
|
||||
@endif
|
||||
</div>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{!! view_render_event('bagisto.shop.products.add_to_cart.before', ['product' => $product]) !!}
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-lg btn-primary addtocart"
|
||||
{{ ! $product->isSaleable() ? 'disabled' : '' }}
|
||||
>
|
||||
{{ $product->type == 'booking' ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
|
||||
</button>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.add_to_cart.after', ['product' => $product]) !!}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{!! view_render_event('bagisto.shop.products.add_to.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="cart-fav-seg">
|
||||
@include ('shop::products.add-to-cart', ['product' => $product])
|
||||
|
||||
@include('shop::products.wishlist')
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.add_to.after', ['product' => $product]) !!}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{!! view_render_event('bagisto.shop.products.buy_now.before', ['product' => $product]) !!}
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-lg btn-primary buynow"
|
||||
{{ ! $product->isSaleable(1) ? 'disabled' : '' }}
|
||||
>
|
||||
{{ __('shop::app.products.buy-now') }}
|
||||
</button>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.buy_now.after', ['product' => $product]) !!}
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
<compare-component product-id="{{ $productId }}"></compare-component>
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="compare-component-template">
|
||||
<a
|
||||
class="unset text-right"
|
||||
title="{{ __('shop::app.customer.compare.add-tooltip') }}"
|
||||
@click="addProductToCompare"
|
||||
style="cursor: pointer">
|
||||
<img src="{{ asset('themes/default/assets/images/compare_arrows.png') }}" alt="" />
|
||||
</a>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('compare-component', {
|
||||
props: ['productId'],
|
||||
|
||||
template: '#compare-component-template',
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
'baseUrl': "{{ url()->to('/') }}",
|
||||
'customer': '{{ auth()->guard('customer')->user() ? "true" : "false" }}' == "true",
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
'addProductToCompare': function () {
|
||||
if (this.customer == "true" || this.customer == true) {
|
||||
this.$http.put(
|
||||
`${this.baseUrl}/comparison`, {
|
||||
productId: this.productId,
|
||||
}
|
||||
).then(response => {
|
||||
window.flashMessages = [{
|
||||
'type': `alert-${response.data.status}`,
|
||||
'message': response.data.message
|
||||
}];
|
||||
|
||||
this.updateCompareCount();
|
||||
|
||||
this.$root.addFlashMessages()
|
||||
}).catch(error => {
|
||||
window.flashMessages = [{
|
||||
'type': `alert-danger`,
|
||||
'message': "{{ __('shop::app.common.error') }}"
|
||||
}];
|
||||
|
||||
this.$root.addFlashMessages()
|
||||
});
|
||||
} else {
|
||||
let updatedItems = [this.productId];
|
||||
|
||||
let existingItems = this.getStorageValue('compared_product');
|
||||
|
||||
if (existingItems) {
|
||||
if (existingItems.indexOf(this.productId) == -1) {
|
||||
updatedItems = existingItems.concat(updatedItems);
|
||||
|
||||
this.setStorageValue('compared_product', updatedItems);
|
||||
|
||||
window.flashMessages = [{
|
||||
'type': `alert-success`,
|
||||
'message': "{{ __('shop::app.customer.compare.added') }}"
|
||||
}];
|
||||
|
||||
this.$root.addFlashMessages()
|
||||
} else {
|
||||
window.flashMessages = [{
|
||||
'type': `alert-success`,
|
||||
'message': "{{ __('shop::app.customer.compare.already_added') }}"
|
||||
}];
|
||||
|
||||
this.$root.addFlashMessages()
|
||||
}
|
||||
} else {
|
||||
this.setStorageValue('compared_product', updatedItems);
|
||||
|
||||
window.flashMessages = [{
|
||||
'type': `alert-success`,
|
||||
'message': "{{ __('shop::app.customer.compare.added') }}"
|
||||
}];
|
||||
|
||||
this.$root.addFlashMessages()
|
||||
}
|
||||
}
|
||||
|
||||
this.updateCompareCount();
|
||||
},
|
||||
|
||||
'getStorageValue': function (key) {
|
||||
let value = window.localStorage.getItem(key);
|
||||
|
||||
if (value) {
|
||||
value = JSON.parse(value);
|
||||
}
|
||||
|
||||
return value;
|
||||
},
|
||||
|
||||
'setStorageValue': function (key, value) {
|
||||
window.localStorage.setItem(key, JSON.stringify(value));
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
'updateCompareCount': function () {
|
||||
if (this.customer == "true" || this.customer == true) {
|
||||
this.$http.get(`${this.baseUrl}/items-count`)
|
||||
.then(response => {
|
||||
$('#compare-items-count').html(response.data.compareProductsCount);
|
||||
})
|
||||
.catch(exception => {
|
||||
window.flashMessages = [{
|
||||
'type': `alert-error`,
|
||||
'message': "{{ __('shop::app.common.error') }}"
|
||||
}];
|
||||
|
||||
this.$root.addFlashMessages();
|
||||
});
|
||||
} else {
|
||||
let comparedItems = JSON.parse(localStorage.getItem('compared_product'));
|
||||
|
||||
comparedItemsCount = comparedItems ? comparedItems.length : 0;
|
||||
|
||||
$('#compare-items-count').html(comparedItemsCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ trim($category->meta_title) != "" ? $category->meta_title : $category->name }}
|
||||
@stop
|
||||
|
||||
@section('seo')
|
||||
<meta name="description" content="{{ trim($category->meta_description) != "" ? $category->meta_description : \Illuminate\Support\Str::limit(strip_tags($category->description), 120, '') }}"/>
|
||||
|
||||
<meta name="keywords" content="{{ $category->meta_keywords }}"/>
|
||||
|
||||
@if (core()->getConfigData('catalog.rich_snippets.categories.enable'))
|
||||
<script type="application/ld+json">
|
||||
{!! app('Webkul\Product\Helpers\SEO')->getCategoryJsonLd($category) !!}
|
||||
</script>
|
||||
@endif
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository')
|
||||
|
||||
<div class="main">
|
||||
{!! view_render_event('bagisto.shop.products.index.before', ['category' => $category]) !!}
|
||||
|
||||
<div class="category-container">
|
||||
|
||||
@if (in_array($category->display_mode, [null, 'products_only', 'products_and_description']))
|
||||
@include ('shop::products.list.layered-navigation')
|
||||
@endif
|
||||
|
||||
<div class="category-block" @if ($category->display_mode == 'description_only') style="width: 100%" @endif>
|
||||
<div class="hero-image mb-35">
|
||||
@if (!is_null($category->image))
|
||||
<img class="logo" src="{{ $category->image_url }}" alt="" />
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if (in_array($category->display_mode, [null, 'description_only', 'products_and_description']))
|
||||
@if ($category->description)
|
||||
<div class="category-description">
|
||||
{!! $category->description !!}
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (in_array($category->display_mode, [null, 'products_only', 'products_and_description']))
|
||||
<?php $products = $productRepository->getAll($category->id); ?>
|
||||
|
||||
@include ('shop::products.list.toolbar')
|
||||
|
||||
@if ($products->count())
|
||||
|
||||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
|
||||
|
||||
@if ($toolbarHelper->getCurrentMode() == 'grid')
|
||||
<div class="product-grid-3">
|
||||
@foreach ($products as $productFlat)
|
||||
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="product-list">
|
||||
@foreach ($products as $productFlat)
|
||||
|
||||
@include ('shop::products.list.card', ['product' => $productFlat])
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.index.pagination.before', ['category' => $category]) !!}
|
||||
|
||||
<div class="bottom-toolbar">
|
||||
{{ $products->appends(request()->input())->links() }}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.index.pagination.after', ['category' => $category]) !!}
|
||||
|
||||
@else
|
||||
|
||||
<div class="product-list empty">
|
||||
<h2>{{ __('shop::app.products.whoops') }}</h2>
|
||||
|
||||
<p>
|
||||
{{ __('shop::app.products.empty') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.index.after', ['category' => $category]) !!}
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.responsive-layred-filter').css('display','none');
|
||||
$(".sort-icon, .filter-icon").on('click', function(e){
|
||||
var currentElement = $(e.currentTarget);
|
||||
if (currentElement.hasClass('sort-icon')) {
|
||||
currentElement.removeClass('sort-icon');
|
||||
currentElement.addClass('icon-menu-close-adj');
|
||||
currentElement.next().removeClass();
|
||||
currentElement.next().addClass('icon filter-icon');
|
||||
$('.responsive-layred-filter').css('display','none');
|
||||
$('.pager').css('display','flex');
|
||||
$('.pager').css('justify-content','space-between');
|
||||
} else if (currentElement.hasClass('filter-icon')) {
|
||||
currentElement.removeClass('filter-icon');
|
||||
currentElement.addClass('icon-menu-close-adj');
|
||||
currentElement.prev().removeClass();
|
||||
currentElement.prev().addClass('icon sort-icon');
|
||||
$('.pager').css('display','none');
|
||||
$('.responsive-layred-filter').css('display','block');
|
||||
$('.responsive-layred-filter').css('margin-top','10px');
|
||||
} else {
|
||||
currentElement.removeClass('icon-menu-close-adj');
|
||||
$('.responsive-layred-filter').css('display','none');
|
||||
$('.pager').css('display','none');
|
||||
if ($(this).index() == 0) {
|
||||
currentElement.addClass('sort-icon');
|
||||
} else {
|
||||
currentElement.addClass('filter-icon');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
{!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="product-card">
|
||||
|
||||
<?php $productBaseImage = productimage()->getProductBaseImage($product); ?>
|
||||
|
||||
@if (
|
||||
! $product->getTypeInstance()->haveSpecialPrice()
|
||||
&& $product->new
|
||||
)
|
||||
<div class="sticker new">
|
||||
{{ __('shop::app.products.new') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="product-image">
|
||||
<a href="{{ route('shop.productOrCategory.index', $product->url_key) }}" title="{{ $product->name }}">
|
||||
<img src="{{ $productBaseImage['medium_image_url'] }}" onerror="this.src='{{ asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png') }}'" alt="" height="500"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="product-information">
|
||||
|
||||
<div class="product-name">
|
||||
<a href="{{ route('shop.productOrCategory.index', $product->url_key) }}" title="{{ $product->name }}">
|
||||
<span>
|
||||
{{ $product->name }}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@include ('shop::products.price', ['product' => $product])
|
||||
|
||||
@include('shop::products.add-buttons', ['product' => $product])
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.card.after', ['product' => $product]) !!}
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
<div class="layered-filter-wrapper">
|
||||
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.before') !!}
|
||||
|
||||
<layered-navigation
|
||||
attribute-src="{{ route('catalog.categories.filterable-attributes', $category->id ?? null) }}"
|
||||
max-price-src="{{ route('catalog.categories.maximum-price', $category->id ?? null) }}">
|
||||
</layered-navigation>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.after') !!}
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="layered-navigation-template">
|
||||
<div>
|
||||
<div class="filter-title">
|
||||
{{ __('shop::app.products.layered-nav-title') }}
|
||||
</div>
|
||||
|
||||
<div class="filter-content">
|
||||
<div class="filter-attributes">
|
||||
<filter-attribute-item
|
||||
v-for='(attribute, index) in attributes'
|
||||
:key="index"
|
||||
:index="index"
|
||||
:attribute="attribute"
|
||||
:appliedFilterValues="appliedFilters[attribute.code]"
|
||||
:max-price-src="maxPriceSrc"
|
||||
@onFilterAdded="addFilters(attribute.code, $event)">
|
||||
</filter-attribute-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-template" id="filter-attribute-item-template">
|
||||
<div class="filter-attributes-item" :class="[active ? 'active' : '']">
|
||||
<div class="filter-attributes-title" @click="active = ! active">
|
||||
@{{ attribute.name ? attribute.name : attribute.admin_name }}
|
||||
|
||||
<div class="pull-right">
|
||||
<span class="remove-filter-link" v-if="appliedFilters.length" @click.stop="clearFilters()">
|
||||
{{ __('shop::app.products.remove-filter-link-title') }}
|
||||
</span>
|
||||
|
||||
<i class="icon" :class="[active ? 'arrow-up-icon' : 'arrow-down-icon']"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-attributes-content">
|
||||
<ol class="items" v-if="attribute.type != 'price'">
|
||||
<li class="item" v-for='(option, index) in attribute.options'>
|
||||
<span class="checkbox">
|
||||
<input
|
||||
:id="option.id"
|
||||
type="checkbox"
|
||||
v-bind:value="option.id"
|
||||
v-model="appliedFilters"
|
||||
@change="addFilter($event)"/>
|
||||
|
||||
<label class="checkbox-view" :for="option.id"></label>
|
||||
|
||||
@{{ option.label ? option.label : option.admin_name }}
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<div class="price-range-wrapper" v-if="attribute.type == 'price'">
|
||||
<vue-slider
|
||||
ref="slider"
|
||||
v-model="sliderConfig.value"
|
||||
:process-style="sliderConfig.processStyle"
|
||||
:tooltip-style="sliderConfig.tooltipStyle"
|
||||
:max="sliderConfig.max"
|
||||
:lazy="true"
|
||||
@change="priceRangeUpdated($event)">
|
||||
</vue-slider>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('layered-navigation', {
|
||||
template: '#layered-navigation-template',
|
||||
|
||||
props: [
|
||||
'attributeSrc',
|
||||
'maxPriceSrc',
|
||||
],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
appliedFilters: {},
|
||||
attributes: [],
|
||||
};
|
||||
},
|
||||
|
||||
created: function () {
|
||||
this.setFilterAttributes();
|
||||
|
||||
this.setAppliedFilters();
|
||||
},
|
||||
|
||||
methods: {
|
||||
setFilterAttributes: function () {
|
||||
axios
|
||||
.get(this.attributeSrc)
|
||||
.then((response) => {
|
||||
this.attributes = response.data.filter_attributes;
|
||||
});
|
||||
},
|
||||
|
||||
setAppliedFilters: function () {
|
||||
let urlParams = new URLSearchParams(window.location.search);
|
||||
|
||||
urlParams.forEach((value, index) => {
|
||||
this.appliedFilters[index] = value.split(',');
|
||||
});
|
||||
},
|
||||
|
||||
addFilters: function (attributeCode, filters) {
|
||||
if (filters.length) {
|
||||
this.appliedFilters[attributeCode] = filters;
|
||||
} else {
|
||||
delete this.appliedFilters[attributeCode];
|
||||
}
|
||||
|
||||
this.applyFilter();
|
||||
},
|
||||
|
||||
applyFilter: function () {
|
||||
let params = [];
|
||||
|
||||
for(key in this.appliedFilters) {
|
||||
if (key != 'page') {
|
||||
params.push(key + '=' + this.appliedFilters[key].join(','));
|
||||
}
|
||||
}
|
||||
|
||||
window.location.href = "?" + params.join('&');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Vue.component('filter-attribute-item', {
|
||||
template: '#filter-attribute-item-template',
|
||||
|
||||
props: [
|
||||
'index',
|
||||
'attribute',
|
||||
'appliedFilterValues',
|
||||
'maxPriceSrc',
|
||||
],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
appliedFilters: [],
|
||||
|
||||
active: false,
|
||||
|
||||
sliderConfig: {
|
||||
value: [0, 0],
|
||||
|
||||
max: 500,
|
||||
|
||||
processStyle: {
|
||||
"backgroundColor": "#FF6472"
|
||||
},
|
||||
|
||||
tooltipStyle: {
|
||||
"backgroundColor": "#FF6472",
|
||||
"borderColor": "#FF6472"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created: function () {
|
||||
if (! this.index) this.active = true;
|
||||
|
||||
if (this.appliedFilterValues && this.appliedFilterValues.length) {
|
||||
this.appliedFilters = this.appliedFilterValues;
|
||||
|
||||
if (this.attribute.type == 'price') {
|
||||
this.sliderConfig.value = this.appliedFilterValues;
|
||||
}
|
||||
|
||||
this.active = true;
|
||||
}
|
||||
|
||||
this.setMaxPrice();
|
||||
},
|
||||
|
||||
methods: {
|
||||
setMaxPrice: function () {
|
||||
if (this.attribute['code'] != 'price') {
|
||||
return;
|
||||
}
|
||||
|
||||
axios
|
||||
.get(this.maxPriceSrc)
|
||||
.then((response) => {
|
||||
let maxPrice = response.data.max_price;
|
||||
this.sliderConfig.max = maxPrice ? ((parseInt(maxPrice) !== 0 || maxPrice) ? parseInt(maxPrice) : 500) : 500;
|
||||
|
||||
if (! this.appliedFilterValues) {
|
||||
this.sliderConfig.value = [0, this.sliderConfig.max];
|
||||
this.sliderConfig.priceTo = this.sliderConfig.max;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
addFilter: function (e) {
|
||||
this.$emit('onFilterAdded', this.appliedFilters);
|
||||
},
|
||||
|
||||
priceRangeUpdated: function (value) {
|
||||
this.appliedFilters = value;
|
||||
|
||||
this.$emit('onFilterAdded', this.appliedFilters);
|
||||
},
|
||||
|
||||
clearFilters: function () {
|
||||
if (this.attribute.type == 'price') {
|
||||
this.sliderConfig.value = [0, 0];
|
||||
}
|
||||
|
||||
this.appliedFilters = [];
|
||||
|
||||
this.$emit('onFilterAdded', this.appliedFilters);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.toolbar.before') !!}
|
||||
|
||||
<div class="top-toolbar mb-35">
|
||||
|
||||
<div class="page-info">
|
||||
<span>
|
||||
{{ __('shop::app.products.pager-info', ['showing' => $products->firstItem() . '-' . $products->lastItem(), 'total' => $products->total()]) }}
|
||||
</span>
|
||||
|
||||
<span class="sort-filter">
|
||||
<i class="icon sort-icon" id="sort" ></i>
|
||||
<i class="icon filter-icon" id="filter"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="pager">
|
||||
|
||||
<div class="view-mode">
|
||||
@if ($toolbarHelper->isModeActive('grid'))
|
||||
<span class="grid-view">
|
||||
<i class="icon grid-view-icon"></i>
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $toolbarHelper->getModeUrl('grid') }}" class="grid-view" aria-label="Grid">
|
||||
<i class="icon grid-view-icon"></i>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if ($toolbarHelper->isModeActive('list'))
|
||||
<span class="list-view">
|
||||
<i class="icon list-view-icon"></i>
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $toolbarHelper->getModeUrl('list') }}" class="list-view" aria-label="list">
|
||||
<i class="icon list-view-icon"></i>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="sorter">
|
||||
<label for="sort-by-toolbar">{{ __('shop::app.products.sort-by') }}</label>
|
||||
|
||||
<select onchange="window.location.href = this.value" id="sort-by-toolbar">
|
||||
|
||||
@foreach ($toolbarHelper->getAvailableOrders() as $key => $order)
|
||||
|
||||
<option value="{{ $toolbarHelper->getOrderUrl($key) }}" {{ $toolbarHelper->isOrderCurrent($key) ? 'selected' : '' }}>
|
||||
{{ __('shop::app.products.' . $order) }}
|
||||
</option>
|
||||
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="limiter">
|
||||
<label for="show-toolbar">{{ __('shop::app.products.show') }}</label>
|
||||
|
||||
<select onchange="window.location.href = this.value" id="show-toolbar">
|
||||
|
||||
@foreach ($toolbarHelper->getAvailableLimits() as $limit)
|
||||
|
||||
<option value="{{ $toolbarHelper->getLimitUrl($limit) }}" {{ $toolbarHelper->isLimitCurrent($limit) ? 'selected' : '' }}>
|
||||
{{ $limit }}
|
||||
</option>
|
||||
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.toolbar.after') !!}
|
||||
|
||||
|
||||
<div class="responsive-layred-filter mb-20">
|
||||
<layered-navigation></layered-navigation>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{!! view_render_event('bagisto.shop.products.price.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="product-price">
|
||||
{!! $product->getTypeInstance()->getPriceHtml() !!}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.price.after', ['product' => $product]) !!}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.review.before', ['product' => $product]) !!}
|
||||
|
||||
@if ($total = $reviewHelper->getTotalReviews($product))
|
||||
<div class="product-ratings mb-10">
|
||||
<span class="stars">
|
||||
@for ($i = 1; $i <= 5; $i++)
|
||||
@if($i <= round($reviewHelper->getAverageRating($product)))
|
||||
<span class="icon star-icon"></span>
|
||||
@else
|
||||
<span class="icon star-icon-blank"></span>
|
||||
@endif
|
||||
@endfor
|
||||
</span>
|
||||
|
||||
<div class="total-reviews">
|
||||
{{
|
||||
__('shop::app.products.total-rating', [
|
||||
'total_rating' => $reviewHelper->getAverageRating($product),
|
||||
'total_reviews' => $total,
|
||||
])
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.review.after', ['product' => $product]) !!}
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.reviews.add-review-page-title') }} - {{ $product->name }}
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<section class="review">
|
||||
|
||||
<div class="review-layouter mb-20">
|
||||
<div class="product-info">
|
||||
|
||||
<?php $productBaseImage = productimage()->getProductBaseImage($product); ?>
|
||||
|
||||
<div class="product-image">
|
||||
<a href="{{ route('shop.productOrCategory.index', $product->url_key) }}" title="{{ $product->name }}">
|
||||
<img src="{{ $productBaseImage['medium_image_url'] }}" alt="" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="product-name mt-20">
|
||||
<a href="{{ route('shop.productOrCategory.index', $product->url_key) }}" title="{{ $product->name }}">
|
||||
<span>{{ $product->name }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@include('shop::products.price')
|
||||
|
||||
</div>
|
||||
|
||||
<div class="review-form">
|
||||
<form method="POST" action="{{ route('shop.reviews.store', $product->product_id ) }}" @submit.prevent="onSubmit" enctype="multipart/form-data">
|
||||
@csrf
|
||||
|
||||
<div class="heading mt-10 mb-25">
|
||||
<span>{{ __('shop::app.reviews.write-review') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('rating') ? 'has-error' : '']">
|
||||
<label for="title" class="required">
|
||||
{{ __('admin::app.customers.reviews.rating') }}
|
||||
</label>
|
||||
|
||||
<div class="stars">
|
||||
@for ($i = 1; $i <= 5; $i++)
|
||||
<span class="star star-{{ $i }}" for="star-{{ $i }}" onclick="calculateRating(id)" id="{{ $i }}"></span>
|
||||
@endfor
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="rating" name="rating" v-validate="'required'">
|
||||
|
||||
<div class="control-error" v-if="errors.has('rating')">@{{ errors.first('rating') }}</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('title') ? 'has-error' : '']">
|
||||
<label for="title" class="required">
|
||||
{{ __('shop::app.reviews.title') }}
|
||||
</label>
|
||||
<input type="text" class="control" name="title" v-validate="'required'" value="{{ old('title') }}">
|
||||
<span class="control-error" v-if="errors.has('title')">@{{ errors.first('title') }}</span>
|
||||
</div>
|
||||
|
||||
@if (
|
||||
core()->getConfigData('catalog.products.review.guest_review')
|
||||
&& ! auth()->guard('customer')->user()
|
||||
)
|
||||
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
|
||||
<label for="title" class="required">
|
||||
{{ __('shop::app.reviews.name') }}
|
||||
</label>
|
||||
<input type="text" class="control" name="name" v-validate="'required'" value="{{ old('name') }}">
|
||||
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="control-group" :class="[errors.has('comment') ? 'has-error' : '']">
|
||||
<label for="comment" class="required">
|
||||
{{ __('admin::app.customers.reviews.comment') }}
|
||||
</label>
|
||||
<textarea type="text" class="control" name="comment" v-validate="'required'" value="{{ old('comment') }}">
|
||||
</textarea>
|
||||
<span class="control-error" v-if="errors.has('comment')">@{{ errors.first('comment') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group {!! $errors->has('images.*') ? 'has-error' : '' !!}">
|
||||
<label>{{ __('admin::app.catalog.categories.image') }}</label>
|
||||
|
||||
<image-wrapper></image-wrapper>
|
||||
|
||||
<span class="control-error" v-if="{!! $errors->has('images.*') !!}">
|
||||
@php $count=1 @endphp
|
||||
@foreach ($errors->get('images.*') as $key => $message)
|
||||
@php echo str_replace($key, 'Image'.$count, $message[0]); $count++ @endphp
|
||||
@endforeach
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('shop::app.reviews.submit') }}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script>
|
||||
|
||||
function calculateRating(id) {
|
||||
var a = document.getElementById(id);
|
||||
document.getElementById("rating").value = id;
|
||||
|
||||
for (let i=1 ; i <= 5 ; i++) {
|
||||
if (id >= i) {
|
||||
document.getElementById(i).style.color="#242424";
|
||||
} else {
|
||||
document.getElementById(i).style.color="#d4d4d4";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,172 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.reviews.product-review-page-title') }} - {{ $product->name }}
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<section class="review">
|
||||
|
||||
<div class="review-layouter">
|
||||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||
|
||||
<?php $productBaseImage = productimage()->getProductBaseImage($product); ?>
|
||||
|
||||
<div class="product-info">
|
||||
<div class="product-image">
|
||||
<a href="{{ route('shop.productOrCategory.index', $product->url_key) }}" title="{{ $product->name }}">
|
||||
<img src="{{ $productBaseImage['medium_image_url'] }}" alt="" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="product-name mt-20">
|
||||
<a href="{{ route('shop.productOrCategory.index', $product->url_key) }}" title="{{ $product->name }}">
|
||||
<span>{{ $product->name }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="product-price mt-10">
|
||||
@if ($product->getTypeInstance()->haveSpecialPrice())
|
||||
<span class="pro-price">{{ core()->currency($product->getTypeInstance()->getSpecialPrice()) }}</span>
|
||||
@else
|
||||
<span class="pro-price">{{ core()->currency($product->getTypeInstance()->getMinimalPrice()) }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="review-form">
|
||||
<div class="heading mt-10">
|
||||
<span> {{ __('shop::app.reviews.rating-reviews') }} </span>
|
||||
|
||||
@if (
|
||||
core()->getConfigData('catalog.products.review.guest_review')
|
||||
|| auth()->guard('customer')->check()
|
||||
)
|
||||
<a href="{{ route('shop.reviews.create', $product->url_key) }}" class="btn btn-lg btn-primary right">
|
||||
{{ __('shop::app.products.write-review-btn') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="ratings-reviews mt-35">
|
||||
<div class="left-side">
|
||||
<span class="rate">
|
||||
{{ $reviewHelper->getAverageRating($product) }}
|
||||
</span>
|
||||
|
||||
<span class="stars">
|
||||
@for ($i = 1; $i <= 5; $i++)
|
||||
|
||||
@if($i <= round($reviewHelper->getAverageRating($product)))
|
||||
<span class="icon star-icon"></span>
|
||||
@else
|
||||
<span class="icon star-icon-blank"></span>
|
||||
@endif
|
||||
|
||||
@endfor
|
||||
</span>
|
||||
|
||||
<div class="total-reviews mt-5">
|
||||
{{ __('shop::app.reviews.ratingreviews', [
|
||||
'rating' => $reviewHelper->getAverageRating($product),
|
||||
'review' => $reviewHelper->getTotalReviews($product)])
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="right-side">
|
||||
|
||||
@foreach ($reviewHelper->getPercentageRating($product) as $key => $count)
|
||||
<div class="rater 5star">
|
||||
<div class="rate-number" id={{ $key }}{{ __('shop::app.reviews.id-star') }}></div>
|
||||
<div class="star-name">{{ __('shop::app.reviews.star') }}</div>
|
||||
<div class="line-bar">
|
||||
<div class="line-value" id="{{ $key }}"></div>
|
||||
</div>
|
||||
<div class="percentage">
|
||||
<span>
|
||||
{{ __('shop::app.reviews.percentage', ['percentage' => $count]) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="rating-reviews">
|
||||
<div class="reviews">
|
||||
|
||||
@foreach ($reviewHelper->getReviews($product)->paginate(10) as $review)
|
||||
<div class="review">
|
||||
<div class="title">
|
||||
{{ $review->title }}
|
||||
</div>
|
||||
|
||||
<span class="stars">
|
||||
@for ($i = 1; $i <= 5; $i++)
|
||||
@if ($i <= $review->rating)
|
||||
<span class="icon star-icon"></span>
|
||||
@else
|
||||
<span class="icon star-icon-blank"></span>
|
||||
@endif
|
||||
@endfor
|
||||
</span>
|
||||
|
||||
<div class="message">
|
||||
{{ $review->comment }}
|
||||
</div>
|
||||
|
||||
<div class="image">
|
||||
@if (count($review->images) > 0)
|
||||
@foreach ($review->images as $image)
|
||||
<img src="{{ $image->url }}">
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="reviewer-details">
|
||||
<span class="by">
|
||||
{{ __('shop::app.products.by', ['name' => $review->name]) }},
|
||||
</span>
|
||||
|
||||
<span class="when">
|
||||
{{ core()->formatDate($review->created_at, 'F d, Y') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script>
|
||||
|
||||
window.onload = (function() {
|
||||
var percentage = {};
|
||||
<?php foreach ($reviewHelper->getPercentageRating($product) as $key => $count) { ?>
|
||||
|
||||
percentage = <?php echo "'$count';"; ?>
|
||||
id = <?php echo "'$key';"; ?>
|
||||
idNumber = id + 'star';
|
||||
|
||||
document.getElementById(id).style.width = percentage + "%";
|
||||
document.getElementById(id).style.height = 4 + "px";
|
||||
document.getElementById(idNumber).innerHTML = id ;
|
||||
|
||||
<?php } ?>
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
@ -0,0 +1 @@
|
|||
<span class="icon share-icon"></span>
|
||||
|
|
@ -0,0 +1,320 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ trim($product->meta_title) != "" ? $product->meta_title : $product->name }}
|
||||
@stop
|
||||
|
||||
@section('seo')
|
||||
<meta name="description" content="{{ trim($product->meta_description) != "" ? $product->meta_description : \Illuminate\Support\Str::limit(strip_tags($product->description), 120, '') }}"/>
|
||||
|
||||
<meta name="keywords" content="{{ $product->meta_keywords }}"/>
|
||||
|
||||
@if (core()->getConfigData('catalog.rich_snippets.products.enable'))
|
||||
<script type="application/ld+json">
|
||||
{{ app('Webkul\Product\Helpers\SEO')->getProductJsonLd($product) }}
|
||||
</script>
|
||||
@endif
|
||||
|
||||
<?php $productBaseImage = productimage()->getProductBaseImage($product); ?>
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
|
||||
<meta name="twitter:title" content="{{ $product->name }}" />
|
||||
|
||||
<meta name="twitter:description" content="{!! htmlspecialchars(trim(strip_tags($product->description))) !!}" />
|
||||
|
||||
<meta name="twitter:image:alt" content="" />
|
||||
|
||||
<meta name="twitter:image" content="{{ $productBaseImage['medium_image_url'] }}" />
|
||||
|
||||
<meta property="og:type" content="og:product" />
|
||||
|
||||
<meta property="og:title" content="{{ $product->name }}" />
|
||||
|
||||
<meta property="og:image" content="{{ $productBaseImage['medium_image_url'] }}" />
|
||||
|
||||
<meta property="og:description" content="{!! htmlspecialchars(trim(strip_tags($product->description))) !!}" />
|
||||
|
||||
<meta property="og:url" content="{{ route('shop.productOrCategory.index', $product->url_key) }}" />
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.before', ['product' => $product]) !!}
|
||||
|
||||
<section class="product-detail">
|
||||
|
||||
<div class="layouter">
|
||||
<product-view>
|
||||
<div class="form-container">
|
||||
@csrf()
|
||||
|
||||
<input type="hidden" name="product_id" value="{{ $product->product_id }}">
|
||||
|
||||
@include ('shop::products.view.gallery')
|
||||
|
||||
<div class="details">
|
||||
|
||||
<div class="product-heading">
|
||||
<span>{{ $product->name }}</span>
|
||||
</div>
|
||||
|
||||
@include ('shop::products.review', ['product' => $product])
|
||||
|
||||
@include ('shop::products.price', ['product' => $product])
|
||||
|
||||
@if (
|
||||
Webkul\Tax\Helpers\Tax::isTaxInclusive()
|
||||
&& $product->getTypeInstance()->getTaxCategory()
|
||||
)
|
||||
<div>
|
||||
{{ __('shop::app.products.tax-inclusive') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (count($product->getTypeInstance()->getCustomerGroupPricingOffers()) > 0)
|
||||
<div class="regular-price">
|
||||
@foreach ($product->getTypeInstance()->getCustomerGroupPricingOffers() as $offers)
|
||||
<p> {{ $offers }} </p>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include ('shop::products.view.stock', ['product' => $product])
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.short_description.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="description">
|
||||
{!! $product->short_description !!}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.short_description.after', ['product' => $product]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.quantity.before', ['product' => $product]) !!}
|
||||
|
||||
@if ($product->getTypeInstance()->showQuantityBox())
|
||||
<quantity-changer></quantity-changer>
|
||||
@else
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.quantity.after', ['product' => $product]) !!}
|
||||
|
||||
@include ('shop::products.view.configurable-options')
|
||||
|
||||
@include ('shop::products.view.downloadable')
|
||||
|
||||
@include ('shop::products.view.grouped-products')
|
||||
|
||||
@include ('shop::products.view.bundle-options')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.description.before', ['product' => $product]) !!}
|
||||
|
||||
<accordian :title="'{{ __('shop::app.products.description') }}'" :active="true">
|
||||
<div slot="header">
|
||||
{{ __('shop::app.products.description') }}
|
||||
<i class="icon expand-icon right"></i>
|
||||
</div>
|
||||
|
||||
<div slot="body">
|
||||
<div class="full-description">
|
||||
{!! $product->description !!}
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.description.after', ['product' => $product]) !!}
|
||||
|
||||
@include ('shop::products.view.attributes')
|
||||
|
||||
@include ('shop::products.view.reviews')
|
||||
</div>
|
||||
</div>
|
||||
</product-view>
|
||||
</div>
|
||||
|
||||
@include ('shop::products.view.related-products')
|
||||
|
||||
@include ('shop::products.view.up-sells')
|
||||
|
||||
</section>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.after', ['product' => $product]) !!}
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script type="text/x-template" id="product-view-template">
|
||||
<form method="POST" id="product-form" action="{{ route('cart.add', $product->product_id) }}" @click="onSubmit($event)">
|
||||
|
||||
<input type="hidden" name="is_buy_now" v-model="is_buy_now">
|
||||
|
||||
<slot></slot>
|
||||
|
||||
</form>
|
||||
</script>
|
||||
|
||||
<script type="text/x-template" id="quantity-changer-template">
|
||||
<div class="quantity control-group" :class="[errors.has(controlName) ? 'has-error' : '']">
|
||||
<label class="required">{{ __('shop::app.products.quantity') }}</label>
|
||||
|
||||
<span class="quantity-container">
|
||||
<button type="button" class="decrease" @click="decreaseQty()">-</button>
|
||||
|
||||
<input
|
||||
ref="quantityChanger"
|
||||
:name="controlName"
|
||||
:model="qty"
|
||||
class="control"
|
||||
v-validate="validations"
|
||||
data-vv-as=""{{ __('shop::app.products.quantity') }}""
|
||||
@keyup="setQty($event)">
|
||||
|
||||
<button type="button" class="increase" @click="increaseQty()">+</button>
|
||||
</span>
|
||||
|
||||
<span class="control-error" v-if="errors.has(controlName)">@{{ errors.first(controlName) }}</span>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
Vue.component('product-view', {
|
||||
|
||||
template: '#product-view-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
is_buy_now: 0,
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onSubmit: function(e) {
|
||||
if (e.target.getAttribute('type') != 'submit')
|
||||
return;
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var this_this = this;
|
||||
|
||||
this.$validator.validateAll().then(function (result) {
|
||||
if (result) {
|
||||
this_this.is_buy_now = e.target.classList.contains('buynow') ? 1 : 0;
|
||||
|
||||
setTimeout(function() {
|
||||
document.getElementById('product-form').submit();
|
||||
}, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Vue.component('quantity-changer', {
|
||||
template: '#quantity-changer-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
||||
props: {
|
||||
controlName: {
|
||||
type: String,
|
||||
default: 'quantity'
|
||||
},
|
||||
|
||||
quantity: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
},
|
||||
|
||||
minQuantity: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
},
|
||||
|
||||
validations: {
|
||||
type: String,
|
||||
default: 'required|numeric|min_value:1'
|
||||
}
|
||||
},
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
qty: this.quantity
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
this.$refs.quantityChanger.value = this.qty > this.minQuantity
|
||||
? this.qty
|
||||
: this.minQuantity;
|
||||
},
|
||||
|
||||
watch: {
|
||||
qty: function (val) {
|
||||
this.$refs.quantityChanger.value = ! isNaN(parseFloat(val)) ? val : 0;
|
||||
|
||||
this.qty = ! isNaN(parseFloat(val)) ? this.qty : 0;
|
||||
|
||||
this.$emit('onQtyUpdated', this.qty);
|
||||
|
||||
this.$validator.validate();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
setQty: function({ target }) {
|
||||
this.qty = parseInt(target.value);
|
||||
},
|
||||
|
||||
decreaseQty: function() {
|
||||
if (this.qty > this.minQuantity)
|
||||
this.qty = parseInt(this.qty) - 1;
|
||||
},
|
||||
|
||||
increaseQty: function() {
|
||||
this.qty = parseInt(this.qty) + 1;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
window.onload = function() {
|
||||
var thumbList = document.getElementsByClassName('thumb-list')[0];
|
||||
var thumbFrame = document.getElementsByClassName('thumb-frame');
|
||||
var productHeroImage = document.getElementsByClassName('product-hero-image')[0];
|
||||
|
||||
if (thumbList && productHeroImage) {
|
||||
|
||||
for(let i=0; i < thumbFrame.length ; i++) {
|
||||
thumbFrame[i].style.height = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbFrame[i].style.width = (productHeroImage.offsetHeight/4)+ "px";
|
||||
}
|
||||
|
||||
if (screen.width > 720) {
|
||||
thumbList.style.width = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbList.style.minWidth = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbList.style.height = productHeroImage.offsetHeight + "px";
|
||||
}
|
||||
}
|
||||
|
||||
window.onresize = function() {
|
||||
if (thumbList && productHeroImage) {
|
||||
|
||||
for(let i=0; i < thumbFrame.length; i++) {
|
||||
thumbFrame[i].style.height = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbFrame[i].style.width = (productHeroImage.offsetHeight/4)+ "px";
|
||||
}
|
||||
|
||||
if (screen.width > 720) {
|
||||
thumbList.style.width = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbList.style.minWidth = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbList.style.height = productHeroImage.offsetHeight + "px";
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
@inject ('productViewHelper', 'Webkul\Product\Helpers\View')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.attributes.before', ['product' => $product]) !!}
|
||||
|
||||
@if ($customAttributeValues = $productViewHelper->getAdditionalData($product))
|
||||
<accordian :title="'{{ __('shop::app.products.specification') }}'" :active="false">
|
||||
<div slot="header">
|
||||
{{ __('shop::app.products.specification') }}
|
||||
<i class="icon expand-icon right"></i>
|
||||
</div>
|
||||
|
||||
<div slot="body">
|
||||
<table class="full-specifications">
|
||||
|
||||
@foreach ($customAttributeValues as $attribute)
|
||||
<tr>
|
||||
@if ($attribute['label'])
|
||||
<td>{{ $attribute['label'] }}</td>
|
||||
@else
|
||||
<td>{{ $attribute['admin_name'] }}</td>
|
||||
@endif
|
||||
|
||||
@if (
|
||||
$attribute['type'] == 'file'
|
||||
&& $attribute['value']
|
||||
)
|
||||
<td>
|
||||
<a href="{{ route('shop.product.file.download', [$product->product_id, $attribute['id']])}}">
|
||||
<i class="icon sort-down-icon download"></i>
|
||||
</a>
|
||||
</td>
|
||||
@elseif (
|
||||
$attribute['type'] == 'image'
|
||||
&& $attribute['value']
|
||||
)
|
||||
<td>
|
||||
<a href="{{ route('shop.product.file.download', [$product->product_id, $attribute['id']])}}">
|
||||
<img src="{{ Storage::url($attribute['value']) }}" style="height: 20px; width: 20px;" alt=""/>
|
||||
</a>
|
||||
</td>
|
||||
@else
|
||||
<td>{{ $attribute['value'] }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</accordian>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.attributes.after', ['product' => $product]) !!}
|
||||
|
|
@ -0,0 +1,236 @@
|
|||
@if ($product->type == 'bundle')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.bundle-options.before', ['product' => $product]) !!}
|
||||
|
||||
<bundle-option-list></bundle-option-list>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.bundle-options.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="bundle-option-list-template">
|
||||
<div class="bundle-options-wrapper">
|
||||
<div class="bundle-option-list">
|
||||
<h3>{{ __('shop::app.products.customize-options') }}</h3>
|
||||
|
||||
<bundle-option-item
|
||||
v-for="(option, index) in options"
|
||||
:option="option"
|
||||
:key="index"
|
||||
:index="index"
|
||||
@onProductSelected="productSelected(option, $event)">
|
||||
</bundle-option-item>
|
||||
</div>
|
||||
|
||||
<div class="bundle-summary">
|
||||
<h3>{{ __('shop::app.products.your-customization') }}</h3>
|
||||
|
||||
<quantity-changer></quantity-changer>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{ __('shop::app.products.total-amount') }}</label>
|
||||
|
||||
<div class="bundle-price">
|
||||
@{{ formated_total_price | currency(currency_options) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="bundle-items">
|
||||
<li v-for="(option, index) in options">
|
||||
@{{ option.label }}
|
||||
|
||||
<div class="selected-products">
|
||||
<div v-for="(product, index1) in option.products" v-if="product.is_default">
|
||||
@{{ product.qty + ' x ' + product.name }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-template" id="bundle-option-item-template">
|
||||
<div class="bundle-option-item">
|
||||
<div class="control-group" :class="[errors.has('bundle_options[' + option.id + '][]') ? 'has-error' : '']">
|
||||
<label :class="[option.is_required ? 'required' : '']">@{{ option.label }}</label>
|
||||
|
||||
<div v-if="option.type == 'select'">
|
||||
<select class="control" :name="'bundle_options[' + option.id + '][]'" v-model="selected_product" v-validate="option.is_required ? 'required' : ''" :data-vv-as="option.label + '"'">
|
||||
<option value="">{{ __('shop::app.products.choose-selection') }}</option>
|
||||
<option v-for="(product, index2) in option.products" :value="product.id">
|
||||
@{{ product.name + ' + ' + product.price.final_price.formated_price }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div v-if="option.type == 'radio'">
|
||||
<span class="radio" v-if="! option.is_required">
|
||||
<input type="radio" :name="'bundle_options[' + option.id + '][]'" v-model="selected_product" value="0" :id="'bundle_options[' + option.id + '][]'">
|
||||
<label class="radio-view" :for="'bundle_options[' + option.id + '][]'"></label>
|
||||
|
||||
{{ __('shop::app.products.none') }}
|
||||
</span>
|
||||
|
||||
<span class="radio" v-for="(product, index2) in option.products">
|
||||
<input type="radio" :name="'bundle_options[' + option.id + '][]'" v-model="selected_product" v-validate="option.is_required ? 'required' : ''" :data-vv-as="'"' + option.label + '"'" :value="product.id" :id="'bundle_options[' + option.id + '][]'">
|
||||
<label class="radio-view" :for="'bundle_options[' + option.id + '][]'"></label>
|
||||
|
||||
@{{ product.name }}
|
||||
|
||||
<span class="price">
|
||||
+ @{{ product.price.final_price.formated_price }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="option.type == 'checkbox'">
|
||||
<span class="checkbox" v-for="(product, index2) in option.products">
|
||||
<input type="checkbox" :name="'bundle_options[' + option.id + '][]'" :value="product.id" v-model="selected_product" v-validate="option.is_required ? 'required' : ''" :data-vv-as="'"' + option.label + '"'" :id="'bundle_options[' + option.id + '][]'">
|
||||
<label class="checkbox-view" :for="'bundle_options[' + option.id + '][]'"></label>
|
||||
|
||||
@{{ product.name }}
|
||||
|
||||
<span class="price">
|
||||
+ @{{ product.price.final_price.formated_price }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="option.type == 'multiselect'">
|
||||
<select class="control" :name="'bundle_options[' + option.id + '][]'" v-model="selected_product" v-validate="option.is_required ? 'required' : ''" :data-vv-as="'"' + option.label + '"'" multiple>
|
||||
<option value="0" v-if="! option.is_required">{{ __('shop::app.products.none') }}</option>
|
||||
<option v-for="(product, index2) in option.products" :value="product.id">
|
||||
@{{ product.name + ' + ' + product.price.final_price.formated_price }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<span class="control-error" v-if="errors.has('bundle_options[' + option.id + '][]')">
|
||||
@{{ errors.first('bundle_options[' + option.id + '][]') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="option.type == 'select' || option.type == 'radio'">
|
||||
<quantity-changer
|
||||
:control-name="'bundle_option_qty[' + option.id + ']'"
|
||||
:validations="parseInt(selected_product) ? 'required|numeric|min_value:1' : ''"
|
||||
:quantity="product_qty"
|
||||
@onQtyUpdated="qtyUpdated($event)">
|
||||
</quantity-changer>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('bundle-option-list', {
|
||||
|
||||
template: '#bundle-option-list-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
config: @json(app('Webkul\Product\Helpers\BundleOption')->getBundleConfig($product)),
|
||||
|
||||
options: [],
|
||||
|
||||
currency_options: @json(core()->getAccountJsSymbols())
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
formated_total_price: function() {
|
||||
var total = 0;
|
||||
|
||||
for (var key in this.options) {
|
||||
for (var key1 in this.options[key].products) {
|
||||
if (! this.options[key].products[key1].is_default)
|
||||
continue;
|
||||
|
||||
total += this.options[key].products[key1].qty * this.options[key].products[key1].price.final_price.price;
|
||||
}
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
},
|
||||
|
||||
created: function() {
|
||||
for (var key in this.config.options) {
|
||||
this.options.push(this.config.options[key])
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
productSelected: function(option, value) {
|
||||
var selectedProductIds = Array.isArray(value) ? value : [value];
|
||||
|
||||
for (var key in option.products) {
|
||||
option.products[key].is_default = selectedProductIds.indexOf(option.products[key].id) > -1 ? 1 : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Vue.component('bundle-option-item', {
|
||||
template: '#bundle-option-item-template',
|
||||
|
||||
props: ['index', 'option'],
|
||||
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
selected_product: (this.option.type == 'checkbox' || this.option.type == 'multiselect') ? [] : null,
|
||||
|
||||
qty_validations: ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
product_qty: function() {
|
||||
var self = this;
|
||||
self.qty = 0;
|
||||
|
||||
self.option.products.forEach(function(product, key){
|
||||
if (self.selected_product == product.id)
|
||||
self.qty = self.option.products[key].qty;
|
||||
});
|
||||
|
||||
return self.qty;
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
selected_product: function (value) {
|
||||
this.qty_validations = this.selected_product ? 'required|numeric|min_value:1' : '';
|
||||
|
||||
this.$emit('onProductSelected', value)
|
||||
}
|
||||
},
|
||||
|
||||
created: function() {
|
||||
for (var key1 in this.option.products) {
|
||||
if (! this.option.products[key1].is_default)
|
||||
continue;
|
||||
|
||||
if (this.option.type == 'checkbox' || this.option.type == 'multiselect') {
|
||||
this.selected_product.push(this.option.products[key1].id)
|
||||
} else {
|
||||
this.selected_product = this.option.products[key1].id
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
qtyUpdated: function(qty) {
|
||||
if (! this.option.products[this.selected_product])
|
||||
return;
|
||||
|
||||
this.option.products[this.selected_product].qty = qty;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endif
|
||||
|
|
@ -0,0 +1,360 @@
|
|||
@if (Webkul\Product\Helpers\ProductType::hasVariants($product->type))
|
||||
|
||||
@inject ('configurableOptionHelper', 'Webkul\Product\Helpers\ConfigurableOption')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.configurable-options.before', ['product' => $product]) !!}
|
||||
|
||||
<product-options></product-options>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.configurable-options.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script type="text/x-template" id="product-options-template">
|
||||
<div class="attributes">
|
||||
|
||||
<input type="hidden" id="selected_configurable_option" name="selected_configurable_option" :value="selectedProductId">
|
||||
|
||||
<div v-for='(attribute, index) in childAttributes' class="attribute control-group" :class="[errors.has('super_attribute[' + attribute.id + ']') ? 'has-error' : '']">
|
||||
<label class="required">@{{ attribute.label }}</label>
|
||||
|
||||
<span v-if="! attribute.swatch_type || attribute.swatch_type == '' || attribute.swatch_type == 'dropdown'">
|
||||
<select
|
||||
class="control"
|
||||
v-validate="'required'"
|
||||
:name="['super_attribute[' + attribute.id + ']']"
|
||||
:disabled="attribute.disabled"
|
||||
@change="configure(attribute, $event.target.value)"
|
||||
:id="['attribute_' + attribute.id]"
|
||||
:data-vv-as="'"' + attribute.label + '"'">
|
||||
|
||||
<option
|
||||
v-for='(option, index) in attribute.options' :value="option.id"
|
||||
:selected="index == attribute.selectedIndex">
|
||||
@{{ option.label }}
|
||||
</option>
|
||||
|
||||
</select>
|
||||
</span>
|
||||
|
||||
<span class="swatch-container" v-else>
|
||||
<label class="swatch"
|
||||
v-for='(option, index) in attribute.options'
|
||||
v-if="option.id"
|
||||
:data-id="option.id"
|
||||
:for="['attribute_' + attribute.id + '_option_' + option.id]">
|
||||
|
||||
<input type="radio"
|
||||
v-validate="'required'"
|
||||
:name="['super_attribute[' + attribute.id + ']']"
|
||||
:id="['attribute_' + attribute.id + '_option_' + option.id]"
|
||||
:value="option.id"
|
||||
:data-vv-as="'"' + attribute.label + '"'"
|
||||
@change="configure(attribute, $event.target.value)"
|
||||
:checked="index == attribute.selectedIndex"/>
|
||||
|
||||
<span v-if="attribute.swatch_type == 'color'" :style="{ background: option.swatch_value }"></span>
|
||||
|
||||
<img v-if="attribute.swatch_type == 'image'" :src="option.swatch_value" :title="option.label" alt="" />
|
||||
|
||||
<span v-if="attribute.swatch_type == 'text'">
|
||||
@{{ option.label }}
|
||||
</span>
|
||||
|
||||
</label>
|
||||
|
||||
<span v-if="! attribute.options.length" class="no-options">{{ __('shop::app.products.select-above-options') }}</span>
|
||||
</span>
|
||||
|
||||
<span class="control-error" v-if="errors.has('super_attribute[' + attribute.id + ']')">
|
||||
@{{ errors.first('super_attribute[' + attribute.id + ']') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
@php
|
||||
$defaultVariant = $product->getTypeInstance()->getDefaultVariant();
|
||||
$config = $configurableOptionHelper->getConfigurationConfig($product);
|
||||
@endphp
|
||||
|
||||
<script>
|
||||
|
||||
Vue.component('product-options', {
|
||||
template: '#product-options-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
defaultVariant: @json($defaultVariant),
|
||||
|
||||
config: @json($config),
|
||||
|
||||
childAttributes: [],
|
||||
|
||||
selectedProductId: '',
|
||||
|
||||
simpleProduct: null,
|
||||
|
||||
galleryImages: [],
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
this.init();
|
||||
|
||||
this.initDefaultSelection();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init: function () {
|
||||
let config = @json($config);
|
||||
|
||||
let childAttributes = this.childAttributes,
|
||||
attributes = config.attributes.slice(),
|
||||
index = attributes.length,
|
||||
attribute;
|
||||
|
||||
while (index--) {
|
||||
attribute = attributes[index];
|
||||
|
||||
attribute.options = [];
|
||||
|
||||
if (index) {
|
||||
attribute.disabled = true;
|
||||
} else {
|
||||
this.fillSelect(attribute);
|
||||
}
|
||||
|
||||
attribute = Object.assign(attribute, {
|
||||
childAttributes: childAttributes.slice(),
|
||||
prevAttribute: attributes[index - 1],
|
||||
nextAttribute: attributes[index + 1]
|
||||
});
|
||||
|
||||
childAttributes.unshift(attribute);
|
||||
}
|
||||
},
|
||||
|
||||
initDefaultSelection: function() {
|
||||
if (this.defaultVariant) {
|
||||
this.childAttributes.forEach((attribute) => {
|
||||
let attributeValue = this.defaultVariant[attribute.code];
|
||||
|
||||
this.configure(attribute, attributeValue);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
configure: function(attribute, value) {
|
||||
this.simpleProduct = this.getSelectedProductId(attribute, value);
|
||||
|
||||
if (value) {
|
||||
attribute.selectedIndex = this.getSelectedIndex(attribute, value);
|
||||
|
||||
if (attribute.nextAttribute) {
|
||||
attribute.nextAttribute.disabled = false;
|
||||
|
||||
this.fillSelect(attribute.nextAttribute);
|
||||
|
||||
this.resetChildren(attribute.nextAttribute);
|
||||
} else {
|
||||
this.selectedProductId = this.simpleProduct;
|
||||
}
|
||||
} else {
|
||||
attribute.selectedIndex = 0;
|
||||
|
||||
this.resetChildren(attribute);
|
||||
|
||||
this.clearSelect(attribute.nextAttribute)
|
||||
}
|
||||
|
||||
this.reloadPrice();
|
||||
this.changeProductImages();
|
||||
this.changeStock(this.simpleProduct);
|
||||
},
|
||||
|
||||
getSelectedIndex: function(attribute, value) {
|
||||
let selectedIndex = 0;
|
||||
|
||||
attribute.options.forEach(function(option, index) {
|
||||
if (option.id == value) {
|
||||
selectedIndex = index;
|
||||
}
|
||||
})
|
||||
|
||||
return selectedIndex;
|
||||
},
|
||||
|
||||
getSelectedProductId: function(attribute, value) {
|
||||
let options = attribute.options,
|
||||
matchedOptions;
|
||||
|
||||
matchedOptions = options.filter(function (option) {
|
||||
return option.id == value;
|
||||
});
|
||||
|
||||
if (matchedOptions[0] != undefined && matchedOptions[0].allowedProducts != undefined) {
|
||||
return matchedOptions[0].allowedProducts[0];
|
||||
}
|
||||
|
||||
return undefined;
|
||||
},
|
||||
|
||||
fillSelect: function(attribute) {
|
||||
let options = this.getAttributeOptions(attribute.id),
|
||||
prevOption,
|
||||
index = 1,
|
||||
allowedProducts,
|
||||
i,
|
||||
j;
|
||||
|
||||
this.clearSelect(attribute)
|
||||
|
||||
attribute.options = [{'id': '', 'label': this.config.chooseText, 'products': []}];
|
||||
|
||||
if (attribute.prevAttribute) {
|
||||
prevOption = attribute.prevAttribute.options[attribute.prevAttribute.selectedIndex];
|
||||
}
|
||||
|
||||
if (options) {
|
||||
for (i = 0; i < options.length; i++) {
|
||||
allowedProducts = [];
|
||||
|
||||
if (prevOption) {
|
||||
for (j = 0; j < options[i].products.length; j++) {
|
||||
if (prevOption.allowedProducts && prevOption.allowedProducts.indexOf(options[i].products[j]) > -1) {
|
||||
allowedProducts.push(options[i].products[j]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
allowedProducts = options[i].products.slice(0);
|
||||
}
|
||||
|
||||
if (allowedProducts.length > 0) {
|
||||
options[i].allowedProducts = allowedProducts;
|
||||
|
||||
attribute.options[index] = options[i];
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
resetChildren: function(attribute) {
|
||||
if (attribute.childAttributes) {
|
||||
attribute.childAttributes.forEach(function (set) {
|
||||
set.selectedIndex = 0;
|
||||
set.disabled = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
clearSelect: function (attribute) {
|
||||
if (! attribute)
|
||||
return;
|
||||
|
||||
if (! attribute.swatch_type || attribute.swatch_type == '' || attribute.swatch_type == 'dropdown') {
|
||||
let element = document.getElementById("attribute_" + attribute.id);
|
||||
|
||||
if (element) {
|
||||
element.selectedIndex = "0";
|
||||
}
|
||||
} else {
|
||||
let elements = document.getElementsByName('super_attribute[' + attribute.id + ']');
|
||||
|
||||
let self = this;
|
||||
|
||||
elements.forEach(function(element) {
|
||||
element.checked = false;
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
getAttributeOptions: function (attributeId) {
|
||||
let self = this,
|
||||
options;
|
||||
|
||||
this.config.attributes.forEach(function(attribute, index) {
|
||||
if (attribute.id == attributeId) {
|
||||
options = attribute.options;
|
||||
}
|
||||
})
|
||||
|
||||
return options;
|
||||
},
|
||||
|
||||
reloadPrice: function () {
|
||||
let selectedOptionCount = 0;
|
||||
|
||||
this.childAttributes.forEach(function(attribute) {
|
||||
if (attribute.selectedIndex) {
|
||||
selectedOptionCount++;
|
||||
}
|
||||
});
|
||||
|
||||
let priceLabelElement = document.querySelector('.price-label');
|
||||
let priceElement = document.querySelector('.special-price') ? document.querySelector('.special-price') : document.querySelector('.final-price');
|
||||
let regularPriceElement = document.querySelector('.regular-price');
|
||||
|
||||
if (this.childAttributes.length == selectedOptionCount) {
|
||||
priceLabelElement.style.display = 'none';
|
||||
|
||||
if (regularPriceElement) {
|
||||
regularPriceElement.style.display = 'none';
|
||||
}
|
||||
|
||||
priceElement.innerHTML = this.config.variant_prices[this.simpleProduct].final_price.formated_price;
|
||||
|
||||
if (regularPriceElement && this.config.variant_prices[this.simpleProduct].final_price.price < this.config.variant_prices[this.simpleProduct].regular_price.price) {
|
||||
regularPriceElement.innerHTML = this.config.variant_prices[this.simpleProduct].regular_price.formated_price;
|
||||
regularPriceElement.style.display = 'inline-block';
|
||||
}
|
||||
|
||||
eventBus.$emit('configurable-variant-selected-event', this.simpleProduct)
|
||||
} else {
|
||||
priceLabelElement.style.display = 'inline-block';
|
||||
|
||||
priceElement.innerHTML = this.config.regular_price.formated_price;
|
||||
|
||||
eventBus.$emit('configurable-variant-selected-event', 0)
|
||||
}
|
||||
},
|
||||
|
||||
changeProductImages: function () {
|
||||
galleryImages.splice(0, galleryImages.length)
|
||||
|
||||
if (this.simpleProduct) {
|
||||
this.config.variant_images[this.simpleProduct].forEach(function(image) {
|
||||
galleryImages.push(image)
|
||||
});
|
||||
|
||||
this.config.variant_videos[this.simpleProduct].forEach(function(video) {
|
||||
galleryImages.push(video)
|
||||
});
|
||||
}
|
||||
|
||||
this.galleryImages.forEach(function(image) {
|
||||
galleryImages.push(image)
|
||||
});
|
||||
},
|
||||
|
||||
changeStock: function (productId) {
|
||||
let inStockElement = document.querySelector('.stock-status');
|
||||
|
||||
if (productId) {
|
||||
inStockElement.style.display= "block";
|
||||
} else {
|
||||
inStockElement.style.display= "none";
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@endif
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
@foreach ($cart->items as $item)
|
||||
<?php
|
||||
$product = $item->product;
|
||||
|
||||
if ($product->cross_sells()->count()) {
|
||||
$products[] = $product;
|
||||
$products = array_unique($products);
|
||||
}
|
||||
?>
|
||||
@endforeach
|
||||
|
||||
@if (isset($products))
|
||||
|
||||
<div class="attached-products-wrapper mt-50">
|
||||
|
||||
<div class="title">
|
||||
{{ __('shop::app.products.cross-sell-title') }}
|
||||
<span class="border-bottom"></span>
|
||||
</div>
|
||||
|
||||
<div class="product-grid-4">
|
||||
@foreach($products as $product)
|
||||
|
||||
@foreach ($product->cross_sells()->paginate(2) as $cross_sell_product)
|
||||
|
||||
@include ('shop::products.list.card', ['product' => $cross_sell_product])
|
||||
|
||||
@endforeach
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
@if ($product->type == 'downloadable')
|
||||
{!! view_render_event('bagisto.shop.products.view.downloadable.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="downloadable-container">
|
||||
|
||||
@if ($product->downloadable_samples->count())
|
||||
<div class="sample-list">
|
||||
<h3>{{ __('shop::app.products.samples') }}</h3>
|
||||
|
||||
<ul>
|
||||
@foreach ($product->downloadable_samples as $sample)
|
||||
<li>
|
||||
<a href="{{ route('shop.downloadable.download_sample', ['type' => 'sample', 'id' => $sample->id]) }}" target="_blank">
|
||||
{{ $sample->title }}
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($product->downloadable_links->count())
|
||||
<div class="link-list control-group" :class="[errors.has('links[]') ? 'has-error' : '']">
|
||||
<h3 class="required">{{ __('shop::app.products.links') }}</h3>
|
||||
|
||||
<ul>
|
||||
@foreach ($product->downloadable_links as $link)
|
||||
<li>
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" name="links[]" v-validate="'required'" value="{{ $link->id }}" id="{{ $link->id }}" data-vv-as=""{{ __('shop::app.products.links') }}""/>
|
||||
<label class="checkbox-view" for="{{ $link->id }}"></label>
|
||||
{{ $link->title . ' + ' . core()->currency($link->price) }}
|
||||
</span>
|
||||
|
||||
@if (
|
||||
$link->sample_file
|
||||
|| $link->sample_url
|
||||
)
|
||||
<a href="{{ route('shop.downloadable.download_sample', ['type' => 'link', 'id' => $link->id]) }}" target="_blank">
|
||||
{{ __('shop::app.products.sample') }}
|
||||
</a>
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<span class="control-error" v-if="errors.has('links[]')">@{{ errors.first('links[]') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.downloadable.before', ['product' => $product]) !!}
|
||||
@endif
|
||||
|
|
@ -0,0 +1,226 @@
|
|||
@inject ('wishListHelper', 'Webkul\Customer\Helpers\Wishlist')
|
||||
|
||||
@php
|
||||
$images = productimage()->getGalleryImages($product);
|
||||
|
||||
$videos = productvideo()->getVideos($product);
|
||||
|
||||
$images = array_merge($images, $videos);
|
||||
@endphp
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.gallery.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="product-image-group">
|
||||
<div class="cp-spinner cp-round" id="loader"></div>
|
||||
|
||||
<product-gallery></product-gallery>
|
||||
|
||||
@include ('shop::products.view.product-add')
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.gallery.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="product-gallery-template">
|
||||
<div>
|
||||
<ul class="thumb-list">
|
||||
<li class="gallery-control top" @click="moveThumbs('top')" v-if="(thumbs.length > 4) && this.is_move.up">
|
||||
<span class="overlay"></span>
|
||||
|
||||
<i class="icon arrow-up-white-icon"></i>
|
||||
</li>
|
||||
|
||||
<li class="thumb-frame" v-for='(thumb, index) in thumbs' @mouseover="changeImage(thumb)" :class="[thumb.large_image_url == currentLargeImageUrl ? 'active' : '']" id="thumb-frame">
|
||||
<video v-if="thumb.type == 'video'" width="100%" height="100%" onclick="this.paused ? this.play() : this.pause();">
|
||||
<source :src="thumb.video_url" type="video/mp4">
|
||||
{{ __('admin::app.catalog.products.not-support-video') }}
|
||||
</video>
|
||||
|
||||
<img v-else :src="thumb.small_image_url" alt=""/>
|
||||
</li>
|
||||
|
||||
<li class="gallery-control bottom" @click="moveThumbs('bottom')" v-if="(thumbs.length > 4) && this.is_move.down">
|
||||
<span class="overlay"></span>
|
||||
|
||||
<i class="icon arrow-down-white-icon"></i>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="product-hero-image" id="product-hero-image">
|
||||
<video :key="currentVideoUrl" v-if="currentType == 'video'" width="100%" height="420" controls>
|
||||
<source :src="currentVideoUrl" :data-image="currentOriginalImageUrl" type="video/mp4">
|
||||
|
||||
{{ __('admin::app.catalog.products.not-support-video') }}
|
||||
</video>
|
||||
|
||||
<img v-else :src="currentLargeImageUrl" id="pro-img" :data-image="currentOriginalImageUrl" alt=""/>
|
||||
|
||||
@auth('customer')
|
||||
@php
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
@if ($showWishlist)
|
||||
<form id="wishlist-{{ $product->product_id }}" action="{{ route('customer.wishlist.add', $product->product_id) }}" method="POST">
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
<a
|
||||
@if ($wishListHelper->getWishlistProduct($product))
|
||||
class="add-to-wishlist already"
|
||||
@else
|
||||
class="add-to-wishlist"
|
||||
@endif
|
||||
href="javascript:void(0);"
|
||||
onclick="document.getElementById('wishlist-{{ $product->product_id }}').submit();">
|
||||
</a>
|
||||
@endif
|
||||
@endauth
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
let galleryImages = @json($images);
|
||||
|
||||
Vue.component('product-gallery', {
|
||||
|
||||
template: '#product-gallery-template',
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
images: galleryImages,
|
||||
|
||||
thumbs: [],
|
||||
|
||||
currentLargeImageUrl: '',
|
||||
|
||||
currentOriginalImageUrl: '',
|
||||
|
||||
currentVideoUrl: '',
|
||||
|
||||
currentType: '',
|
||||
|
||||
counter: {
|
||||
up: 0,
|
||||
down: 0,
|
||||
},
|
||||
|
||||
is_move: {
|
||||
up: true,
|
||||
down: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
'images': function(newVal, oldVal) {
|
||||
this.changeImage(this.images[0]);
|
||||
|
||||
this.prepareThumbs();
|
||||
}
|
||||
},
|
||||
|
||||
created: function() {
|
||||
this.changeImage(this.images[0]);
|
||||
|
||||
this.prepareThumbs();
|
||||
},
|
||||
|
||||
methods: {
|
||||
prepareThumbs: function() {
|
||||
let self = this;
|
||||
|
||||
self.thumbs = [];
|
||||
|
||||
this.images.forEach(function(image) {
|
||||
self.thumbs.push(image);
|
||||
});
|
||||
},
|
||||
|
||||
changeImage: function(image) {
|
||||
this.currentType = image.type;
|
||||
|
||||
if (image.type == 'video') {
|
||||
this.currentVideoUrl = image.video_url;
|
||||
|
||||
this.currentLargeImageUrl = image.large_image_url = image.video_url;
|
||||
} else {
|
||||
this.currentLargeImageUrl = image.large_image_url;
|
||||
|
||||
this.currentOriginalImageUrl = image.original_image_url;
|
||||
}
|
||||
|
||||
if ($(window).width() > 580 && image.original_image_url) {
|
||||
$('img#pro-img').data('zoom-image', image.original_image_url).ezPlus();
|
||||
}
|
||||
},
|
||||
|
||||
moveThumbs: function(direction) {
|
||||
let len = this.thumbs.length;
|
||||
|
||||
if (direction === "top") {
|
||||
const moveThumb = this.thumbs.splice(len - 1, 1);
|
||||
|
||||
this.thumbs = [moveThumb[0]].concat((this.thumbs));
|
||||
|
||||
this.counter.up = this.counter.up+1;
|
||||
|
||||
this.counter.down = this.counter.down-1;
|
||||
|
||||
} else {
|
||||
const moveThumb = this.thumbs.splice(0, 1);
|
||||
|
||||
this.thumbs = [].concat((this.thumbs), [moveThumb[0]]);
|
||||
|
||||
this.counter.down = this.counter.down+1;
|
||||
|
||||
this.counter.up = this.counter.up-1;
|
||||
}
|
||||
|
||||
if ((len-4) == this.counter.down) {
|
||||
this.is_move.down = false;
|
||||
} else {
|
||||
this.is_move.down = true;
|
||||
}
|
||||
|
||||
if ((len-4) == this.counter.up) {
|
||||
this.is_move.up = false;
|
||||
} else {
|
||||
this.is_move.up = true;
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
if ($(window).width() > 580) {
|
||||
$('img#pro-img').data('zoom-image', $('img#pro-img').data('image')).ezPlus();
|
||||
}
|
||||
|
||||
@if (auth()->guard('customer')->user())
|
||||
let wishlist = "{{ $wishListHelper->getWishlistProduct($product) ? 'true' : 'false' }}";
|
||||
|
||||
$(document).mousemove(function(event) {
|
||||
if ($('.add-to-wishlist').length || wishlist != 0) {
|
||||
if (event.pageX > $('.add-to-wishlist').offset().left && event.pageX < $('.add-to-wishlist').offset().left+32 && event.pageY > $('.add-to-wishlist').offset().top && event.pageY < $('.add-to-wishlist').offset().top+32) {
|
||||
|
||||
$(".zoomContainer").addClass("show-wishlist");
|
||||
|
||||
} else {
|
||||
$(".zoomContainer").removeClass("show-wishlist");
|
||||
}
|
||||
};
|
||||
|
||||
if ($("body").hasClass("rtl")) {
|
||||
$(".zoomWindow").addClass("zoom-image-direction");
|
||||
} else {
|
||||
$(".zoomWindow").removeClass("zoom-image-direction");
|
||||
}
|
||||
});
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
@if ($product->type == 'grouped')
|
||||
{!! view_render_event('bagisto.shop.products.view.grouped_products.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="grouped-product-container">
|
||||
@if ($product->groupedProductsBySortOrder->count())
|
||||
<div class="grouped-product-list">
|
||||
<ul>
|
||||
<li>
|
||||
<span>{{ __('shop::app.products.name') }}</span>
|
||||
<span>{{ __('shop::app.products.qty') }}</span>
|
||||
</li>
|
||||
@foreach ($product->groupedProductsBySortOrder as $groupedProduct)
|
||||
@if($groupedProduct->associated_product->getTypeInstance()->isSaleable())
|
||||
<li>
|
||||
<span class="name">
|
||||
{{ $groupedProduct->associated_product->name }}
|
||||
|
||||
@include ('shop::products.price', ['product' => $groupedProduct->associated_product])
|
||||
</span>
|
||||
|
||||
<span class="qty">
|
||||
<quantity-changer
|
||||
:control-name="'qty[{{$groupedProduct->associated_product_id}}]'"
|
||||
:validations="'required|numeric|min_value:0'"
|
||||
quantity="{{ $groupedProduct->qty }}"
|
||||
min-quantity="0">
|
||||
</quantity-changer>
|
||||
</span>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.grouped_products.before', ['product' => $product]) !!}
|
||||
@endif
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{!! view_render_event('bagisto.shop.products.view.product-add.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="add-to-buttons">
|
||||
@include ('shop::products.add-to-cart', ['product' => $product])
|
||||
|
||||
@if (core()->getConfigData('catalog.products.storefront.buy_now_button_display'))
|
||||
@include ('shop::products.buy-now')
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.product-add.after', ['product' => $product]) !!}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
$relatedProducts = $product->related_products()->get();
|
||||
?>
|
||||
|
||||
@if ($relatedProducts->count())
|
||||
<div class="attached-products-wrapper">
|
||||
|
||||
<div class="title">
|
||||
{{ __('shop::app.products.related-product-title') }}
|
||||
<span class="border-bottom"></span>
|
||||
</div>
|
||||
|
||||
<div class="product-grid-4">
|
||||
|
||||
@foreach ($relatedProducts as $related_product)
|
||||
|
||||
@include ('shop::products.list.card', ['product' => $related_product])
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue