Merge branch 'master' into issue-4178

This commit is contained in:
devansh bawari 2020-10-30 16:34:20 +05:30
commit 6ee60ad355
42 changed files with 591 additions and 177 deletions

View File

@ -12,11 +12,15 @@ class CartRuleCouponDataGrid extends DataGrid
protected $sortOrder = 'desc';
public function prepareQueryBuilder()
{
$queryBuilder = DB::table('cart_rule_coupons')
->addSelect('id', 'code', 'created_at', 'expired_at', 'times_used')
->where('cart_rule_coupons.cart_rule_id', collect(request()->segments())->last());
{
$route = request()->route() ? request()->route()->getName() : "" ;
$cartRuleId = $route == 'admin.cart-rules.edit' ? collect(request()->segments())->last() : last(explode("/", url()->previous()));
$queryBuilder = DB::table('cart_rule_coupons')
->addSelect('id', 'code', 'created_at', 'expired_at', 'times_used')
->where('cart_rule_coupons.cart_rule_id', $cartRuleId);
$this->setQueryBuilder($queryBuilder);
}

View File

@ -16,6 +16,7 @@ class ExportController extends Controller
'TaxRateDataGrid',
'ProductDataGrid',
'CMSPageDataGrid',
'CartRuleCouponDataGrid'
];
/**

View File

@ -457,12 +457,38 @@
</form>
<div class="content">
<div class="page-header">
<div class="page-action">
<div class="export-import" @click="showModal('downloadDataGrid')">
<i class="export-icon"></i>
<span >
{{ __('admin::app.export.export') }}
</span>
</div>
</div>
</div>
</div>
<modal id="downloadDataGrid" :is-open="this.$root.modalIds.downloadDataGrid">
<h3 slot="header">{{ __('admin::app.export.download') }}</h3>
<div slot="body">
<export-form></export-form>
</div>
</modal>
@inject('cartRuleCouponGrid','Webkul\Admin\DataGrids\CartRuleCouponDataGrid')
{!! $cartRuleCouponGrid->render() !!}
</div>
</script>
@push('scripts')
@include('admin::export.export', ['gridName' => $cartRuleCouponGrid])
@endpush
<script>
Vue.component('cart-rule', {
@ -754,7 +780,11 @@
})
}
});
}
},
showModal(id) {
this.$root.$set(this.$root.modalIds, id, true);
},
}
});
</script>

View File

@ -454,8 +454,14 @@
<tr class="bold">
<td>{{ __('admin::app.sales.orders.total-due') }}</td>
<td>-</td>
<td>{{ core()->formatBasePrice($order->base_total_due) }}</td>
@if($order->status !== 'canceled')
<td>{{ core()->formatBasePrice($order->base_total_due) }}</td>
@else
<td id="due-amount-on-cancelled">{{ core()->formatBasePrice(0.00) }}</td>
@endif
</tr>
</table>
</div>

View File

@ -12,8 +12,13 @@ return [
'type' => 'boolean',
'locale_based' => true,
'channel_based' => true,
],
[
], [
'name' => 'wishlist_option',
'title' => 'shop::app.products.wishlist-options',
'type' => 'boolean',
'locale_based' => true,
'channel_based' => true,
], [
'name' => 'image_search',
'title' => 'shop::app.search.image-search-option',
'type' => 'boolean',

View File

@ -441,6 +441,7 @@ return [
'available-for-order' => 'متوفر لطلب الشراء',
'settings' => 'Settings',
'compare_options' => 'قارن الخيارات',
'wishlist-options' => 'Wishlist Options'
],
// 'reviews' => [

View File

@ -438,6 +438,7 @@ return [
'available' => 'Verfügbar',
'settings' => 'Settings',
'compare_options' => 'Compare Options',
'wishlist-options' => 'Wishlist Options'
],
// 'reviews' => [

View File

@ -441,6 +441,7 @@ return [
'available-for-order' => 'Available for Order',
'settings' => 'Settings',
'compare_options' => 'Compare Options',
'wishlist-options' => 'Wishlist Options'
],
// 'reviews' => [

View File

@ -411,6 +411,7 @@ return [
'available-for-order' => 'Disponible para ordenar',
'settings' => 'Settings',
'compare_options' => 'Compare Options',
'wishlist-options' => 'Wishlist Options'
],
// 'reviews' => [

View File

@ -440,6 +440,7 @@ return [
'available-for-order' => 'Available for Order',
'settings' => 'Settings',
'compare_options' => 'Compare Options',
'wishlist-options' => 'Wishlist Options'
],
// 'reviews' => [

View File

@ -438,6 +438,7 @@ return [
'available-for-order' => 'Disponibile per lordine',
'settings' => 'Settings',
'compare_options' => 'Compare Options',
'wishlist-options' => 'Wishlist Options'
],
// 'reviews' => [

View File

@ -407,6 +407,7 @@ return [
'available-for-order' => '注文可能',
'settings' => 'Settings',
'compare_options' => 'Compare Options',
'wishlist-options' => 'Wishlist Options'
],
'buynow' => [

View File

@ -445,6 +445,7 @@ return [
'available-for-order' => 'Beschikbaar voor bestelling',
'settings' => 'Settings',
'compare_options' => 'Compare Options',
'wishlist-options' => 'Wishlist Options'
],
// 'reviews' => [

View File

@ -438,6 +438,7 @@ return [
'available-for-order' => 'Dostępne na zamówienie',
'settings' => 'Settings',
'compare_options' => 'Compare Options',
'wishlist-options' => 'Wishlist Options'
],
// 'reviews' => [

View File

@ -428,6 +428,7 @@ return [
'available-for-order' => 'Disponível para encomenda',
'settings' => 'Settings',
'compare_options' => 'Compare Options',
'wishlist-options' => 'Wishlist Options'
],
// 'reviews' => [

View File

@ -438,6 +438,7 @@ return [
'available-for-order' => 'Sipariş İçin Uygun',
'settings' => 'Settings',
'compare_options' => 'Compare Options',
'wishlist-options' => 'Wishlist Options'
],
// 'reviews' => [

View File

@ -87,13 +87,19 @@
<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')
<span class="towishlist">
@if ($item->parent_id != 'null' ||$item->parent_id != null)
<a href="{{ route('shop.movetowishlist', $item->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
@else
<a href="{{ route('shop.movetowishlist', $item->child->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
@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="{{ route('shop.movetowishlist', $item->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
@else
<a href="{{ route('shop.movetowishlist', $item->child->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
@endif
</span>
@endif
</span>
@endauth
</div>

View File

@ -194,8 +194,14 @@
<tr class="bold">
<td>{{ __('shop::app.customer.account.order.view.total-due') }}</td>
<td>-</td>
<td>{{ core()->formatPrice($order->total_due, $order->order_currency_code) }}</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>

View File

@ -11,6 +11,8 @@
<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)
@ -19,6 +21,12 @@
@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'] }}">

View File

@ -150,6 +150,10 @@
@endguest
@auth('customer')
@php
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
@endphp
<ul class="dropdown-list account customer">
<li>
<div>
@ -163,9 +167,11 @@
<a href="{{ route('customer.profile.index') }}">{{ __('shop::app.header.profile') }}</a>
</li>
<li>
<a href="{{ route('customer.wishlist.index') }}">{{ __('shop::app.header.wishlist') }}</a>
</li>
@if ($showWishlist)
<li>
<a href="{{ route('customer.wishlist.index') }}">{{ __('shop::app.header.wishlist') }}</a>
</li>
@endif
<li>
<a href="{{ route('shop.checkout.cart.index') }}">{{ __('shop::app.header.cart') }}</a>
@ -391,4 +397,4 @@
}
});
</script>
@endpush
@endpush

View File

@ -1,5 +1,7 @@
@php
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false
$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="cart-wish-wrap">
@ -10,8 +12,10 @@
<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>
@include('shop::products.wishlist')
@if ($showWishlist)
@include('shop::products.wishlist')
@endif
@if ($showCompare)
@include('shop::products.compare', [
'productId' => $product->id

View File

@ -39,12 +39,20 @@
</li>
</ul>
<div class="product-hero-image" id="product-hero-image">
<img :src="currentLargeImageUrl" id="pro-img" :data-image="currentOriginalImageUrl" alt=""/>
@auth('customer')
<a @if ($wishListHelper->getWishlistProduct($product)) class="add-to-wishlist already" @else class="add-to-wishlist" @endif href="{{ route('customer.wishlist.add', $product->product_id) }}">
</a>
@php
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
@endphp
@if ($showWishlist)
<a @if ($wishListHelper->getWishlistProduct($product)) class="add-to-wishlist already" @else class="add-to-wishlist" @endif href="{{ route('customer.wishlist.add', $product->product_id) }}">
</a>
@endif
@endauth
</div>

View File

@ -479,6 +479,146 @@ abstract class DataGrid
$filter_value
);
}
} elseif ($columnType === 'boolean') {
if ($this->enableFilterMap && isset($this->filterMap[$columnName])) {
if ($this->operators[$condition] == '=') {
if ($filter_value == 1) {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$this->filterMap[$columnName],
$this->operators[$condition],
$filter_value
)->orWhereNotNull($this->filterMap[$columnName]);
});
} else {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$this->filterMap[$columnName],
$this->operators[$condition],
$filter_value
)->orWhereNull($this->filterMap[$columnName]);
});
}
} elseif ($this->operators[$condition] == '<>') {
if ($filter_value == 1) {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$this->filterMap[$columnName],
$this->operators[$condition],
$filter_value
)->orWhereNull($this->filterMap[$columnName]);
});
} else {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$this->filterMap[$columnName],
$this->operators[$condition],
$filter_value
)->orWhereNotNull($this->filterMap[$columnName]);
});
}
} else {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$this->filterMap[$columnName],
$this->operators[$condition],
$filter_value
);
});
}
} elseif ($this->enableFilterMap && ! isset($this->filterMap[$columnName])) {
if ($this->operators[$condition] == '=') {
if ($filter_value == 1) {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$columnName,
$this->operators[$condition],
$filter_value
)->orWhereNotNull($this->filterMap[$columnName]);
});
} else {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$columnName,
$this->operators[$condition],
$filter_value
)->orWhereNull($this->filterMap[$columnName]);
});
}
} elseif ($this->operators[$condition] == '<>') {
if ($filter_value == 1) {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$columnName,
$this->operators[$condition],
$filter_value
)->orWhereNull($this->filterMap[$columnName]);
});
} else {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$columnName,
$this->operators[$condition],
$filter_value
)->orWhereNotNull($this->filterMap[$columnName]);
});
}
} else {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$columnName,
$this->operators[$condition],
$filter_value
);
});
}
} else {
if ($this->operators[$condition] == '=') {
if ($filter_value == 1) {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$columnName,
$this->operators[$condition],
$filter_value
)->orWhereNotNull($this->filterMap[$columnName]);
});
} else {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$columnName,
$this->operators[$condition],
$filter_value
)->orWhereNull($this->filterMap[$columnName]);
});
}
} elseif ($this->operators[$condition] == '<>') {
if ($filter_value == 1) {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$columnName,
$this->operators[$condition],
$filter_value
)->orWhereNull($this->filterMap[$columnName]);
});
} else {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$columnName,
$this->operators[$condition],
$filter_value
)->orWhereNotNull($this->filterMap[$columnName]);
});
}
} else {
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
$query->where(
$columnName,
$this->operators[$condition],
$filter_value
);
});
}
}
} else {
if ($this->enableFilterMap && isset($this->filterMap[$columnName])) {
$collection->where(

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
{
"/js/velocity.js": "/js/velocity.js?id=ec2fcac08b9c220c4ec6",
"/js/velocity.js": "/js/velocity.js?id=d8c35e4b86332dde5ebb",
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
"/css/velocity.css": "/css/velocity.css?id=fe0d7f88080f3084ab9c"
"/css/velocity.css": "/css/velocity.css?id=e454953a6e8dd17fecdb"
}

View File

@ -132,6 +132,104 @@ class VelocityMetaDataSeeder extends Seeder
'updated_at' => $now,
],
//Wishlist show config data
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'en',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'fr',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'ar',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'de',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'es',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'fa',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'it',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'ja',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'nl',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'pl',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'pt_BR',
'created_at' => $now,
'updated_at' => $now,
],
[
'code' => 'general.content.shop.wishlist_option',
'value' => '1',
'channel_code' => 'default',
'locale_code' => 'tr',
'created_at' => $now,
'updated_at' => $now,
],
/* Image search core config data starts here */
[
'code' => 'general.content.shop.image_search',
@ -232,4 +330,4 @@ class VelocityMetaDataSeeder extends Seeder
/* Image search core config data ends here */
]);
}
}
}

