Issue #3909 fixed
This commit is contained in:
parent
7602e97d9b
commit
bdc159b8e3
|
|
@ -56,6 +56,10 @@ class ResourceController extends Controller
|
|||
public function index()
|
||||
{
|
||||
$query = $this->repository->scopeQuery(function($query) {
|
||||
if (isset($this->_config['authorization_required']) && $this->_config['authorization_required']) {
|
||||
$query = $query->where('customer_id', auth()->user()->id );
|
||||
}
|
||||
|
||||
foreach (request()->except(['page', 'limit', 'pagination', 'sort', 'order', 'token']) as $input => $value) {
|
||||
$query = $query->whereIn($input, array_map('trim', explode(',', $value)));
|
||||
}
|
||||
|
|
@ -85,10 +89,12 @@ class ResourceController extends Controller
|
|||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function get($id)
|
||||
{
|
||||
return new $this->_config['resource'](
|
||||
$this->repository->findOrFail($id)
|
||||
);
|
||||
{
|
||||
$query = isset($this->_config['authorization_required']) && $this->_config['authorization_required'] ?
|
||||
$this->repository->where('customer_id', auth()->user()->id)->findOrFail($id) :
|
||||
$this->repository->findOrFail($id);
|
||||
|
||||
return new $this->_config['resource']($query);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class ProductDataGrid extends DataGrid
|
|||
|
||||
$queryBuilder->whereIn('product_flat.locale', $whereInLocales);
|
||||
$queryBuilder->whereIn('product_flat.channel', $whereInChannels);
|
||||
$queryBuilder->whereNotNull('product_flat.name');
|
||||
// $queryBuilder->whereNotNull('product_flat.name');
|
||||
|
||||
$this->addFilter('product_id', 'product_flat.product_id');
|
||||
$this->addFilter('product_name', 'product_flat.name');
|
||||
|
|
|
|||
|
|
@ -183,14 +183,14 @@
|
|||
|
||||
<td>
|
||||
<div class="control-group" :class="[errors.has(inputName + '[qty]') ? 'has-error' : '']">
|
||||
<input type="number" v-validate="'required|min_value:0'" :name="[inputName + '[qty]']" v-model="product.qty" class="control" data-vv-as=""{{ __('admin::app.catalog.products.qty') }}""/>
|
||||
<input type="number" v-validate="'required|min_value:1'" :name="[inputName + '[qty]']" v-model="product.qty" class="control" data-vv-as=""{{ __('admin::app.catalog.products.qty') }}""/>
|
||||
<span class="control-error" v-if="errors.has(inputName + '[qty]')">@{{ errors.first(inputName + '[qty]') }}</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="control-group" :class="[errors.has(inputName + '[sort_order]') ? 'has-error' : '']">
|
||||
<input type="number" v-validate="'required|min_value:0'" :name="[inputName + '[sort_order]']" v-model="product.sort_order" class="control" data-vv-as=""{{ __('admin::app.catalog.products.sort-order') }}""/>
|
||||
<input type="number" v-validate="'required|min_value:1'" :name="[inputName + '[sort_order]']" v-model="product.sort_order" class="control" data-vv-as=""{{ __('admin::app.catalog.products.sort-order') }}""/>
|
||||
<span class="control-error" v-if="errors.has(inputName + '[sort_order]')">@{{ errors.first(inputName + '[sort_order]') }}</span>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -170,6 +170,20 @@
|
|||
{{ $order->order_currency_code }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ $additionalDetails['title'] }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $additionalDetails['value'] }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -222,6 +222,20 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ $additionalDetails['title'] }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $additionalDetails['value'] }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('sales.order.payment-method.after', ['order' => $order]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddUniqueIndexToIncrementIdInOrdersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->string('increment_id')->unique()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -213,7 +213,7 @@ class OrderRepository extends Repository
|
|||
$totalQtyInvoiced += $item->qty_invoiced;
|
||||
|
||||
if (! $item->isStockable()) {
|
||||
$totalQtyShipped += $item->qty_ordered;
|
||||
$totalQtyShipped += $item->qty_invoiced;
|
||||
} else {
|
||||
$totalQtyShipped += $item->qty_shipped;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -10,8 +10,8 @@
|
|||
*/
|
||||
|
||||
/*!
|
||||
* Vue.js v2.6.11
|
||||
* (c) 2014-2019 Evan You
|
||||
* Vue.js v2.6.12
|
||||
* (c) 2014-2020 Evan You
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=d64fdfe9e3fe3e4b9ee4",
|
||||
"/css/shop.css": "/css/shop.css?id=dbbe4951362b3f0ea3e2"
|
||||
"/js/shop.js": "/js/shop.js?id=e8a8f56c4e7037f09d9f",
|
||||
"/css/shop.css": "/css/shop.css?id=5921caa0500dc820d23f"
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 185 B |
|
|
@ -271,7 +271,6 @@ input {
|
|||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 125px;
|
||||
|
||||
.media-info {
|
||||
display: flex;
|
||||
|
|
@ -284,6 +283,7 @@ input {
|
|||
|
||||
.info {
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-evenly;
|
||||
|
|
@ -296,7 +296,6 @@ input {
|
|||
}
|
||||
|
||||
.operations {
|
||||
height: 120px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
|
@ -2438,6 +2437,7 @@ section.cart {
|
|||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
|
||||
.item-title {
|
||||
font-size: 18px;
|
||||
|
|
@ -4068,6 +4068,7 @@ section.review {
|
|||
.main-container-wrapper .product-card .sticker {
|
||||
left: auto;
|
||||
right: 20px;
|
||||
min-width: 52px;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .cart-wish-wrap .addtocart {
|
||||
|
|
@ -4337,7 +4338,7 @@ section.review {
|
|||
padding-left: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//checkout process page end here
|
||||
|
||||
//customer page start here
|
||||
|
|
@ -4369,6 +4370,7 @@ section.review {
|
|||
|
||||
a.btn.btn-lg.btn-primary {
|
||||
float: left;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.account-item-card {
|
||||
|
|
@ -4636,7 +4638,6 @@ td {
|
|||
max-width: 250px;
|
||||
line-height: 30px;
|
||||
vertical-align: top;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.icon.remove-product {
|
||||
|
|
|
|||
|
|
@ -97,6 +97,12 @@
|
|||
height: 24px;
|
||||
}
|
||||
|
||||
.compare-icon {
|
||||
background-image: url("../images/compare_arrows.png");
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.wishlist-icon {
|
||||
background-image: url('../images/wishlist.svg');
|
||||
width: 32px;
|
||||
|
|
|
|||
|
|
@ -529,6 +529,15 @@
|
|||
<div class="box-content">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
|
||||
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div class="instructions">
|
||||
<label>{{ $additionalDetails['title'] }}</label>
|
||||
<p>{{ $additionalDetails['value'] }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.view.payment-method.after', ['order' => $order]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -103,6 +103,17 @@
|
|||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
|
||||
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ $additionalDetails['title'] }}
|
||||
</div>
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
<p>{{ $additionalDetails['value'] }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,17 @@
|
|||
<div style="font-weight: bold;font-size: 16px; color: #242424;">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</div>
|
||||
|
||||
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
{{ $additionalDetails['title'] }}
|
||||
</div>
|
||||
<div style="font-size: 16px; color: #242424;">
|
||||
<p>{{ $additionalDetails['value'] }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -70,8 +70,12 @@
|
|||
@endguest
|
||||
style="color: #242424;"
|
||||
>
|
||||
<span class="name">{{ __('shop::app.customer.compare.text') }}</span>
|
||||
(<span id="compare-items-count"></span>)
|
||||
|
||||
<i class="icon compare-icon"></i>
|
||||
<span class="name">
|
||||
{{ __('shop::app.customer.compare.text') }}
|
||||
<span class="count">(<span id="compare-items-count"></span>)<span class="count">
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
namespace Webkul\SocialLogin\Http\Controllers;
|
||||
|
||||
use Illuminate\Routing\Controller;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
use Webkul\SocialLogin\Repositories\CustomerSocialAccountRepository;
|
||||
|
||||
class LoginController extends Controller
|
||||
|
|
@ -51,11 +52,11 @@ class LoginController extends Controller
|
|||
return Socialite::driver($provider)->redirect();
|
||||
} catch (\Exception $e) {
|
||||
session()->flash('error', $e->getMessage());
|
||||
|
||||
|
||||
return redirect()->route('customer.session.index');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handles callback
|
||||
*
|
||||
|
|
@ -69,11 +70,14 @@ class LoginController extends Controller
|
|||
} catch (\Exception $e) {
|
||||
return redirect()->route('customer.session.index');
|
||||
}
|
||||
|
||||
|
||||
$customer = $this->customerSocialAccountRepository->findOrCreateCustomer($user, $provider);
|
||||
|
||||
auth()->guard('customer')->login($customer, true);
|
||||
|
||||
// Event passed to prepare cart after login
|
||||
Event::dispatch('customer.after.login', $customer->email);
|
||||
|
||||
return redirect()->intended(route($this->_config['redirect']));
|
||||
}
|
||||
}
|
||||
|
|
@ -43,6 +43,14 @@ class VelocityMetaDataSeeder extends Seeder
|
|||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.compare_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'fr',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.compare_option',
|
||||
'value' => '1',
|
||||
|
|
|
|||
|
|
@ -554,6 +554,15 @@
|
|||
<div class="box-content">
|
||||
{{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }}
|
||||
|
||||
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div class="instructions">
|
||||
<label>{{ $additionalDetails['title'] }}</label>
|
||||
<p>{{ $additionalDetails['value'] }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.view.payment-method.after', ['order' => $order]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue