Cannot display Products table in dashboard
-
Hi,
I am asking for view file of that route.
Thanks
Rahul Shukla -
@rahul Actually it's the same default view file of the package, I didn't change it if that what you mean!
-
@rahul This is the orders views file
Admin/src/Resources/views/sales/orders/index.blade.php
@extends('admin::layouts.content') @section('page_title') {{ __('admin::app.sales.orders.title') }} @stop @section('content') <div class="content"> <div class="page-header"> <div class="page-title"> <h1>{{ __('admin::app.sales.orders.title') }}</h1> </div> <div class="page-action"> <div class="export-import" @click="showModal('downloadDataGrid')"> <i class="export-icon"></i> <span> {{ __('admin::app.export.export') }} </span> </div> </div> </div> <div class="page-content"> @inject('orderGrid', 'Webkul\Admin\DataGrids\OrderDataGrid') {!! $orderGrid->render() !!} </div> </div> <modal id="downloadDataGrid" :is-open="modalIds.downloadDataGrid"> <h3 slot="header">{{ __('admin::app.export.download') }}</h3> <div slot="body"> <export-form></export-form> </div> </modal> @stop @push('scripts') @include('admin::export.export', ['gridName' => $orderGrid]) @endpush
-
@yaser-az I think you must have missed the code needed to render datagrid on your admin's product page.
That must be:
<div class="page-content"> @inject('products', 'Webkul\Admin\DataGrids\ProductDataGrid') {!! $products->render() !!} </div>
-
Hello @bagisto-mogul, thanks for replying ,
Actually this is the code insideWebkul/Admin/src/Resources/views/catalog/products/index.blade.php
<div class="page-content"> @inject('products', 'Webkul\Admin\DataGrids\ProductDataGrid') {!! $products->render() !!} </div>
The same for orders view inside
Webkul/Admin/src/Resources/views/sales/orders/index.blade.php
<div class="page-content"> @inject('orderGrid', 'Webkul\Admin\DataGrids\OrderDataGrid') {!! $orderGrid->render() !!} </div>
As you see the code of injection and rendering already inside the view files.
Any suggestion ? -
@rahul About the active class for menu items, I cannot see where this
$menu
variable comming from ?
How can I set my own menu items using this$menu
variable ? -
@yaser-az You can over ride the ui.css file being compiled from the UI package in order to change the design of datagrid. By creating your own and not using ours.
Menu for the admin panel is generated from the AdminServiceProvider, take a look and you will see $menu variable is shared with these blade files 'admin::layouts.nav-left', 'admin::layouts.nav-aside', 'admin::layouts.tabs'.
-
@bagisto-mogul said in Cannot display Products table in dashboard:
@yaser-az You can over ride the ui.css file being compiled from the UI package in order to change the design of datagrid. By creating your own and not using ours.
Hi @bagisto-mogul , as you can see in this image that the content of the table is empty which means that the orderGrid is not returning anything from the DB.
I believe it's not a styling problem at all!
-
@yaser-az It seems like you have upgraded you application from v0.1.4 to v0.1.5 or to later master.
I must inform you that all your products data is still intact in products table.
But recently we are removing dependency of table called products_grid.So in the version which you started using first in that your admin products were being displayed using the table called products_grid.
But in the recent updates the data is being displayed from products_flat table.
Sorry for the inconvenience but we will provide a migratory sync function that will migrate your old data of products from the product table sets into products_flat table.
Thanks for making this far with Bagisto.
Good Luck with it.
Regards:
Prashant. -
@bagisto-mogul thanks for replay.
Actually there is no products yet in the DB, but it should display the table and the pagination UI though!
In my case it's not displaying anything! Not sure if this is because the new package release! -
@yaser-az If there are no products in your database then you would not be able to see anything in datagrid.
But an empty table looks like the shot below:The screenshot you posted neither shows your product index page nor the browser console at that stage.
And I want to know if you create products then can you see results in your product grid.
-
This post is deleted! -
@bagisto-mogul
oke