View File

@ -1,5 +1,5 @@
<template>
<div class="magnifier col-12 text-center no-padding">
<div class="magnifier">
<img
:src="src"
:data-zoom-image="src"

View File

@ -241,7 +241,7 @@
img {
width: 100%;
height: 190px;
height: auto;
max-height: 190px;
}
}

View File

@ -2,7 +2,25 @@
display: none !important;
}
/* large devices */
@media only screen and (max-width: 1192px) {
.sticky-header {
display: block !important;
}
.vc-full-screen {
display: block !important;
}
.vc-small-screen {
display: none !important;
}
#main-category {
display: block !important;
}
.footer {
.footer-content {
.newsletter-subscription {
@ -30,6 +48,7 @@
}
}
/* medium devices */
@media only screen and (max-width: 992px) {
$header-height: 50px;
@ -41,14 +60,33 @@
}
}
.main-container-wrapper {
// position: relative;
#webheader {
display: none !important;
position: fixed;
background-color: $white-color;
}
#main-category {
display: none !important;
}
#home-right-bar-container {
position: relative;
top: -48px;
}
.vc-full-screen {
display: none !important;
}
.vc-small-screen {
display: block !important;
}
.force-center {
margin: 0 auto !important;
}
.main-content-wrapper {
z-index: 100;
margin-bottom: 25px;
@ -444,6 +482,7 @@
}
#search-form {
background: transparent;
width: 100%;
.selectdiv {
@ -496,16 +535,11 @@
margin-bottom: 10px;
}
.main-product-image {
display: none;
}
.product-detail {
#product-form {
.form-container {
.left {
top: 0px;
padding: 0px;
position: relative;
margin-bottom: 20px;
@ -513,10 +547,6 @@
width: 100%;
}
}
.right {
padding: 0px;
}
}
}
@ -959,7 +989,17 @@
}
}
/* small devices */
@media only screen and (max-width: 768px) {
.sticky-header {
display: none !important;
}
#home-right-bar-container {
position: unset;
top: unset;
}
.modal-container {
left: 10%;
max-width: 80%;
@ -1019,3 +1059,15 @@
display: none;
}
}
/* very small devices */
@media only screen and (max-width: 320px) {
.sticky-header {
display: none !important;
}
#home-right-bar-container {
position: unset;
top: unset;
}
}

