updates
This commit is contained in:
parent
a26abf09b1
commit
259537a000
|
|
@ -2,10 +2,11 @@
|
|||
|
||||
namespace Webkul\Core\Repositories;
|
||||
|
||||
use Illuminate\Container\Container as App;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Webkul\Core\Repositories\ChannelRepository;
|
||||
use Storage;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Container\Container as App;
|
||||
use Webkul\Core\Repositories\ChannelRepository;
|
||||
|
||||
/**
|
||||
* Slider Repository
|
||||
|
|
@ -54,6 +55,8 @@ class SliderRepository extends Repository
|
|||
*/
|
||||
public function save(array $data)
|
||||
{
|
||||
Event::fire('core.settings.slider.create.before', $id);
|
||||
|
||||
$channelName = $this->channelRepository->find($data['channel_id'])->name;
|
||||
|
||||
$dir = 'slider_images/' . $channelName;
|
||||
|
|
@ -82,7 +85,11 @@ class SliderRepository extends Repository
|
|||
unset($data['image']);
|
||||
}
|
||||
|
||||
return $this->create($data);
|
||||
$slider = $this->create($data);
|
||||
|
||||
Event::fire('core.settings.slider.create.after', $slider);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -91,6 +98,8 @@ class SliderRepository extends Repository
|
|||
*/
|
||||
public function updateItem(array $data, $id)
|
||||
{
|
||||
Event::fire('core.settings.slider.update.before', $id);
|
||||
|
||||
$channelName = $this->channelRepository->find($data['channel_id'])->name;
|
||||
|
||||
$dir = 'slider_images/' . $channelName;
|
||||
|
|
@ -119,7 +128,9 @@ class SliderRepository extends Repository
|
|||
unset($data['image']);
|
||||
}
|
||||
|
||||
$this->update($data, $id);
|
||||
$slider = $this->update($data, $id);
|
||||
|
||||
Event::fire('core.settings.slider.update.after', $slider);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class CartController extends Controller
|
|||
/**
|
||||
* Method to populate the cart page which will be populated before the checkout process.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
@else
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.quantity.after', ['product' => $product]) !!}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
@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">
|
||||
|
|
|
|||
|
|
@ -2618,8 +2618,10 @@ header #search-form > *:focus {
|
|||
/* product policy section */
|
||||
.product-policy-container .card {
|
||||
border: none;
|
||||
padding: 20px;
|
||||
padding: 20px 10px;
|
||||
background: #FFFFFF;
|
||||
-webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||
}
|
||||
|
||||
.product-policy-container .card .col-sm-10 {
|
||||
|
|
@ -2785,12 +2787,30 @@ header #search-form > *:focus {
|
|||
|
||||
/* hot & popular categories */
|
||||
/* Customer Reviews */
|
||||
.reviews-container .review-wrapper:nth-of-type(1) {
|
||||
padding: 0 8px 0 0;
|
||||
}
|
||||
|
||||
.reviews-container .review-wrapper {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.reviews-container .review-wrapper:nth-last-of-type(2) {
|
||||
padding: 0 0 0 8px;
|
||||
}
|
||||
|
||||
.reviews-container .review-wrapper:nth-last-of-type(1) {
|
||||
padding: 0 0 0 16px;
|
||||
}
|
||||
|
||||
.reviews-container .card {
|
||||
border: none;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
-webkit-box-shadow: 0 4px 17px 0 rgba(0, 0, 0, 0.11);
|
||||
box-shadow: 0 4px 17px 0 rgba(0, 0, 0, 0.11);
|
||||
}
|
||||
|
||||
.reviews-container .card .customer-info > div {
|
||||
|
|
@ -2809,9 +2829,9 @@ header #search-form > *:focus {
|
|||
|
||||
.reviews-container .card .review-info {
|
||||
height: 100%;
|
||||
padding: 20px 25px;
|
||||
-webkit-box-shadow: 0 6px 14px 0 rgba(0, 0, 0, 0.14);
|
||||
box-shadow: 0 6px 14px 0 rgba(0, 0, 0, 0.14);
|
||||
padding: 20px 15px;
|
||||
-webkit-box-shadow: 0 4px 17px 0 rgba(0, 0, 0, 0.11);
|
||||
box-shadow: 0 4px 17px 0 rgba(0, 0, 0, 0.11);
|
||||
}
|
||||
|
||||
.reviews-container .card .review-info > div:not(:last-child) {
|
||||
|
|
@ -4121,6 +4141,11 @@ button[disabled] {
|
|||
display: none;
|
||||
}
|
||||
|
||||
.product-detail .right .product-price span:nth-child(1),
|
||||
.product-detail .right .product-price .special-price {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.product-detail .thumb-list {
|
||||
left: 15px;
|
||||
z-index: 1000;
|
||||
|
|
|
|||
|
|
@ -1069,7 +1069,7 @@ module.exports = Cancel;
|
|||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(12);
|
||||
module.exports = __webpack_require__(72);
|
||||
module.exports = __webpack_require__(69);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
|
@ -35818,7 +35818,6 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||
props: ['id', 'addClass', 'slidesCount', 'slidesPerPage', 'navigationEnabled', 'paginationEnabled'],
|
||||
|
|
@ -36761,10 +36760,7 @@ if (false) {
|
|||
}
|
||||
|
||||
/***/ }),
|
||||
/* 69 */,
|
||||
/* 70 */,
|
||||
/* 71 */,
|
||||
/* 72 */
|
||||
/* 69 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddProductPolicy extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('velocity_meta_data', function (Blueprint $table) {
|
||||
$table->text('product_policy')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('velocity_meta_data', function (Blueprint $table) {
|
||||
$table->dropColumn('product_policy');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddBannerLink extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('sliders', function (Blueprint $table) {
|
||||
$table->text('slider_path')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('sliders', function (Blueprint $table) {
|
||||
$table->dropColumn('slider_path');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -22,7 +22,9 @@ class VelocityMetaDataSeeder extends Seeder
|
|||
|
||||
'slider' => 1,
|
||||
|
||||
'subscription_bar_content' => '<div class="social-icons col-lg-6"><i class="fs24 within-circle rango-facebook" title="facebook"></i> <i class="fs24 within-circle rango-twitter" title="twitter"></i> <i class="fs24 within-circle rango-linked-in" title="linkedin"></i> <i class="fs24 within-circle rango-pintrest" title="Pinterest"></i> <i class="fs24 within-circle rango-youtube" title="Youtube"></i> <i class="fs24 within-circle rango-instagram" title="instagram"></i></div>'
|
||||
'subscription_bar_content' => '<div class="social-icons col-lg-6"><i class="fs24 within-circle rango-facebook" title="facebook"></i> <i class="fs24 within-circle rango-twitter" title="twitter"></i> <i class="fs24 within-circle rango-linked-in" title="linkedin"></i> <i class="fs24 within-circle rango-pintrest" title="Pinterest"></i> <i class="fs24 within-circle rango-youtube" title="Youtube"></i> <i class="fs24 within-circle rango-instagram" title="instagram"></i></div>',
|
||||
|
||||
'product_policy' => '<div class="col-sm-4 col-xs-12 product-policy-wrapper"><div class="card"><div class="row"><div class="col-sm-2"><i class="rango-van-ship fs40"></i></div><div class="col-sm-10"><span class="font-setting fs20">Free Shippingon Order $20 or More</span></div></div></div></div><div class="col-sm-4 col-xs-12 product-policy-wrapper"><div class="card"><div class="row"><div class="col-sm-2"><i class="rango-exchnage fs40"></i></div><div class="col-sm-10"><span class="font-setting fs20">ProductReplace & Return Available </span></div></div></div></div><div class="col-sm-4 col-xs-12 product-policy-wrapper"><div class="card"><div class="row"><div class="col-sm-2"><i class="rango-exchnage fs40"></i></div><div class="col-sm-10"><span class="font-setting fs20">ProductExchange and EMI Available </span></div></div></div></div>',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,4 +54,12 @@ class AdminHelper
|
|||
|
||||
return $image;
|
||||
}
|
||||
|
||||
public function storeSliderDetails($slider)
|
||||
{
|
||||
$slider->slider_path = request()->get('slider_path');
|
||||
$slider->save();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ use DB;
|
|||
use Webkul\Product\Helpers\Review;
|
||||
use Webkul\Product\Models\Product as ProductModel;
|
||||
use Webkul\Velocity\Repositories\OrderBrandsRepository;
|
||||
use Webkul\Product\Repositories\ProductReviewRepository;
|
||||
use Webkul\Velocity\Repositories\VelocityMetadataRepository;
|
||||
use Webkul\Attribute\Repositories\AttributeOptionRepository;
|
||||
use Webkul\Product\Repositories\ProductRepository as ProductRepository;
|
||||
|
|
@ -40,6 +41,13 @@ class Helper extends Review
|
|||
*/
|
||||
protected $attributeOption;
|
||||
|
||||
/**
|
||||
* ProductReviewRepository object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $productReviewRepository;
|
||||
|
||||
/**
|
||||
* VelocityMetadata object
|
||||
*
|
||||
|
|
@ -48,16 +56,18 @@ class Helper extends Review
|
|||
protected $velocityMetadataRepository;
|
||||
|
||||
public function __construct(
|
||||
VelocityMetadataRepository $velocityMetadataRepository,
|
||||
OrderBrandsRepository $orderBrandsRepository,
|
||||
ProductRepository $productRepository,
|
||||
ProductModel $productModel,
|
||||
AttributeOptionRepository $attributeOption
|
||||
ProductRepository $productRepository,
|
||||
AttributeOptionRepository $attributeOption,
|
||||
OrderBrandsRepository $orderBrandsRepository,
|
||||
ProductReviewRepository $productReviewRepository,
|
||||
VelocityMetadataRepository $velocityMetadataRepository
|
||||
) {
|
||||
$this->productModel = $productModel;
|
||||
$this->attributeOption = $attributeOption;
|
||||
$this->productRepository = $productRepository;
|
||||
$this->orderBrandsRepository = $orderBrandsRepository;
|
||||
$this->productReviewRepository = $productReviewRepository;
|
||||
$this->velocityMetadataRepository = $velocityMetadataRepository;
|
||||
}
|
||||
|
||||
|
|
@ -125,10 +135,6 @@ class Helper extends Review
|
|||
}
|
||||
}
|
||||
|
||||
public function arrangeWithMaxBrandOrder($orderBrandData)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the count rating of the product
|
||||
*
|
||||
|
|
@ -177,5 +183,15 @@ class Helper extends Review
|
|||
} catch (\Exception $exception) {
|
||||
}
|
||||
}
|
||||
|
||||
public function getShopRecentReviews($reviewCount = 4)
|
||||
{
|
||||
$reviews = $this->productReviewRepository->getModel()
|
||||
->orderBy('id', 'desc')
|
||||
->where('status', 'approved')
|
||||
->take($reviewCount)->get();
|
||||
|
||||
return $reviews;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,11 @@ class EventServiceProvider extends ServiceProvider
|
|||
'catalog.category.update.after',
|
||||
], 'Webkul\Velocity\Helpers\AdminHelper@storeCategoryIcon');
|
||||
|
||||
Event::listen([
|
||||
'core.settings.slider.create.after',
|
||||
'core.settings.slider.update.after',
|
||||
], 'Webkul\Velocity\Helpers\AdminHelper@storeSliderDetails');
|
||||
|
||||
Event::listen('checkout.order.save.after', 'Webkul\Velocity\Helpers\Helper@topBrand');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,16 @@ class VelocityServiceProvider extends ServiceProvider
|
|||
}
|
||||
);
|
||||
|
||||
Event::listen([
|
||||
'bagisto.admin.settings.slider.edit.after',
|
||||
'bagisto.admin.settings.slider.create.after',
|
||||
], function($viewRenderEventManager) {
|
||||
$viewRenderEventManager->addTemplate(
|
||||
'velocity::admin.settings.sliders.velocity-slider'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'velocity');
|
||||
|
||||
$velocityHelper = app('Webkul\Velocity\Helpers\Helper');
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
v-for="index in slidesCount"
|
||||
:name="`slide-${parseInt(index) - 1}`">
|
||||
</slot>
|
||||
|
||||
</carousel>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -197,8 +197,9 @@ header #search-form > *:focus {
|
|||
.product-policy-container {
|
||||
.card {
|
||||
border: none;
|
||||
padding: 20px;
|
||||
background: #FFFFFF;
|
||||
padding: 20px 10px;
|
||||
background: $white-color;
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
|
||||
.col-sm-10 {
|
||||
line-height: 3.5rem;
|
||||
|
|
@ -386,12 +387,26 @@ header #search-form > *:focus {
|
|||
|
||||
/* Customer Reviews */
|
||||
.reviews-container {
|
||||
.review-wrapper:nth-of-type(1) {
|
||||
padding: 0 8px 0 0;
|
||||
}
|
||||
.review-wrapper {
|
||||
padding: 0 8px;
|
||||
}
|
||||
.review-wrapper:nth-last-of-type(2) {
|
||||
padding: 0 0 0 8px;
|
||||
}
|
||||
.review-wrapper:nth-last-of-type(1) {
|
||||
padding: 0 0 0 16px;
|
||||
}
|
||||
|
||||
.card {
|
||||
border: none;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
box-shadow: 0 4px 17px 0 rgba(0,0,0,0.11);
|
||||
|
||||
.customer-info {
|
||||
> div {
|
||||
|
|
@ -411,8 +426,8 @@ header #search-form > *:focus {
|
|||
|
||||
.review-info {
|
||||
height: 100%;
|
||||
padding: 20px 25px;
|
||||
box-shadow: 0 6px 14px 0 rgba(0, 0, 0, 0.14);
|
||||
padding: 20px 15px;
|
||||
box-shadow: 0 4px 17px 0 rgba(0,0,0,0.11);
|
||||
|
||||
> div:not(:last-child) {
|
||||
margin-bottom: 15px;
|
||||
|
|
|
|||
|
|
@ -156,6 +156,11 @@
|
|||
.sticker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
span:nth-child(1),
|
||||
.special-price {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,6 +104,8 @@ return [
|
|||
'advertisement-one' => 'Advertisement One Images',
|
||||
'product-view-image' => 'Product View Image',
|
||||
'footer' => 'Footer',
|
||||
'product-policy' => 'Product Policy',
|
||||
'slider-path' => 'Slider Path',
|
||||
],
|
||||
'category' => [
|
||||
'title' => 'Category Menu List',
|
||||
|
|
|
|||
|
|
@ -100,7 +100,16 @@
|
|||
</option>
|
||||
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->id }}">
|
||||
<option
|
||||
selected="selected"
|
||||
value="{{ $category->id }}"
|
||||
v-if="({{ $category->id }} == searchedQuery.category)">
|
||||
{{ $category->name }}
|
||||
</option>
|
||||
|
||||
<option
|
||||
v-else
|
||||
value="{{ $category->id }}">
|
||||
{{ $category->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
|
@ -109,11 +118,13 @@
|
|||
</div>
|
||||
|
||||
<div class="full-width">
|
||||
|
||||
<input
|
||||
required
|
||||
name="term"
|
||||
type="search"
|
||||
class="form-control"
|
||||
:value="searchedQuery.term"
|
||||
placeholder="{{ __('velocity::app.header.search-text') }}" />
|
||||
|
||||
<button class="btn" type="submit" id="header-search-icon">
|
||||
|
|
@ -316,7 +327,26 @@
|
|||
});
|
||||
|
||||
Vue.component('searchbar-component', {
|
||||
template: '#searchbar-template'
|
||||
template: '#searchbar-template',
|
||||
data: function () {
|
||||
return {
|
||||
searchedQuery: []
|
||||
}
|
||||
},
|
||||
|
||||
created: function () {
|
||||
let searchedItem = window.location.search.replace("?", "");
|
||||
searchedItem = searchedItem.split('&');
|
||||
|
||||
let updatedSearchedCollection = {};
|
||||
|
||||
searchedItem.forEach(item => {
|
||||
let splitedItem = item.split('=');
|
||||
updatedSearchedCollection[splitedItem[0]] = splitedItem[1];
|
||||
});
|
||||
|
||||
this.searchedQuery = updatedSearchedCollection;
|
||||
}
|
||||
})
|
||||
|
||||
Vue.component('content-header', {
|
||||
|
|
|
|||
|
|
@ -81,6 +81,18 @@
|
|||
{{ $metaData->home_page_content}}
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{ __('velocity::app.admin.meta-data.product-policy') }}</label>
|
||||
|
||||
<textarea
|
||||
class="control"
|
||||
id="product-policy"
|
||||
name="product_policy">
|
||||
{{ $metaData->product_policy}}
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
|
@ -186,7 +198,7 @@
|
|||
width: "100%",
|
||||
image_advtab: true,
|
||||
valid_elements : '*[*]',
|
||||
selector: 'textarea#home_page_content,textarea#footer_left_content,textarea#subscription_bar_content,textarea#footer_middle_content',
|
||||
selector: 'textarea#home_page_content,textarea#footer_left_content,textarea#subscription_bar_content,textarea#footer_middle_content,textarea#product-policy',
|
||||
plugins: 'image imagetools media wordcount save fullscreen code',
|
||||
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | code',
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<div class="control-group">
|
||||
<label>{{ __('velocity::app.admin.meta-data.slider-path') }}</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="control"
|
||||
name="slider_path"
|
||||
value="{{ (isset($slider) && $slider->slider_path) ? $slider->slider_path : '' }}" />
|
||||
</div>
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
@php
|
||||
$reviews = app('Webkul\Velocity\Helpers\Helper')->getShopRecentReviews(4);
|
||||
$reviewCount = count($reviews);
|
||||
@endphp
|
||||
|
||||
<div class="container-fluid reviews-container">
|
||||
@if ($reviewCount)
|
||||
<card-list-header
|
||||
heading="Customer Reviews"
|
||||
></card-list-header>
|
||||
|
||||
<div class="row">
|
||||
@foreach ($reviews as $key => $review)
|
||||
<div class="col-3 review-wrapper">
|
||||
<div class="card no-padding">
|
||||
<div class="review-info">
|
||||
<div class="customer-info">
|
||||
<div class="align-vertical-top">
|
||||
<span class="customer-name fs20 display-inbl">
|
||||
{{ strtoupper(substr( $review['name'], 0, 1 )) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="fs20 no-margin display-block">
|
||||
{{ $review['name'] }}
|
||||
</label>
|
||||
|
||||
<div class="product-info fs16">
|
||||
<span>Reviewed- <a class="remove-decoration link-color" href="{{ route('shop.productOrCategory.index', ['slug' => $review->product->url_key]) }}">{{$review['title']}}</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="star-ratings fs16">
|
||||
<star-ratings :ratings="{{ $review['rating'] }}"></star-ratings>
|
||||
</div>
|
||||
|
||||
<div class="review-description">
|
||||
<p class="review-content fs16">{{ $review['comment'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
(() => {
|
||||
$('.carousel-showmanymoveone .item').each(() => {
|
||||
var itemToClone = $(this);
|
||||
var i;
|
||||
for (i = 1; i < 4; i++ ) {
|
||||
itemToClone = itemToClone.next();
|
||||
|
||||
// wrap around if at end of item collection
|
||||
if (!itemToClone.length) {
|
||||
itemToClone = $(this).siblings(':first');
|
||||
}
|
||||
|
||||
// grab item, clone, add marker class, add to collection
|
||||
itemToClone.children(':first-child').clone()
|
||||
.addClass("cloneditem-"+(i))
|
||||
.appendTo($(this));
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.rango-arrow-left', () => {
|
||||
$('.prev-slider').click();
|
||||
});
|
||||
|
||||
$(document).on('click', '.rango-arrow-right', () => {
|
||||
$('.next-slider').click();
|
||||
});
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
@php
|
||||
$reviews = [
|
||||
[
|
||||
'name' => 'Shubham Mehrotra',
|
||||
'title' => 'Shubham Mehrotra',
|
||||
'rating' => 3,
|
||||
'comment' => 'I upgraded to the X from an iPhone 7, and this is a very big step forward for Apple.
|
||||
I was sceptical of the removal of the home button, and the notch on top of the screen but that scepticism lasted just a number of days before I was convinced this is a setup.',
|
||||
], [
|
||||
'name' => 'Shubham Mehrotra',
|
||||
'title' => 'Shubham Mehrotra',
|
||||
'rating' => 2,
|
||||
'comment' => 'Yes colgate total has been designed to be an every day toothpaste that you can use with braces, crowns and all other dental restorations.',
|
||||
], [
|
||||
'name' => 'Shubham Mehrotra',
|
||||
'title' => 'Shubham Mehrotra',
|
||||
'rating' => 5,
|
||||
'comment' => 'There are the ultimate suckers. These giys are fake. They don’t ship your product they manage the shipping details. They don’t have a proper customer service numbers. ',
|
||||
], [
|
||||
'name' => 'Shubham Mehrotra',
|
||||
'title' => 'Shubham Mehrotra',
|
||||
'rating' => 1,
|
||||
'comment' => 'I upgraded to the X from an iPhone 7, and this is a very big step forward for Apple.
|
||||
I was sceptical of the removal of the home button, and the notch on top of the screen but that scepticism lasted just a number of days before I was convinced this is a setup.',
|
||||
], [
|
||||
'name' => 'Shubham Mehrotra',
|
||||
'title' => 'Shubham Mehrotra',
|
||||
'rating' => 1,
|
||||
'comment' => 'I upgraded to the X from an iPhone 7, and this is a very big step forward for Apple.
|
||||
I was sceptical of the removal of the home button, and the notch on top of the screen but that scepticism lasted just a number of days before I was convinced this is a setup.',
|
||||
],
|
||||
];
|
||||
|
||||
$reviewCount = count($reviews);
|
||||
@endphp
|
||||
|
||||
|
||||
@push('css')
|
||||
<style>
|
||||
.example-slide {
|
||||
align-items: center;
|
||||
background-color: #666;
|
||||
color: #999;
|
||||
display: flex;
|
||||
font-size: 1.5rem;
|
||||
justify-content: center;
|
||||
min-height: 10rem;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
<div class="container-fluid reviews-container">
|
||||
|
||||
<card-list-header
|
||||
heading="Customer Reviews"
|
||||
></card-list-header>
|
||||
|
||||
<div class="row">
|
||||
<carousel-component :slides-count="{{ sizeof($reviews) }}" slides-per-page="4">
|
||||
@foreach ($reviews as $key => $review)
|
||||
<slide slot="slide-{{ $key }}">
|
||||
<div class="card">
|
||||
<div class="review-info">
|
||||
<div class="customer-info">
|
||||
<div class="align-vertical-top">
|
||||
<span
|
||||
class="customer-name fs20 display-inbl"
|
||||
>
|
||||
{{ strtoupper(substr( $review['name'], 0, 1 )) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="fs20 no-margin display-block">
|
||||
{{ $review['name'] }}
|
||||
</label>
|
||||
|
||||
<div class="product-info fs16 text-up-4.text-up {
|
||||
top: -6px;
|
||||
position: relative;
|
||||
}">
|
||||
<span>Reviewed- {{$review['title']}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="star-ratings fs16">
|
||||
|
||||
@php
|
||||
$rating = 5 - $review['rating'];
|
||||
@endphp
|
||||
|
||||
@for ($i = 0; $i < $review['rating'] ; $i++)
|
||||
<span>
|
||||
<i class="rango-star-fill"></i>
|
||||
</span>
|
||||
@endfor
|
||||
|
||||
@for ($i = 0; $i < $rating; $i++)
|
||||
<span>
|
||||
<i class="rango-star"></i>
|
||||
</span>
|
||||
@endfor
|
||||
|
||||
</div>
|
||||
|
||||
<div class="review-description">
|
||||
<p class="review-content fs16">{{ $review['comment'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</slide>
|
||||
@endforeach
|
||||
|
||||
</carousel-component>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
(() => {
|
||||
$('.carousel-showmanymoveone .item').each(() => {
|
||||
var itemToClone = $(this);
|
||||
var i;
|
||||
for (i = 1; i < 4; i++ ) {
|
||||
itemToClone = itemToClone.next();
|
||||
|
||||
// wrap around if at end of item collection
|
||||
if (!itemToClone.length) {
|
||||
itemToClone = $(this).siblings(':first');
|
||||
}
|
||||
|
||||
// grab item, clone, add marker class, add to collection
|
||||
itemToClone.children(':first-child').clone()
|
||||
.addClass("cloneditem-"+(i))
|
||||
.appendTo($(this));
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.rango-arrow-left', () => {
|
||||
$('.prev-slider').click();
|
||||
});
|
||||
|
||||
$(document).on('click', '.rango-arrow-right', () => {
|
||||
$('.next-slider').click();
|
||||
});
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<div class="container-fluid product-policy-container no-padding">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-4 col-xs-12 general-container">
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<i class="rango-van-ship fs40"></i>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<span class="font-setting fs20">Free Shipping on Order $20 or More</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 col-xs-12 general-container">
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<i class="rango-exchnage fs40"></i>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<span class="font-setting fs20">Product Replace & Return Available </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 col-xs-12 general-container">
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<i class="rango-exchnage fs40"></i>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<span class="font-setting fs20">Product Exchange and EMI Available </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<div class="container-fluid product-policy-container no-padding">
|
||||
<div class="row">
|
||||
{!! $velocityMetaData->product_policy !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -8,9 +8,11 @@
|
|||
@foreach ($sliderData as $index => $slider)
|
||||
|
||||
<slide slot="slide-{{ $index }}">
|
||||
<img
|
||||
class="col-12 no-padding banner-icon"
|
||||
src="{{ url()->to('/') . '/storage/' . $slider['path'] }}" />
|
||||
<a @if($slider['slider_path']) href="{{ $slider['slider_path'] }}" @endif>
|
||||
<img
|
||||
class="col-12 no-padding banner-icon"
|
||||
src="{{ url()->to('/') . '/storage/' . $slider['path'] }}" />
|
||||
</a>
|
||||
</slide>
|
||||
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -1,14 +1,7 @@
|
|||
{!! view_render_event('bagisto.shop.products.add_to_cart.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="col-4 add-to-cart-btn">
|
||||
<form
|
||||
method="POST"
|
||||
action="{{ route('cart.add', $product->product_id) }}">
|
||||
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="product_id" value="{{ $product->product_id }}">
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
@if (isset($form) && !$form)
|
||||
<button
|
||||
type="submit"
|
||||
{{ ! $product->isSaleable() ? 'disabled' : '' }}
|
||||
|
|
@ -22,7 +15,30 @@
|
|||
{{ __('shop::app.products.add-to-cart') }}
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<form
|
||||
method="POST"
|
||||
action="{{ route('cart.add', $product->product_id) }}">
|
||||
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="product_id" value="{{ $product->product_id }}">
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
<button
|
||||
type="submit"
|
||||
{{ ! $product->isSaleable() ? 'disabled' : '' }}
|
||||
class="btn btn-add-to-cart {{ $addToCartBtnClass ?? '' }}">
|
||||
|
||||
@if (! (isset($showCartIcon) && !$showCartIcon))
|
||||
<i class="material-icons text-down-3">shopping_cart</i>
|
||||
@endif
|
||||
|
||||
<span class="fs14 fw6 text-uppercase text-up-4">
|
||||
{{ __('shop::app.products.add-to-cart') }}
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if (! (isset($showWishlist) && !$showWishlist))
|
||||
|
|
|
|||
|
|
@ -67,8 +67,9 @@
|
|||
class="product-image-container">
|
||||
|
||||
<img
|
||||
src="{{ $productBaseImage['medium_image_url'] }}"
|
||||
loading="lazy"
|
||||
class="card-img-top"
|
||||
src="{{ $productBaseImage['medium_image_url'] }}"
|
||||
alt="{{ $product->name }}">
|
||||
|
||||
<quick-view-btn details="{{ $product }}"></quick-view-btn>
|
||||
|
|
|
|||
|
|
@ -36,10 +36,6 @@
|
|||
|
||||
<layered-navigation></layered-navigation>
|
||||
|
||||
@if ($showRecentlyViewed)
|
||||
@include ('shop::products.list.recently-viewed')
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.after') !!}
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -40,11 +40,7 @@
|
|||
{!! view_render_event('bagisto.shop.products.view.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="row no-margin">
|
||||
@if ($showRecentlyViewed)
|
||||
<section class="col-9 product-detail">
|
||||
@else
|
||||
<section class="col-12 product-detail">
|
||||
@endif
|
||||
<div class="layouter">
|
||||
<product-view>
|
||||
<div class="form-container">
|
||||
|
|
@ -53,24 +49,12 @@
|
|||
<input type="hidden" name="product_id" value="{{ $product->product_id }}">
|
||||
|
||||
{{-- product-gallery --}}
|
||||
<div class="left
|
||||
@if ($showRecentlyViewed)
|
||||
col-lg-6
|
||||
@else
|
||||
col-lg-5
|
||||
@endif
|
||||
">
|
||||
<div class="left col-lg-5">
|
||||
@include ('shop::products.view.gallery')
|
||||
</div>
|
||||
|
||||
{{-- right-section --}}
|
||||
<div class="right
|
||||
@if ($showRecentlyViewed)
|
||||
col-lg-6
|
||||
@else
|
||||
col-lg-7
|
||||
@endif
|
||||
">
|
||||
<div class="right col-lg-7">
|
||||
{{-- product-info-section --}}
|
||||
<div class="row info">
|
||||
<h2 class="col-lg-12">{{ $product->name }}</h2>
|
||||
|
|
@ -95,6 +79,7 @@
|
|||
</div>
|
||||
|
||||
@include ('shop::products.add-to-cart', [
|
||||
'form' => false,
|
||||
'product' => $product,
|
||||
'showCartIcon' => false,
|
||||
])
|
||||
|
|
@ -155,10 +140,6 @@
|
|||
<img src="{{ url()->to('/') }}/storage/{{ $image }}" />
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@if ($showRecentlyViewed)
|
||||
@include ('shop::products.list.recently-viewed')
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
:ratings="{{ $avgStarRating }}"
|
||||
></star-ratings>
|
||||
|
||||
<span class="fs16 fw6">{{ $avgRatings }} Ratings and {{ $total }} Reviews</span>
|
||||
<span class="fs16 fw6 display-block">{{ $avgRatings }} Ratings and {{ $total }} Reviews</span>
|
||||
|
||||
@if (core()->getConfigData('catalog.products.review.guest_review') || auth()->guard('customer')->check())
|
||||
<a href="{{ route('shop.reviews.create', ['slug' => $product->url_key ]) }}">
|
||||
|
|
|
|||
|
|
@ -7,43 +7,45 @@
|
|||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
<section class="search-container cart-details row">
|
||||
@if ($results && $results->count())
|
||||
<div class="filters-container col-12">
|
||||
@include ('shop::products.list.toolbar')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (! $results)
|
||||
<h1 class="fw6 col-12">{{ __('shop::app.search.no-results') }}</h1>
|
||||
@else
|
||||
@if ($results->isEmpty())
|
||||
<h1 class="fw6 col-12">{{ __('shop::app.products.whoops') }}</h1>
|
||||
<span>{{ __('shop::app.search.no-results') }}</span>
|
||||
@else
|
||||
@if ($results->total() == 1)
|
||||
<h2 class="fw6 col-12 mb20">
|
||||
{{ $results->total() }} {{ __('shop::app.search.found-result') }}
|
||||
</h2>
|
||||
@else
|
||||
<h2 class="fw6 col-12 mb20">
|
||||
{{ $results->total() }} {{ __('shop::app.search.found-results') }}
|
||||
</h2>
|
||||
@endif
|
||||
|
||||
@foreach ($results as $productFlat)
|
||||
@if ($toolbarHelper->getCurrentMode() == 'grid')
|
||||
@include('shop::products.list.card', ['product' => $productFlat->product])
|
||||
@else
|
||||
@include('shop::products.list.card', [
|
||||
'list' => true,
|
||||
'product' => $productFlat->product
|
||||
])
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@include('ui::datagrid.pagination')
|
||||
<div class="container">
|
||||
<section class="search-container cart-details row">
|
||||
@if ($results && $results->count())
|
||||
<div class="filters-container col-12">
|
||||
@include ('shop::products.list.toolbar')
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</section>
|
||||
|
||||
@if (! $results)
|
||||
<h1 class="fw6 col-12">{{ __('shop::app.search.no-results') }}</h1>
|
||||
@else
|
||||
@if ($results->isEmpty())
|
||||
<h1 class="fw6 col-12">{{ __('shop::app.products.whoops') }}</h1>
|
||||
<span>{{ __('shop::app.search.no-results') }}</span>
|
||||
@else
|
||||
@if ($results->total() == 1)
|
||||
<h2 class="fw6 col-12 mb20">
|
||||
{{ $results->total() }} {{ __('shop::app.search.found-result') }}
|
||||
</h2>
|
||||
@else
|
||||
<h2 class="fw6 col-12 mb20">
|
||||
{{ $results->total() }} {{ __('shop::app.search.found-results') }}
|
||||
</h2>
|
||||
@endif
|
||||
|
||||
@foreach ($results as $productFlat)
|
||||
@if ($toolbarHelper->getCurrentMode() == 'grid')
|
||||
@include('shop::products.list.card', ['product' => $productFlat->product])
|
||||
@else
|
||||
@include('shop::products.list.card', [
|
||||
'list' => true,
|
||||
'product' => $productFlat->product
|
||||
])
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@include('ui::datagrid.pagination')
|
||||
@endif
|
||||
@endif
|
||||
</section>
|
||||
</div>
|
||||
@endsection
|
||||
Loading…
Reference in New Issue