This commit is contained in:
Vivek Sharma 2020-02-11 13:36:38 +05:30
commit 424a0a1595
9 changed files with 215 additions and 9 deletions

View File

@ -168,9 +168,10 @@ class Cart {
if (isset($cartProduct['parent_id']) && $cartItem->parent_id != $parentCartItem->id) {
$cartItem = $this->cartItemRepository->create(array_merge($cartProduct, ['cart_id' => $cart->id]));
} else {
if ($product->getTypeInstance()->showQuantityBox() === false) {
if ($cartItem->product->getTypeInstance()->showQuantityBox() === false) {
return ['warning' => __('shop::app.checkout.cart.integrity.qty_impossible')];
}
$cartItem = $this->cartItemRepository->update($cartProduct, $cartItem->id);
}
}

View File

@ -6,14 +6,23 @@
{{ __('velocity::app.admin.contents.content.category-slug') }}
</label>
@php
$pageTarget = isset($locale) ? (old($locale)['page_link'] ?? (isset($content) ? $content->translate($locale)['page_link'] : '')) : '';
@endphp
<input
type="text"
id="page_link"
class="control"
name="page_link"
name="{{$locale}}[page_link]"
v-validate="'required|max:150'"
<<<<<<< HEAD
value="{{ isset($locale) ? (old($locale)['page_link'] ?? $content->translate($locale)['page_link']) : '' }}"
data-vv-as="&quot;{{ __('velocity::app.admin.contents.content.category-slug') }}&quot;" />
=======
value="{{ $pageTarget }}"
data-vv-as="&quot;{{ __('velocity::app.admin.contents.content.page-link') }}&quot;" />
>>>>>>> upstream/master
<span class="control-error" v-if="errors.has('page_link')">
@{{ errors.first('page_link') }}
@ -26,7 +35,7 @@
</label>
@php
$linkTarget = isset($locale) ? (old($locale)['link_target'] ?? $content->translate($locale)['link_target']) : '';
$linkTarget = isset($locale) ? (old($locale)['link_target'] ?? (isset($content) ? $content->translate($locale)['link_target'] : '')) : '';
@endphp
<select

View File

@ -6,7 +6,7 @@
@push('scripts')
<script type="text/x-template" id="catalog-product-template">
<div>
<?php $catalogType = old($locale)['catalog_type'] ?? $content->translate($locale)['catalog_type']; ?>
<?php $catalogType = old($locale)['catalog_type'] ?? (isset($content) ? $content->translate($locale)['catalog_type'] : ''); ?>
<div class="control-group" :class="[errors.has('{{$locale}}[catalog_type]') ? 'has-error' : '']">
<label for="catalog_type" class="required">

View File

@ -7,6 +7,8 @@
@section('content')
<div class="content">
<?php $locale = request()->get('locale') ?: app()->getLocale(); ?>
<form method="POST" action="" @submit.prevent="onSubmit" enctype="multipart/form-data">
<div class="page-header">

View File

@ -46,6 +46,7 @@
<a href="{{ route('customer.session.destroy') }}" class="theme-btn light unset pull-right">
{{ __('shop::app.header.logout') }}
</a>
<<<<<<< HEAD
<span class="account-heading">
{{ __('shop::app.customer.account.profile.index.title') }}
@ -58,10 +59,17 @@
</span>
<div class="horizontal-rule"></div>
=======
<h1 class="account-heading">
{{ __('shop::app.customer.account.profile.index.title') }}
</h1>
>>>>>>> upstream/master
</div>
{!! view_render_event('bagisto.shop.customers.account.profile.view.before', ['customer' => $customer]) !!}
<<<<<<< HEAD
<div class="account-table-content">
<div class="table">
<table>
@ -121,8 +129,39 @@
<label for="password" class="required">{{ __('admin::app.users.users.password') }}</label>
<input type="password" v-validate="'required|min:6|max:18'" class="control" id="password" name="password" data-vv-as="&quot;{{ __('admin::app.users.users.password') }}&quot;"/>
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
</div>
=======
<div class="profile-update-form">
<form
method="POST"
@submit.prevent="onSubmit"
class="account-table-content"
action="{{ route('customer.profile.edit') }}">
@csrf
<div :class="`row ${errors.has('first_name') ? 'has-error' : ''}`">
<label class="col-12 mandatory">
{{ __('shop::app.customer.account.profile.fname') }}
</label>
<div class="col-12">
<input value="{{ $customer->first_name }}" name="first_name" type="text" v-validate="'required'" />
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
</div>
</div>
<div class="row">
<label class="col-12">
{{ __('shop::app.customer.account.profile.lname') }}
</label>
<div class="col-12">
<input value="{{ $customer->last_name }}" name="last_name" type="text" />
>>>>>>> upstream/master
</div>
</div>
<<<<<<< HEAD
<div class="page-action">
<button type="submit" class="theme-btn mb20">
{{ __('shop::app.customer.account.address.index.delete') }}
@ -132,6 +171,134 @@
</modal>
</form>
</div>
=======
<div :class="`row ${errors.has('gender') ? 'has-error' : ''}`">
<label class="col-12 mandatory">
{{ __('shop::app.customer.account.profile.gender') }}
</label>
<div class="col-12">
<select
name="gender"
v-validate="'required'"
class="control styled-select"
data-vv-as="&quot;{{ __('shop::app.customer.account.profile.gender') }}&quot;">
<option value="" @if ($customer->gender == "") selected @endif></option>
<option
value="Other"
@if ($customer->gender == "Other")
selected="selected"
@endif>
{{ __('velocity::app.shop.gender.other') }}
</option>
<option
value="Male"
@if ($customer->gender == "Male")
selected="selected"
@endif>
{{ __('velocity::app.shop.gender.male') }}
</option>
<option
value="Female"
@if ($customer->gender == "Female")
selected="selected"
@endif>
{{ __('velocity::app.shop.gender.female') }}
</option>
</select>
<div class="select-icon-container">
<span class="select-icon rango-arrow-down"></span>
</div>
<span class="control-error" v-if="errors.has('gender')">@{{ errors.first('gender') }}</span>
</div>
</div>
<div :class="`row ${errors.has('date_of_birth') ? 'has-error' : ''}`">
<label class="col-12">
{{ __('shop::app.customer.account.profile.dob') }}
</label>
<div class="col-12">
<input
type="date"
name="date_of_birth"
placeholder="dd/mm/yyyy"
value="{{ old('date_of_birth') ?? $customer->date_of_birth }}"
v-validate="" data-vv-as="&quot;{{ __('shop::app.customer.account.profile.dob') }}&quot;" />
<span class="control-error" v-if="errors.has('date_of_birth')">
@{{ errors.first('date_of_birth') }}
</span>
</div>
</div>
<div class="row">
<label class="col-12 mandatory">
{{ __('shop::app.customer.account.profile.email') }}
</label>
<div class="col-12">
<input value="{{ $customer->email }}" name="email" type="text" v-validate="'required'" />
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
</div>
</div>
<div class="row">
<label class="col-12">
{{ __('velocity::app.shop.general.enter-current-password') }}
</label>
<div :class="`col-12 ${errors.has('oldpassword') ? 'has-error' : ''}`">
<input value="" name="oldpassword" type="password" />
</div>
</div>
<div class="row">
<label class="col-12">
{{ __('velocity::app.shop.general.new-password') }}
</label>
<div :class="`col-12 ${errors.has('password') ? 'has-error' : ''}`">
<input
value=""
name="password"
type="password"
v-validate="'min:6|max:18'" />
<span class="control-error" v-if="errors.has('password')">
@{{ errors.first('password') }}
</span>
</div>
</div>
<div class="row">
<label class="col-12">
{{ __('velocity::app.shop.general.confirm-new-password') }}
</label>
<div :class="`col-12 ${errors.has('password_confirmation') ? 'has-error' : ''}`">
<input value="" name="password_confirmation" type="password"
v-validate="'min:6|confirmed:password'" data-vv-as="confirm password" />
<span class="control-error" v-if="errors.has('password_confirmation')">
@{{ errors.first('password_confirmation') }}
</span>
</div>
</div>
<button
type="submit"
class="theme-btn mb20">
{{ __('velocity::app.shop.general.update') }}
</button>
</form>
</div>
>>>>>>> upstream/master
{!! view_render_event('bagisto.shop.customers.account.profile.view.after', ['customer' => $customer]) !!}
@endsection

View File

@ -40,6 +40,15 @@
@endif
@endsection
@push('css')
<style type="text/css">
.product-price span:first-child, .product-price span:last-child {
font-size: 18px;
font-weight: 600;
}
</style>
@endpush
@section('content-wrapper')
@include('shop::home.slider')
@endsection

View File

@ -14,6 +14,11 @@
@push('css')
<style type="text/css">
.product-price span:first-child, .product-price span:last-child {
font-size: 18px;
font-weight: 600;
}
@media only screen and (max-width: 992px) {
.main-content-wrapper .vc-header {
box-shadow: unset;

View File

@ -8,6 +8,14 @@
.list-card .wishlist-icon i {
padding-left: 10px;
}
<<<<<<< HEAD
=======
.product-price span:first-child, .product-price span:last-child {
font-size: 18px;
font-weight: 600;
}
>>>>>>> upstream/master
</style>
@endpush
@ -50,10 +58,19 @@
@include ('shop::products.price', ['product' => $product])
</div>
<<<<<<< HEAD
<div class="product-rating">
<star-ratings ratings="{{ $avgRatings }}"></star-ratings>
<span>{{ __('velocity::app.products.ratings', ['totalRatings' => $totalReviews ]) }}</span>
</div>
=======
@if( $totalReviews )
<div class="product-rating">
<star-ratings ratings="{{ $avgRatings }}"></star-ratings>
<span>{{ $totalReviews }} Ratings</span>
</div>
@endif
>>>>>>> upstream/master
<div class="cart-wish-wrap mt5">
@include ('shop::products.add-to-cart', [

View File

@ -160,10 +160,6 @@
methods: {
toggleLayeredNavigation: function ({event, actionType}) {
// this.$root.navContainer = true;
// this.$root.responsiveSidebarTemplate = `<div slot="sidebar-body">
// Hello World
// </div>`;
this.layeredNavigation = !this.layeredNavigation;
}
}