View File

@ -1,7 +1,7 @@
@push('scripts')
<script type="text/x-template" id="content-header-template">
<header class="row velocity-divide-page vc-header header-shadow active">
<div class="vc-small-screen container" v-if="isMobile()">
<div class="vc-small-screen container">
<div class="row">
<div class="col-6">
<div v-if="hamburger" class="nav-container scrollable">
@ -370,7 +370,7 @@
</div>
<div
v-else
id="main-category"
@mouseout="toggleSidebar('0', $event, 'mouseout')"
@mouseover="toggleSidebar('0', $event, 'mouseover')"
:class="`main-category fs16 unselectable fw6 ${($root.sharedRootCategories.length > 0) ? 'cursor-pointer' : 'cursor-not-allowed'} left`">

View File

@ -76,7 +76,7 @@
class="btn-toolbar full-width"
role="toolbar">
<div class="btn-group full-width">
<div class="btn-group full-width force-center">
<div class="selectdiv">
<select class="form-control fs13 styled-select" name="category" @change="focusInput($event)" aria-label="Category">
<option value="">
@ -124,13 +124,16 @@
</div>
</div>
<div class="col-lg-7 col-md-12">
<div class="col-lg-7 col-md-12 vc-full-screen">
{!! view_render_event('bagisto.shop.layout.header.cart-item.before') !!}
@include('shop::checkout.cart.mini-cart')
{!! view_render_event('bagisto.shop.layout.header.cart-item.after') !!}
@php
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
@endphp
{!! view_render_event('bagisto.shop.layout.header.compare.before') !!}
@ -156,13 +159,15 @@
{!! view_render_event('bagisto.shop.layout.header.compare.after') !!}
{!! view_render_event('bagisto.shop.layout.header.wishlist.before') !!}
<a class="wishlist-btn unset" :href="`{{ route('customer.wishlist.index') }}`">
<i class="material-icons">favorite_border</i>
<div class="badge-container" v-if="wishlistCount > 0">
<span class="badge" v-text="wishlistCount"></span>
</div>
<span>{{ __('shop::app.layouts.wishlist') }}</span>
</a>
@if($showWishlist)
<a class="wishlist-btn unset" :href="`{{ route('customer.wishlist.index') }}`">
<i class="material-icons">favorite_border</i>
<div class="badge-container" v-if="wishlistCount > 0">
<span class="badge" v-text="wishlistCount"></span>
</div>
<span>{{ __('shop::app.layouts.wishlist') }}</span>
</a>
@endif
{!! view_render_event('bagisto.shop.layout.header.wishlist.after') !!}
</div>
</div>

