diff --git a/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php index 59d52ed48..4b9635edd 100644 --- a/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php @@ -25,9 +25,9 @@ class CartRuleDataGrid extends DataGrid { parent::__construct(); - $this->customer_group = request()->get('customer_group') ?? 'all'; + $this->customer_group = core()->getRequestedCustomerGroupCode() ?? 'all'; - $this->channel = request()->get('channel') ?? 'all'; + $this->channel = core()->getRequestedChannelCode(false) ?? 'all'; } public function prepareQueryBuilder() diff --git a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php index f9ec6da21..2540b3081 100755 --- a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php @@ -41,7 +41,7 @@ class ChannelDataGrid extends DataGrid { parent::__construct(); - $this->locale = request()->get('locale') ?? app()->getLocale(); + $this->locale = core()->getRequestedLocaleCode(); $this->channelRepository = $channelRepository; } diff --git a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php index 26ac28741..a9668469c 100644 --- a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php @@ -30,10 +30,10 @@ class ProductDataGrid extends DataGrid parent::__construct(); /* locale */ - $this->locale = request()->get('locale') ?? app()->getLocale(); + $this->locale = core()->getRequestedLocaleCode(); /* channel */ - $this->channel = request()->get('channel') ?? (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode()); + $this->channel = core()->getRequestedChannelCode(); /* finding channel code */ if ($this->channel !== 'all') { diff --git a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php index 511b0d4d2..6e97d66a5 100755 --- a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php @@ -31,10 +31,10 @@ class SliderDataGrid extends DataGrid parent::__construct(); /* locale */ - $this->locale = request()->get('locale') ?? app()->getLocale(); + $this->locale = core()->getRequestedLocaleCode(); /* channel */ - $this->channel = request()->get('channel') ?? (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode()); + $this->channel = core()->getRequestedChannelCode(); /* finding channel code */ if ($this->channel !== 'all') { diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/categories/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/categories/edit.blade.php index 7c30bc150..f9c2dd118 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/categories/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/categories/edit.blade.php @@ -6,7 +6,9 @@ @section('content')