@@ -263,10 +267,10 @@
- @else
+ @elseif ($locale->code == "en")
+ src="{{ asset('/themes/velocity/assets/images/flags/en.png') }}" />
@endif
{{ $locale->name }}
@@ -682,7 +686,7 @@
} else {
event.preventDefault();
- let categories = this.sharedRootCategories;
+ let categories = this.$root.sharedRootCategories;
this.rootCategories = false;
this.subCategory = categories[index];
}
diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/products/list/card.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/products/list/card.blade.php
index 4ac623dce..bbb2a9503 100644
--- a/packages/Webkul/Velocity/src/Resources/views/shop/products/list/card.blade.php
+++ b/packages/Webkul/Velocity/src/Resources/views/shop/products/list/card.blade.php
@@ -65,6 +65,7 @@
@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
])
diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php
index f543830f9..c70289488 100644
--- a/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php
+++ b/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php
@@ -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')
+
+
@@ -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);
+ })
+ }
+ });
+ });
}
}
});