Merge pull request #6239 from Anmol-Chauhan/link-admin-product-to-front-page

issue #6197 fixed
This commit is contained in:
Jitendra Singh 2022-04-06 11:35:16 +05:30 committed by GitHub
commit a181eeed4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -105,6 +105,7 @@ class ProductDataGrid extends DataGrid
'products.type as product_type',
'product_flat.status',
'product_flat.price',
'product_flat.url_key',
'attribute_families.name as attribute_family',
DB::raw('SUM(' . DB::getTablePrefix() . 'product_inventories.qty) as quantity')
);
@ -166,6 +167,9 @@ class ProductDataGrid extends DataGrid
'searchable' => true,
'sortable' => true,
'filterable' => true,
'closure' => function ($row) {
return "<a href='" . route('shop.productOrCategory.index', $row->url_key) . "' target='_blank'>" . $row->product_name . "</a>";
},
]);
$this->addColumn([