Fixed issue #642
This commit is contained in:
parent
543af40328
commit
62f8cf1bad
|
|
@ -80,7 +80,7 @@ class CategoryDataGrid extends DataGrid
|
|||
'label' => trans('admin::app.datagrid.no-of-products'),
|
||||
'type' => 'number',
|
||||
'sortable' => true,
|
||||
'searchable' => true,
|
||||
'searchable' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@ class CustomerReviewDataGrid extends DataGrid
|
|||
public function prepareQueryBuilder()
|
||||
{
|
||||
$queryBuilder = DB::table('product_reviews as pr')
|
||||
->leftjoin('products_grid as pg', 'pr.product_id', '=', 'pg.id')
|
||||
->addSelect('pr.id as product_review_id', 'pr.title', 'pr.comment', 'pg.name', 'pr.status as product_review_status');
|
||||
->leftjoin('products_grid as pg', 'pr.product_id', '=', 'pg.id')
|
||||
->select('pr.id as product_review_id', 'pr.title', 'pr.comment', 'pg.name as product_name', 'pr.status as product_review_status');
|
||||
|
||||
$this->addFilter('product_review_id', 'pr.id');
|
||||
$this->addFilter('product_review_status', 'pr.status');
|
||||
$this->addFilter('product_name', 'pg.name');
|
||||
|
||||
$this->setQueryBuilder($queryBuilder);
|
||||
}
|
||||
|
|
@ -37,6 +38,7 @@ class CustomerReviewDataGrid extends DataGrid
|
|||
'type' => 'number',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'filterable' => false
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
|
|
@ -56,7 +58,7 @@ class CustomerReviewDataGrid extends DataGrid
|
|||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'name',
|
||||
'index' => 'product_name',
|
||||
'label' => trans('admin::app.datagrid.product-name'),
|
||||
'type' => 'string',
|
||||
'searchable' => true,
|
||||
|
|
|
|||
|
|
@ -24,9 +24,10 @@ class ProductDataGrid extends DataGrid
|
|||
$queryBuilder = DB::table('products_grid')
|
||||
->leftJoin('products', 'products_grid.product_id', '=', 'products.id')
|
||||
->leftJoin('attribute_families', 'products.attribute_family_id', '=', 'attribute_families.id')
|
||||
->addSelect('products_grid.product_id as product_id', 'products_grid.sku as product_sku', 'products_grid.name', 'products.type as product_type', 'products_grid.status', 'products_grid.price', 'products_grid.quantity', 'attribute_families.name as attribute_family');
|
||||
->select('products_grid.product_id as product_id', 'products_grid.sku as product_sku', 'products_grid.name as productname', 'products.type as product_type', 'products_grid.status', 'products_grid.price', 'products_grid.quantity', 'attribute_families.name as attribute_family');
|
||||
|
||||
$this->addFilter('product_id', 'products_grid.product_id');
|
||||
$this->addFilter('productname', 'products_grid.name');
|
||||
$this->addFilter('product_sku', 'products_grid.sku');
|
||||
$this->addFilter('product_type', 'products.type');
|
||||
$this->addFilter('attribute_family', 'attribute_families.name');
|
||||
|
|
@ -54,7 +55,7 @@ class ProductDataGrid extends DataGrid
|
|||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'name',
|
||||
'index' => 'productname',
|
||||
'label' => trans('admin::app.datagrid.name'),
|
||||
'type' => 'string',
|
||||
'searchable' => true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue