This commit is contained in:
shubhammehrotra.symfony@webkul.com 2020-03-01 16:39:17 +05:30
parent 34f944f5aa
commit a750509948
8 changed files with 94 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
{
"/js/velocity.js": "/js/velocity.js?id=9535513b6ba4df921d8b",
"/css/velocity-admin.css": "/css/velocity-admin.css?id=612d35e452446366eef7",
"/css/velocity.css": "/css/velocity.css?id=5789b3188d072a70fa36"
"/css/velocity.css": "/css/velocity.css?id=0c3bbabfcb61f4640459"
}

View File

@ -355,6 +355,17 @@
}
}
.lg-card-container:hover {
.product-image {
overflow: hidden;
img {
transition: 0.5s all;
transform: scale(1.1);
}
}
}
.quantity {
@extend .btn-group;

View File

@ -462,6 +462,11 @@
&.vc-small-screen {
display: block !important;
}
+ .recently-viewed {
top: 0;
position: static;
}
}
.reviews-container {
@ -575,7 +580,7 @@
.filters-container {
left: 0px;
top: 40px;
top: 30px;
padding: 0;
width: 100%;
z-index: 9;
@ -629,9 +634,9 @@
.category-title {
width: 100%;
display: none;
display: table;
padding-left: 10px;
display: none;
margin : 13px 0px 13px 0px;
> i {
@ -681,9 +686,10 @@
li {
font-size: 16px;
padding: 10px 0px 10px 20px;
a {
padding: 10px 0px 10px 20px;
// padding: 10px 0px 10px 20px;
}
&:hover {

View File

@ -486,13 +486,19 @@
.wishlist-icon {
height: 40px;
display: table;
padding-left: 0 !important;
i {
display: table-cell;
vertical-align: middle;
padding-left: 0 !important;
}
}
.compare-icon {
padding-left: 0;
}
.add-to-cart-btn {
max-width: 150px;
}

View File

@ -140,11 +140,15 @@
<i class="material-icons">perm_identity</i>
<span>
@guest('customer')
<a class="unset" href="{{ route('customer.session.index') }}">
{{ __('velocity::app.responsive.header.greeting', ['customer' => 'Guest']) }}
</a>
@endguest
@auth('customer')
{{ __('velocity::app.responsive.header.greeting', ['customer' => auth()->guard('customer')->user()->first_name]) }}
<a class="unset" href="{{ route('customer.profile.index') }}">
{{ __('velocity::app.responsive.header.greeting', ['customer' => auth()->guard('customer')->user()->first_name]) }}
</a>
@endauth
<i
class="material-icons pull-right"
@ -189,7 +193,7 @@
</ul>
<ul type="none" class="category-wrapper">
<li v-for="(category, index) in JSON.parse(rootCategories)">
<li v-for="(category, index) in $root.sharedRootCategories">
<a
class="unset"
:href="`${$root.baseUrl}/${category.slug}`">
@ -263,10 +267,10 @@
<img
class="language-logo"
src="{{ asset('/storage/' . $locale->locale_image) }}" />
@else
@elseif ($locale->code == "en")
<img
class="language-logo"
src="{{ asset($locale->locale_image) }}" />
src="{{ asset('/themes/velocity/assets/images/flags/en.png') }}" />
@endif
</div>
<span>{{ $locale->name }}</span>
@ -682,7 +686,7 @@
} else {
event.preventDefault();
let categories = this.sharedRootCategories;
let categories = this.$root.sharedRootCategories;
this.rootCategories = false;
this.subCategory = categories[index];
}

View File

@ -65,6 +65,7 @@
<div class="cart-wish-wrap mt5">
@include ('shop::products.add-to-cart', [
'product' => $product,
'showCompare' => true,
'addWishlistClass' => 'pl10',
'addToCartBtnClass' => 'medium-padding'
])
@ -120,6 +121,7 @@
@include ('shop::products.add-to-cart', [
'product' => $product,
'addWishlistClass' => 'col-lg-4 col-md-4 col-sm-12 offset-lg-4 pr0',
'showCompare' => true,
'addToCartBtnClass' => $addToCartBtnClass ?? '',
'btnText' => $btnText ?? null
])

View File

@ -2,12 +2,21 @@
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
@inject ('customHelper', 'Webkul\Velocity\Helpers\Helper')
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
@php
$total = $reviewHelper->getTotalReviews($product);
$avgRatings = $reviewHelper->getAverageRating($product);
$avgStarRating = ceil($avgRatings);
$productImages = [];
$images = $productImageHelper->getGalleryImages($product);
foreach ($images as $key => $image) {
array_push($productImages, $image['medium_image_url']);
}
@endphp
@section('page_title')
@ -163,10 +172,25 @@
@endsection
@push('scripts')
<script type='text/javascript' src='https://unpkg.com/spritespin@x.x.x/release/spritespin.js'></script>
<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>
{{-- <button type="button" class="theme-btn" @click="open360View" style="position: absolute;">360 view</button> --}}
<slot v-if="slot"></slot>
<div v-else>
@foreach ($productImages as $image)
<img src="{{ $image }}" />
@endforeach
<div class="spritespin"></div>
<input class="spritespin-slider" type="range">
</div>
</form>
</script>
@ -176,6 +200,7 @@
template: '#product-view-template',
data: function() {
return {
slot: true,
is_buy_now: 0,
}
},
@ -229,6 +254,35 @@
}, 0);
}
});
},
open360View: function () {
this.slot = false;
$(function() {
$('.spritespin').spritespin({
source: SpriteSpin.sourceArray('{{ $productImages[0] }}', {frame: [1,3], digits: 3}),
width: 480,
height: 327,
sense: 1,
animate: false,
plugins: [
'360'
],
onFrame: function(e, data) {
$('.spritespin-slider').val(data.frame)
},
onInit: function(e, data) {
$('.spritespin-slider')
.attr("min", 0)
.attr("max", data.source.length - 1)
.attr("value", 0)
.on("input", function(e) {
SpriteSpin.updateFrame(data, e.target.value);
})
}
});
});
}
}
});