Misc. updates

This commit is contained in:
shubhammehrotra.symfony@webkul.com 2019-12-27 17:39:19 +05:30
parent b991069401
commit 3bea1b7e0e
21 changed files with 333 additions and 323 deletions

View File

@ -1708,11 +1708,6 @@
justify-content: center;
}
.slides-container {
top: -70px;
position: relative;
}
#address-section .form-header h3 {
margin-bottom: 20px;
}

View File

@ -35325,11 +35325,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
//
/* harmony default export */ __webpack_exports__["default"] = ({
props: ['slidesCount', 'slidesPerPage', 'navigationEnabled', 'paginationEnabled', 'addClass'],
data: function data() {
return {};
}
props: ['slidesCount', 'slidesPerPage', 'navigationEnabled', 'paginationEnabled', 'addClass']
});
/***/ }),
@ -36708,6 +36704,9 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
props: ['heading', 'headerContent', 'isEnabled']
@ -36731,7 +36730,11 @@ var render = function() {
"rango-view-list " +
(_vm.isEnabled == "0" ? "" : "cursor-pointer") +
" align-vertical-top",
on: { click: _vm.toggleSidebar }
on: {
click: function($event) {
_vm.isEnabled == "0" ? "" : _vm.toggleSidebar()
}
}
}),
_vm._v(" "),
_c("span", {

View File

@ -8,6 +8,13 @@ use Webkul\Velocity\Repositories\OrderBrandsRepository;
use Webkul\Attribute\Repositories\AttributeOptionRepository;
use Webkul\Product\Repositories\ProductRepository as ProductRepository;
/**
* Search controller
*
* @author Shubham Mehrotra <shubhammehrotra.symfony@webkul.com> @shubhwebkul
* @copyright 2019 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class Helper extends Review
{
@ -37,29 +44,28 @@ class Helper extends Review
*
* @var object
*/
protected $AttributeOption;
protected $attributeOption;
public function __construct(
OrderBrandsRepository $OrderBrandsRepository,
OrderBrandsRepository $orderBrandsRepository,
ProductRepository $productRepository,
ProductModel $productModel,
AttributeOptionRepository $AttributeOption
AttributeOptionRepository $attributeOption
) {
$this->OrderBrandsRepository = $OrderBrandsRepository;
$this->productRepository = $productRepository;
$this->productModel = $productModel;
$this->AttributeOption = $AttributeOption;
$this->attributeOption = $attributeOption;
$this->productRepository = $productRepository;
$this->orderBrandsRepository = $orderBrandsRepository;
}
public function topBrand($order)
{
$orderItems = $order->items;
foreach ($orderItems as $key => $orderItem) {
$products[] = $orderItem->product;
$this->OrderBrandsRepository->create([
$this->orderBrandsRepository->create([
'order_id' => $orderItem->order_id,
'order_item_id' => $orderItem->id,
'product_id' => $orderItem->product_id,
@ -72,17 +78,18 @@ class Helper extends Review
public function getBrandsWithCategories()
{
try {
$orderBrand = $this->OrderBrandsRepository->get()->toArray();
// $orderBrand = $this->arrangeWithMaxBrandOrder($orderBrandData);
$orderBrand = $this->orderBrandsRepository->get()->toArray();
if (isset($orderBrand) && ! empty($orderBrand)) {
foreach ($orderBrand as $product) {
$product_id[] = $product['product_id'];
$product_categories = $this->productRepository->with('categories')->findWhereIn('id', $product_id)->toArray();
}
$categoryName = $brandName = $brandImplode = [];
foreach($product_categories as $totalData) {
$brand = $this->AttributeOption->findOneWhere(['id' => $totalData['brand']]);
$brand = $this->attributeOption->findOneWhere(['id' => $totalData['brand']]);
foreach ($totalData['categories'] as $categories) {
foreach($categories['translations'] as $catName) {
@ -107,17 +114,16 @@ class Helper extends Review
}
return $brandImplode;
} catch (Exception $e){
throw $e;
}
} catch (Exception $exception){
throw $exception;
}
}
public function arrangeWithMaxBrandOrder($orderBrandData)
{
}
/**
* Returns the count rating of the product
*

View File

@ -8,8 +8,8 @@ use Webkul\Velocity\Http\Shop\Controllers;
/**
* Search controller
*
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
* @author Shubham Mehrotra <shubhammehrotra.symfony@webkul.com> @shubhwebkul
* @copyright 2019 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class SearchController extends Controller
{

View File

@ -26,9 +26,5 @@
'paginationEnabled',
'addClass'
],
data: function () {
return {}
}
}
</script>

View File

@ -2,7 +2,10 @@
<div :class="`row ${isEnabled == '0' ? 'disabled' : ''}`">
<div
class="main-category fs20 pt10 col-2 pl30">
<i :class="`rango-view-list ${isEnabled == '0' ? '' : 'cursor-pointer'} align-vertical-top`" @click="toggleSidebar"></i>
<i
:class="`rango-view-list ${isEnabled == '0' ? '' : 'cursor-pointer'} align-vertical-top`"
@click="(isEnabled == '0') ? '' : toggleSidebar()">
</i>
<span class="text-up" v-text="heading"></span>
</div>
@ -13,8 +16,8 @@
v-if="(content['content_type'] == 'link')"
href="content['page_link']"
:target="content['link_target'] ? '_blank' : '_self'"
v-text="content.title"
></a>
v-text="content.title">
</a>
<a href="#" v-else v-text="content.title"></a>
</li>

View File

@ -997,8 +997,8 @@
}
.slides-container {
top: -70px;
position: relative;
// top: -70px;
// position: relative;
}
#address-section {

View File

@ -215,6 +215,7 @@ return [
'enter-current-password' => 'Enter your current password',
'new-password' => 'New password',
'confirm-new-password' => 'Confirm new password',
'top-brands' => 'Top Brands',
],
],
]

View File

@ -33,25 +33,6 @@
</script>
<script>
Vue.component('catalog-product', {
template: '#catalog-product-template',
inject: ['$validator'],
data() {
return {
catalog_type: '',
}
},
methods: {
loadCatalogType(event) {
this.content_type = event.target.value;
}
}
});
</script>
<script type="text/x-template" id="field-autocomplete-template">
<div>
<div class="control-group">
@ -180,5 +161,21 @@
}
});
Vue.component('catalog-product', {
template: '#catalog-product-template',
inject: ['$validator'],
data() {
return {
catalog_type: '',
}
},
methods: {
loadCatalogType(event) {
this.content_type = event.target.value;
}
}
});
</script>
@endpush

View File

@ -76,13 +76,13 @@
<script type="text/javascript">
(() => {
var shippingHtml = '';
var paymentHtml = '';
var reviewHtml = '';
var paymentHtml = '';
var summaryHtml = '';
var shippingHtml = '';
var paymentMethods = '';
var customerAddress = '';
var shippingMethods = '';
var paymentMethods = '';
var shippingTemplateRenderFns = [];
var paymentTemplateRenderFns = [];
@ -297,6 +297,10 @@
paymentMethods = response.data.paymentMethods;
if (this.selected_payment_method) {
this.savePayment();
}
this.getOrderSummary();
})
.catch(error => {
@ -500,20 +504,19 @@
Vue.component('review-section', {
data: function () {
return {
error_message: '',
templateRender: null,
error_message: ''
}
},
staticRenderFns: reviewTemplateRenderFns,
render: function (h) {
return h('div', [
(this.templateRender ?
this.templateRender() :
'')
]);
return h(
'div', [
this.templateRender ? this.templateRender() : ''
]
);
},
mounted: function() {
@ -530,30 +533,25 @@
Vue.component('summary-section', {
inject: ['$validator'],
staticRenderFns: summaryTemplateRenderFns,
props: {
discount: {
type: [String, Number],
default: 0,
type: [String, Number],
}
},
data: function() {
return {
templateRender: null,
changeCount: 0,
coupon_code: null,
error_message: null,
templateRender: null,
couponChanged: false,
changeCount: 0
}
},
staticRenderFns: summaryTemplateRenderFns,
mounted: function() {
this.templateRender = summaryHtml.render;

View File

@ -165,13 +165,13 @@
<input
type="text"
v-validate="'required|email'"
class="control"
id="billing[email]"
name="billing[email]"
@blur="isCustomerExist"
v-validate="'required|email'"
v-model="address.billing.email"
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.email') }}&quot;"
@blur="isCustomerExist" />
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.email') }}&quot;" />
<span class="control-error" v-if="errors.has('address-form.billing[email]')">
@{{ errors.first('address-form.billing[email]') }}
@ -190,8 +190,8 @@
<input
type="text"
v-validate="'required'"
class="control"
v-validate="'required'"
id="billing[first_name]"
name="billing[first_name]"
v-model="address.billing.first_name"
@ -228,8 +228,8 @@
<input
type="text"
v-validate="'required'"
class="control"
v-validate="'required'"
id="billing_address_0"
name="billing[address1][]"
v-model="address.billing.address1[0]"
@ -243,7 +243,12 @@
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
<div class="row col-12" style="margin-top: -25px;">
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
<input type="text" class="control" name="billing[address1][{{ $i }}]" id="billing_address_{{ $i }}" v-model="address.billing.address1[{{$i}}]">
<input
type="text"
class="control"
id="billing_address_{{ $i }}"
name="billing[address1][{{ $i }}]"
v-model="address.billing.address1[{{$i}}]" />
@endfor
</div>
@endif
@ -255,10 +260,10 @@
<input
type="text"
v-validate="'required'"
class="control"
id="billing[city]"
name="billing[city]"
v-validate="'required'"
v-model="address.billing.city"
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.city') }}&quot;" />
@ -267,6 +272,34 @@
</span>
</div>
<div :class="`row col-12 ${errors.has('address-form.billing[country]') ? 'has-error' : ''}`">
<label for="billing[country]" class="required">
{{ __('shop::app.checkout.onepage.country') }}
</label>
<select
type="text"
class="control"
id="billing[country]"
name="billing[country]"
v-validate="'required'"
v-model="address.billing.country"
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.country') }}&quot;">
<option value=""></option>
@foreach (core()->countries() as $country)
<option value="{{ $country->code }}">{{ $country->name }}</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('address-form.billing[country]')">
@{{ errors.first('address-form.billing[country]') }}
</span>
</div>
<div :class="`row col-12 ${errors.has('address-form.billing[state]') ? 'has-error' : ''}`">
<label for="billing[state]" class="required">
{{ __('shop::app.checkout.onepage.state') }}
@ -274,14 +307,22 @@
<input
type="text"
v-validate="'required'"
class="control"
id="billing[state]"
name="billing[state]"
v-validate="'required'"
v-if="!haveStates('billing')"
v-model="address.billing.state"
v-if="!haveStates('billing')" data-vv-as="&quot;{{ __('shop::app.checkout.onepage.state') }}&quot;" />
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.state') }}&quot;" />
<select v-validate="'required'" class="control" id="billing[state]" name="billing[state]" v-model="address.billing.state" v-if="haveStates('billing')" data-vv-as="&quot;{{ __('shop::app.checkout.onepage.state') }}&quot;">
<select
class="control"
id="billing[state]"
name="billing[state]"
v-validate="'required'"
v-if="haveStates('billing')"
v-model="address.billing.state"
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.state') }}&quot;">
<option value="">{{ __('shop::app.checkout.onepage.select-state') }}</option>
@ -303,9 +344,9 @@
<input
type="text"
v-validate="'required'"
class="control"
id="billing[postcode]"
v-validate="'required'"
name="billing[postcode]"
v-model="address.billing.postcode"
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.postcode') }}&quot;" />
@ -315,34 +356,6 @@
</span>
</div>
<div :class="`row col-12 ${errors.has('address-form.billing[country]') ? 'has-error' : ''}`">
<label for="billing[country]" class="required">
{{ __('shop::app.checkout.onepage.country') }}
</label>
<select
type="text"
v-validate="'required'"
class="control"
id="billing[country]"
name="billing[country]"
v-model="address.billing.country"
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.country') }}&quot;">
<option value=""></option>
@foreach (core()->countries() as $country)
<option value="{{ $country->code }}">{{ $country->name }}</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('address-form.billing[country]')">
@{{ errors.first('address-form.billing[country]') }}
</span>
</div>
<div :class="`row col-12 ${errors.has('address-form.billing[phone]') ? 'has-error' : ''}`">
<label for="billing[phone]" class="required">
{{ __('shop::app.checkout.onepage.phone') }}
@ -350,11 +363,12 @@
<input
type="text"
v-validate="'required'"
class="control"
id="billing[phone]"
name="billing[phone]"
v-validate="'required'"
v-model="address.billing.phone"
@change="validateForm('address-form')"
data-vv-as="&quot;{{ __('shop::app.checkout.onepage.phone') }}&quot;" />
<span class="control-error" v-if="errors.has('address-form.billing[phone]')">
@ -366,8 +380,9 @@
<div class="mb10">
<span class="checkbox fs16 display-inbl no-margin">
<input
type="checkbox"
class="ml0"
type="checkbox"
@change="validateForm('address-form')"
id="billing[use_for_shipping]"
name="billing[use_for_shipping]"
v-model="address.billing.use_for_shipping" />
@ -383,8 +398,8 @@
<div class="mb10">
<span class="checkbox fs16 display-inbl no-margin">
<input
type="checkbox"
class="ml0"
type="checkbox"
id="billing[save_as_address]"
name="billing[save_as_address]" v-model="address.billing.save_as_address"/>
@ -396,7 +411,4 @@
@php
@endphp
@endauth
@guest('customer')
@endguest
@endif

View File

@ -1,3 +1,5 @@
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
<div class="form-container review-checkout-conainer">
<div class="form-header mb-30">
<h3 class="fw6 display-inbl">
@ -60,8 +62,6 @@
</div>
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
<div class="cart-item-list">
<h4 class="fw6">{{ __('velocity::app.checkout.items') }}</h4>

View File

@ -36,7 +36,7 @@
@endif
</div>
<a class="row" href="{{ route('shop.home.index') }}">
<a class="row remove-decoration" href="{{ route('shop.home.index') }}">
<div class="col-12">
<span class="custom-circle">></span>
</div>

View File

@ -39,6 +39,10 @@
@endif
@endsection
@section('content-wrapper')
@include('shop::home.slider')
@endsection
@section('full-content-wrapper')
{!! view_render_event('bagisto.shop.home.content.before') !!}

View File

@ -1,11 +1,11 @@
<?php
@php
$categories = [];
foreach (app('Webkul\Category\Repositories\CategoryRepository')->getVisibleCategoryTree(core()->getCurrentChannel()->root_category_id) as $category){
if ($category->slug)
array_push($categories, $category);
}
?>
@endphp
<div class="footer">
<div class="footer-content">

View File

@ -1,13 +1,14 @@
<?php
@php
$brandname = app('Webkul\Velocity\Helpers\Helper');
$topBrandsCollection = $brandname->getBrandsWithCategories();
?>
@endphp
@if (! empty($topBrandsCollection))
<div class="top-brands">
<div class="top-brands-body">
@if ($topBrandsCollection)
<div class="top-brands-header">
<h2>Top Brands</h2>
<h2>{{ __('velocity::app.shop.general.top-brands') }}</h2>
</div>
<ul class="list-group">
@ -33,3 +34,4 @@
@endif
</div>
</div>
@endif

View File

@ -39,16 +39,6 @@
@endforeach
</select>
{{-- <input
type="search"
name="term"
class="form-control search col-md-7"
placeholder="{{ __('velocity::app.header.search-text') }}"
required />
<button class="btn col-md-1" id="header-search-icon">
<i class="material-icons">search</i>
</button> --}}
<div class="input-group col-md-8 rows">
<input
required

View File

@ -78,6 +78,7 @@
></content-header>
<div class="container">
<div class="row col-12">
<sidebar-component
main-sidebar=true
url="{{ url()->to('/') }}"
@ -89,7 +90,9 @@
url="{{ url()->to('/') }}">
</child-sidebar>
<div class="col-10 no-padding content" id="home-right-bar-container">
<div
class="col-10 no-padding content" id="home-right-bar-container">
<div class="container-right row no-margin col-12 no-padding">
{!! view_render_event('bagisto.shop.layout.content.before') !!}
@ -102,7 +105,7 @@
</div>
</div>
</div>
</div>
@show
<div class="container">

View File

@ -3,6 +3,6 @@
@include('velocity::layouts.top-nav.locale-currency')
</div>
<div class="col-sm-6">
@include('velocity::layouts.top-nav.login-section')
{{-- @include('velocity::layouts.top-nav.login-section') --}}
</div>
</nav>

View File

@ -2,6 +2,8 @@
<login-header></login-header>
{!! view_render_event('bagisto.shop.layout.header.account-item.after') !!}
@push('scripts')
<script type="text/x-template" id="login-header-template">
<div class="pull-right">
<div class="dropdown">
@ -106,9 +108,8 @@
</div>
</script>
@push('scripts')
<script type="text/javascript">
<script>
(() => {
Vue.component('login-header', {
template: '#login-header-template',
@ -119,7 +120,6 @@
}
}
})
})();
</script>
@endpush

View File

@ -11,7 +11,7 @@
<carousel-component
:slides-count="{{ sizeof($relatedProducts) }}"
slides-per-page="6"
slides-per-page="5"
id="related-products-carousel"
navigation-enabled="hide"
pagination-enabled="hide">