diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index f6664762b..30b848568 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -396,7 +396,7 @@ return [ 'product-search-hint' => 'Start typing product name', 'no-result-found' => 'Products not found with same name.', 'searching' => 'Searching ...', - 'channel' => 'Channel' + 'channel' => 'Channels' ], 'attributes' => [ diff --git a/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php b/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php index 78cb72fbd..fe645b534 100755 --- a/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php @@ -438,16 +438,16 @@ this_this.isRequire = true; } - var dependentElement = document.getElementById(this_this.depand); - var depandValue = this_this.value; - - if (depandValue == 'true') { - depandValue = 1; - } else if (depandValue == 'false') { - depandValue = 0; - } - $(document).ready(function(){ + var dependentElement = document.getElementById(this_this.depand); + var depandValue = this_this.value; + + if (depandValue == 'true') { + depandValue = 1; + } else if (depandValue == 'false') { + depandValue = 0; + } + $(document).on("change", "select.control", function() { if (this_this.depand == this.name) { if (this_this.value == this.value) { @@ -457,17 +457,21 @@ } } }) + + if (dependentElement && dependentElement.value == depandValue) { + this_this.isVisible = true; + } else { + this_this.isVisible = false; + } + + if (this_this.result) { + if (dependentElement.value == this_this.value) { + this_this.isVisible = true; + } else { + this_this.isVisible = false; + } + } }); - - if (dependentElement && dependentElement.value == depandValue) { - this_this.isVisible = true; - } else { - this_this.isVisible = false; - } - - if (this_this.result) { - this_this.isVisible = true; - } } }); diff --git a/packages/Webkul/Customer/src/Http/Middleware/RedirectIfNotCustomer.php b/packages/Webkul/Customer/src/Http/Middleware/RedirectIfNotCustomer.php index 78f5c1436..38adeb4e3 100755 --- a/packages/Webkul/Customer/src/Http/Middleware/RedirectIfNotCustomer.php +++ b/packages/Webkul/Customer/src/Http/Middleware/RedirectIfNotCustomer.php @@ -18,7 +18,7 @@ class RedirectIfNotCustomer public function handle($request, Closure $next, $guard = 'customer') { if (! Auth::guard($guard)->check()) { - return redirect()->route('customer.profile.index'); + return redirect()->route('customer.session.index'); } else { if (Auth::guard($guard)->user()->status == 0) { Auth::guard($guard)->logout(); diff --git a/packages/Webkul/Shop/src/DataGrids/OrderDataGrid.php b/packages/Webkul/Shop/src/DataGrids/OrderDataGrid.php index 9248fab4c..15288f439 100644 --- a/packages/Webkul/Shop/src/DataGrids/OrderDataGrid.php +++ b/packages/Webkul/Shop/src/DataGrids/OrderDataGrid.php @@ -20,7 +20,7 @@ class OrderDataGrid extends DataGrid public function prepareQueryBuilder() { $queryBuilder = DB::table('orders as order') - ->addSelect('order.id', 'order.status', 'order.created_at', 'order.grand_total') + ->addSelect('order.id', 'order.status', 'order.created_at', 'order.grand_total', 'order.order_currency_code') ->where('customer_id', auth()->guard('customer')->user()->id); $this->setQueryBuilder($queryBuilder); @@ -49,10 +49,13 @@ class OrderDataGrid extends DataGrid $this->addColumn([ 'index' => 'grand_total', 'label' => trans('shop::app.customer.account.order.index.total'), - 'type' => 'price', + 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, + 'wrapper' => function ($value) { + return core()->formatPrice($value->grand_total, $value->order_currency_code); + } ]); $this->addColumn([