View File

@ -118,24 +118,28 @@
@php
$moveToWishlist = trans('shop::app.checkout.cart.move-to-wishlist');
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
@endphp
<div class="no-padding col-12 cursor-pointer fs16">
@auth('customer')
@if ($item->parent_id != 'null' ||$item->parent_id != null)
<div @click="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')" class="alert-wishlist">
@include('shop::products.wishlist', [
'route' => route('shop.movetowishlist', $item->id),
'text' => "<span class='align-vertical-super'>$moveToWishlist</span>"
])
</div>
@else
<div @click="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')" class="alert-wishlist">
@include('shop::products.wishlist', [
'route' => route('shop.movetowishlist', $item->child->id),
'text' => "<span class='align-vertical-super'>$moveToWishlist</span>"
])
</div>
@if ($showWishlist)
@if ($item->parent_id != 'null' ||$item->parent_id != null)
<div @click="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')" class="alert-wishlist">
@include('shop::products.wishlist', [
'route' => route('shop.movetowishlist', $item->id),
'text' => "<span class='align-vertical-super'>$moveToWishlist</span>"
])
</div>
@else
<div @click="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')" class="alert-wishlist">
@include('shop::products.wishlist', [
'route' => route('shop.movetowishlist', $item->child->id),
'text' => "<span class='align-vertical-super'>$moveToWishlist</span>"
])
</div>
@endif
@endif
@endauth

View File

@ -208,7 +208,12 @@
<td>{{ __('shop::app.customer.account.order.view.total-due') }}
<span class="dash-icon">-</span>
</td>
<td>{{ core()->formatPrice($order->total_due, $order->order_currency_code) }}</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>

View File

@ -15,11 +15,16 @@
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
try {
$subMenuCollection['profile'] = $menuItem['children']['profile'];
$subMenuCollection['orders'] = $menuItem['children']['orders'];
$subMenuCollection['downloadables'] = $menuItem['children']['downloadables'];
$subMenuCollection['wishlist'] = $menuItem['children']['wishlist'];
if ($showWishlist) {
$subMenuCollection['wishlist'] = $menuItem['children']['wishlist'];
}
if ($showCompare) {
$subMenuCollection['compare'] = $menuItem['children']['compare'];
@ -66,4 +71,4 @@
min-height: 100vh;
}
</style>
@endpush
@endpush

View File

@ -9,13 +9,13 @@
@push('scripts')
<script type="text/x-template" id="featured-products-template">
<div class="container-fluid featured-products">
<shimmer-component v-if="isLoading && !isMobileView"></shimmer-component>
<shimmer-component v-if="isLoading"></shimmer-component>
<template v-else-if="featuredProducts.length > 0">
<card-list-header heading="{{ __('shop::app.home.featured-products') }}">
</card-list-header>
<div class="carousel-products vc-full-screen {{ $direction }}" v-if="!isMobileView">
<div class="carousel-products vc-full-screen {{ $direction }}">
<carousel-component
slides-per-page="6"
navigation-enabled="hide"
@ -37,7 +37,7 @@
</carousel-component>
</div>
<div class="carousel-products vc-small-screen {{ $direction }}" v-else>
<div class="carousel-products vc-small-screen {{ $direction }}">
<carousel-component
slides-per-page="2"
navigation-enabled="hide"

View File

@ -9,7 +9,7 @@
@push('scripts')
<script type="text/x-template" id="new-products-template">
<div class="container-fluid">
<shimmer-component v-if="isLoading && !isMobileView"></shimmer-component>
<shimmer-component v-if="isLoading"></shimmer-component>
<template v-else-if="newProducts.length > 0">
<card-list-header heading="{{ __('shop::app.home.new-products') }}">
@ -27,7 +27,7 @@
@endpush
<div class="row {{ $direction }}">
<div class="col-9 no-padding carousel-products vc-full-screen with-recent-viewed" v-if="!isMobileView">
<div class="col-9 no-padding carousel-products vc-full-screen with-recent-viewed">
<carousel-component
slides-per-page="5"
navigation-enabled="hide"
@ -48,7 +48,7 @@
</carousel-component>
</div>
<div class="col-12 no-padding carousel-products vc-small-screen" v-else>
<div class="col-12 no-padding carousel-products vc-small-screen">
<carousel-component
slides-per-page="2"
navigation-enabled="hide"
@ -75,7 +75,7 @@
])
</div>
@else
<div class="carousel-products vc-full-screen {{ $direction }}" v-if="!isMobileView">
<div class="carousel-products vc-full-screen {{ $direction }}">
<carousel-component
slides-per-page="6"
navigation-enabled="hide"
@ -96,7 +96,7 @@
</carousel-component>
</div>
<div class="carousel-products vc-small-screen {{ $direction }}" v-else>
<div class="carousel-products vc-small-screen {{ $direction }}">
<carousel-component
slides-per-page="2"
navigation-enabled="hide"

View File

@ -1,4 +1,4 @@
<header class="sticky-header" v-if="!isMobile()">
<header class="sticky-header">
<div class="row remove-padding-margin velocity-divide-page">
<logo-component add-class="navbar-brand"></logo-component>
<searchbar-component></searchbar-component>

View File

@ -83,14 +83,18 @@
<a href="{{ route('customer.orders.index') }}" class="unset">{{ __('velocity::app.shop.general.orders') }}</a>
</li>
<li>
<a href="{{ route('customer.wishlist.index') }}" class="unset">{{ __('shop::app.header.wishlist') }}</a>
</li>
@php
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
@endphp
@if ($showWishlist)
<li>
<a href="{{ route('customer.wishlist.index') }}" class="unset">{{ __('shop::app.header.wishlist') }}</a>
</li>
@endif
@if ($showCompare)
<li>
<a href="{{ route('velocity.customer.product.compare') }}" class="unset">{{ __('velocity::app.customer.compare.text') }}</a>

View File

@ -17,7 +17,7 @@
></compare-component>
@endif
@if (! (isset($showWishlist) && !$showWishlist))
@if (! (isset($showWishlist) && !$showWishlist) && core()->getConfigData('general.content.shop.wishlist_option'))
@include('shop::products.wishlist', [
'addClass' => $addWishlistClass ?? ''
])

View File

@ -87,94 +87,96 @@
<input type="hidden" name="product_id" value="{{ $product->product_id }}">
{{-- product-gallery --}}
<div class="left col-lg-5">
@include ('shop::products.view.gallery')
</div>
<div class="row">
{{-- product-gallery --}}
<div class="left col-lg-5 col-md-6">
@include ('shop::products.view.gallery')
</div>
{{-- right-section --}}
<div class="right col-lg-7">
{{-- product-info-section --}}
<div class="row info">
<h2 class="col-lg-12">{{ $product->name }}</h2>
{{-- right-section --}}
<div class="right col-lg-7 col-md-6">
{{-- product-info-section --}}
<div class="row info">
<h2 class="col-12">{{ $product->name }}</h2>
@if ($total)
<div class="reviews col-lg-12">
<star-ratings
push-class="mr5"
:ratings="{{ $avgStarRating }}"
></star-ratings>
@if ($total)
<div class="reviews col-lg-12">
<star-ratings
push-class="mr5"
:ratings="{{ $avgStarRating }}"
></star-ratings>
<div class="reviews">
<span>
{{ __('shop::app.reviews.ratingreviews', [
'rating' => $avgRatings,
'review' => $total])
}}
</span>
<div class="reviews">
<span>
{{ __('shop::app.reviews.ratingreviews', [
'rating' => $avgRatings,
'review' => $total])
}}
</span>
</div>
</div>
@endif
@include ('shop::products.view.stock', ['product' => $product])
<div class="col-12 price">
@include ('shop::products.price', ['product' => $product])
</div>
<div class="product-actions">
@include ('shop::products.add-to-cart', [
'form' => false,
'product' => $product,
'showCartIcon' => false,
'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1"
? true : false,
])
</div>
</div>
{!! view_render_event('bagisto.shop.products.view.short_description.before', ['product' => $product]) !!}
@if ($product->short_description)
<div class="description">
<h3 class="col-lg-12">{{ __('velocity::app.products.short-description') }}</h3>
{!! $product->short_description !!}
</div>
@endif
@include ('shop::products.view.stock', ['product' => $product])
{!! view_render_event('bagisto.shop.products.view.short_description.after', ['product' => $product]) !!}
<div class="col-12 price">
@include ('shop::products.price', ['product' => $product])
</div>
<div class="product-actions">
@include ('shop::products.add-to-cart', [
'form' => false,
'product' => $product,
'showCartIcon' => false,
'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1"
? true : false,
])
</div>
{!! view_render_event('bagisto.shop.products.view.quantity.before', ['product' => $product]) !!}
@if ($product->getTypeInstance()->showQuantityBox())
<div>
<quantity-changer></quantity-changer>
</div>
@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')
@include ('shop::products.view.attributes', [
'active' => true
])
{{-- product long description --}}
@include ('shop::products.view.description')
{{-- reviews count --}}
@include ('shop::products.view.reviews', ['accordian' => true])
</div>
{!! view_render_event('bagisto.shop.products.view.short_description.before', ['product' => $product]) !!}
@if ($product->short_description)
<div class="description">
<h3 class="col-lg-12">{{ __('velocity::app.products.short-description') }}</h3>
{!! $product->short_description !!}
</div>
@endif
{!! 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())
<div>
<quantity-changer></quantity-changer>
</div>
@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')
@include ('shop::products.view.attributes', [
'active' => true
])
{{-- product long description --}}
@include ('shop::products.view.description')
{{-- reviews count --}}
@include ('shop::products.view.reviews', ['accordian' => true])
</div>
</div>
</product-view>

View File

@ -12,20 +12,22 @@
{!! view_render_event('bagisto.shop.products.view.gallery.before', ['product' => $product]) !!}
<div class="product-image-group">
<div class="row col-12">
<magnify-image src="{{ $images[0]['large_image_url'] }}" v-if="!isMobile()">
</magnify-image>
<div class="row">
<div class="col-12">
<magnify-image src="{{ $images[0]['large_image_url'] }}" v-if="!isMobile()">
</magnify-image>
<img
v-else
class="vc-small-product-image"
src="{{ $images[0]['large_image_url'] }}" alt="" />
<img
v-else
class="vc-small-product-image"
src="{{ $images[0]['large_image_url'] }}" alt="" />
</div>
</div>
<div class="row col-12">
<product-gallery></product-gallery>
<div class="row">
<div class="col-12">
<product-gallery></product-gallery>
</div>
</div>
</div>
{!! view_render_event('bagisto.shop.products.view.gallery.after', ['product' => $product]) !!}
@ -156,7 +158,6 @@
<script>
$(document).ready(() => {
/* waiting for the window to appear */
let waitForEl = function(selector, callback) {
if (jQuery(selector).length) {
@ -168,8 +169,11 @@
/* positioning when .zoomWindow div available */
waitForEl('.zoomWindow', function() {
let zoomContainer = $('.zoomContainer');
zoomContainer.css('z-index', 'unset');
if ($('body').hasClass("rtl")) {
let widthOfImage = $('.zoomContainer').width();
let widthOfImage = zoomContainer.width();
$('.zoomWindow').css('right', `${widthOfImage}px`);
}
});