Hi, I have a thousand of products as you can see in the attached image I have those product that contain their quantity for each size on each location that is called "njesia" now I want to ask if is it possible to generate a report for each product on each location for each size, and i need to know on that report which product has 0 quantity so to request a product for that size on that location.
I am not sure if I understand all the important points of this use-case, but I think we will not have the full solution you need, especially the last part to only provide a report where the count is 0 for each size, for the purpose of making it easier to know which ones should be ordered to 're-fill the stock' so to speak.
1. In regards of generating the Report, do you mean to automatically have a scheduled report on each 'set time interval' like the table should periodically automatically send you a report?
If that is the case, we don't currently have any automated way for executing/exporting reports from tables.
You can suggest it to our developers, though - they will do their best to make a solution in the future.
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
If you have coding skills and wish to try to make a custom solution now,
We also added this new developer's handbook, which can allow users with coding skills to make custom add-ons.
Our developers will keep adding more custom hooks/examples there over time.
Please be advised that custom solutions with hooks are not included in our support.
You can also research resources such as Stack Overflow to see if any other user perhaps found a workaround.
( We do like to give examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet)
2. But, if you meant to manually export filtered reports from a table, that could be possible, depending on the complexity of what is needed exactly.
For example, to make the cells with the 0 value more 'highlighted', you could use our Conditional Formatting logic feature and have any 0 cells have red background color.
But, that is just to see them easier on a table - the styles such as coloring can't be exported either via our Table Tools or via Report Builder - they can only export raw values from the cells.
3. Now, when you say to generate a report for each product on each location for each size, can you elaborate a bit more on that, do you plan to manually use column filters to 'narrow down' the data, such as clicking in a specific location to filter it;
then maybe click into each 'size' Header (XS, S... and so on) to sort them by ascending order, that could show you which rows have zeroes;
or you mean to have some different solution?
If you mean to somehow 'automate seeing which rows are zero' so you don't have to manually sort or filter the table, the only idea I have is to maybe try with SQL Query based tables, and add a custom WHERE statement in a Query for multiple/differently filtered 'report table'.
You could have one large Manual Table in the Database which holds all the data;
( If you already have this data on a Sheet, you can import it to make a new Manual Table;
Then you can separate this data into one SQL Query table per each Location.
In other words, you will be able to make multiple SQL tables that pulls data from the same "master table",
and any editing you do on all these other SQL tables are going to be stored in the same table in the database.
This will be my example table :
Now, to make a new SQL Table from it,
first, check in the Editing Tab/MySQL table name for editing:
in my example, the Manual table name is wp_wpdatatable_39,
so i make a new SQL table that will pull data from it;
and we can choose all columns like :
SELECT * FROM wp_wpdatatable_39
or just specific columns;
we can also have completely different settings/filtering/sorting and limitations for front-end users on each table;
and you can make multiple SQL Query tables that pull the same data from the "main table".
SELECT column_name1,
column_name2,
column_name3
FROM table_name
-
In this example, if i want to limit to only show the "Company" column, and i will leave wdt_ID ( because we got to have row ID) and userid ( if we want userID for limiting rows per currently logged user ID),
when i hide those columns in the end, the front-end user will only see the "company" column.
SELECT wdt_ID,
userid,
company
FROM wp_wpdatatable_39
Later, you can make another SQL Table that will show some other columns, have other filters and so on ( depending on what you need to achieve)...
For you case, for example for the first Location, you can do a Query like :
SELECT wdt_ID,
userid,
company
FROM wp_wpdatatable_39
WHERE njesia = 'Depo'
AND
So that table will only show rows for location "Depo".
Now, in the last step, I am sorry to disappoint you, but I realise we don't currently have an ideal solution for you which will only look to show the rows for each 'size' which are zero.
For example, if I make a table like this with some dummy data across multiple locations for items/products, and have a column for each size, etc.
Then if we try SQL with "AND" or "OR" operators, to only show rows which have a zero for any of the sizes - that won't work, because it will look like this :
So right now, we don't have an ideal solution for this use-case.
Our developers are working on native integration with WooCommerce, though, I just can't say an exact ETA when it will be finished, but when they add this, then maybe that will open up some more flexible solutions for use-cases like this, but I can't say for sure all the functionalities that will be possible.
As mentioned, you can follow our changeLog page if you'd like where we state any changes/new features/bug fixes during updates; so when the WooCommerce native integration is released, you can then check with us if any new functionalities are available in terms of 'stock management', checking which products need to be ordered as you described which are '0 stock' and so on...
So for now, we don't have a valid solution which covers all aspects of your use-case.
I will speak with our QA Team to see if they possibly know any workaround I am not aware of - if they have it, we will make sure to come back to this ticket and share it with you.
Just a small follow up from my end, on that last part of your scenario, to create a way for a table to only pull values which are '0' from the data set;
I additionally spoke with our QA Team, and they confirmed everything I already wrote is the extent of our knowledge on a specific use-case such as this one, they don't have any additional advice for that scenario.
Maybe it can be done with some high level of Custom SQL Query, such as a custom WHERE statement, where you would get the Query to only 'look up' for specific data, but writing Custom Queries or debugging them is not covered by our Support.
Basically, if you can get a Query like that to return the data you need in your Database directly, via PHPMyAdmin or any other DB management Tool - then you can try the same Query in our SQL Query based table and it should work.
If you encounter any filtering issue for an SQL Query table :
Our SQL Feature is not the same as a Database Management Tool, so for example - a specific Custom Query might work in your SQL Database directly but not in our SQL Feature of the Plugin, because we run everything through our PHP & SQL Parser, which has certain limitations.
We will do our best to advise.
On this documentation, there are more details which explain how our server-side processing works :
Basically, when the server-side option in a Table is enabled, the wpDataTables will give the search results through the Query;
So, our Plugin sends the Query to the database.
If that Query is formatted as
"SELECT ...
FROM ...
WHERE... "
but after the "FROM" if it has any complex Query, there can be errors;
as we mentioned, our SQL Query feature does not work in the same way as a Database Management Tool ( such as PHPMyAdmin and similar),
and is not meant to be used as one;
it is based on an SQL Parser which has limitations;
so it can happen that a specific complex Query might work in PhpMyAdmin but struggles to work through our server-side processing ( and the SQL Parser);
So when the Server-Side is enabled, our plugin sends a more complex SQL Query which in this case is too complicated for our Parser to handle,
instead of when the server-side is disabled, it just simply filters the data just by the values already seen in the column.
I hope that this helps to clarify everything.
So if you pull a Query which returns the data as you need it, but encounter a particular filter issue, you would need to either try and somehow simplify your SQL Query in order for our server-side processing to work;
or if you can make it work without server-side processing, if your data/number of rows of the table does not become too large, let's say above 4, 5, 6 thousand rows, and if the hosting server performs well,
you can 'get away' with disabling server-side on the table and see if that helps.
Here is how you can 'raise' the limit of rows for "server-side processing" toggle.
If your SQL query based tables are not bigger than 2.000 rows,
you can disable server-side on SQL tables, and it will work like it does for Excel tables. ( loads all rows regardless of pagination)
If you need to increase the row count while still having the "toggle" to disable server-side,
Please go to ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php and around line 2176 you'll see this:
if (count($res_dataRows) > 2000) {
You can change that number to a value bigger than the number of rows in your table.
Same should be applied in ../wp-content/plugins/wpdatatables/source/class.wdtconfigcontroller.php on lines 53:
if (count($wpDataTable->getDataRows()) > 2000) {
And line 100:
if (count($wpDataTable->getDataRows()) > 2000) {
That will increase the server-side automatic limit.
If none of that helps,
you can try preparing a MySQL view (which will return the data that you need, call it e.g. “view1” and then build a wpDataTables based on a simple query like "SELECT * FROM view1″.
If you need help with that, you can see our video, where we show an example of using View in our plugin.
Hi, I have a thousand of products as you can see in the attached image I have those product that contain their quantity for each size on each location that is called "njesia" now I want to ask if is it possible to generate a report for each product on each location for each size, and i need to know on that report which product has 0 quantity so to request a product for that size on that location.
What is the best way to do this.
Attached files: Screenshot 2024-08-14 101835.png
Hi Halit,
I am not sure if I understand all the important points of this use-case, but I think we will not have the full solution you need, especially the last part to only provide a report where the count is 0 for each size, for the purpose of making it easier to know which ones should be ordered to 're-fill the stock' so to speak.
1. In regards of generating the Report, do you mean to automatically have a scheduled report on each 'set time interval' like the table should periodically automatically send you a report?
If that is the case, we don't currently have any automated way for executing/exporting reports from tables.
You can suggest it to our developers, though - they will do their best to make a solution in the future.
Please feel free to search on our suggestions page,
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
If you have coding skills and wish to try to make a custom solution now,
you can check out our available hooks for Developers on this documentation and see if you can find any hook that might help.
We also added this new developer's handbook, which can allow users with coding skills to make custom add-ons.
Our developers will keep adding more custom hooks/examples there over time.
Please be advised that custom solutions with hooks are not included in our support.
You can also research resources such as Stack Overflow to see if any other user perhaps found a workaround.
( We do like to give examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet)
2. But, if you meant to manually export filtered reports from a table, that could be possible, depending on the complexity of what is needed exactly.
For example, to make the cells with the 0 value more 'highlighted', you could use our Conditional Formatting logic feature and have any 0 cells have red background color.
But, that is just to see them easier on a table - the styles such as coloring can't be exported either via our Table Tools or via Report Builder - they can only export raw values from the cells.
3. Now, when you say to generate a report for each product on each location for each size, can you elaborate a bit more on that, do you plan to manually use column filters to 'narrow down' the data, such as clicking in a specific location to filter it;
then maybe click into each 'size' Header (XS, S... and so on) to sort them by ascending order, that could show you which rows have zeroes;
or you mean to have some different solution?
If you mean to somehow 'automate seeing which rows are zero' so you don't have to manually sort or filter the table, the only idea I have is to maybe try with SQL Query based tables, and add a custom WHERE statement in a Query for multiple/differently filtered 'report table'.
You could have one large Manual Table in the Database which holds all the data;
( If you already have this data on a Sheet, you can import it to make a new Manual Table;
and you can later on update it via file upload, too ( CSV/Excel/Google Sheet) )
Then you can separate this data into one SQL Query table per each Location.
In other words, you will be able to make multiple SQL tables that pulls data from the same "master table",
and any editing you do on all these other SQL tables are going to be stored in the same table in the database.
This will be my example table :
Now, to make a new SQL Table from it,
first, check in the Editing Tab/MySQL table name for editing:
in my example, the Manual table name is wp_wpdatatable_39,
so i make a new SQL table that will pull data from it;
and we can choose all columns like :
or just specific columns;
we can also have completely different settings/filtering/sorting and limitations for front-end users on each table;
and you can make multiple SQL Query tables that pull the same data from the "main table".
-
In this example, if i want to limit to only show the "Company" column, and i will leave wdt_ID ( because we got to have row ID) and userid ( if we want userID for limiting rows per currently logged user ID),
when i hide those columns in the end, the front-end user will only see the "company" column.
Later, you can make another SQL Table that will show some other columns, have other filters and so on ( depending on what you need to achieve)...
You can see my Video example here https://watch.screencastify.com/v/jOXrsJ9jaspWG5m3VqZH
For you case, for example for the first Location, you can do a Query like :
So that table will only show rows for location "Depo".
Now, in the last step, I am sorry to disappoint you, but I realise we don't currently have an ideal solution for you which will only look to show the rows for each 'size' which are zero.
For example, if I make a table like this with some dummy data across multiple locations for items/products, and have a column for each size, etc.
Then if we try SQL with "AND" or "OR" operators, to only show rows which have a zero for any of the sizes - that won't work, because it will look like this :
So right now, we don't have an ideal solution for this use-case.
Our developers are working on native integration with WooCommerce, though, I just can't say an exact ETA when it will be finished, but when they add this, then maybe that will open up some more flexible solutions for use-cases like this, but I can't say for sure all the functionalities that will be possible.
As mentioned, you can follow our changeLog page if you'd like where we state any changes/new features/bug fixes during updates; so when the WooCommerce native integration is released, you can then check with us if any new functionalities are available in terms of 'stock management', checking which products need to be ordered as you described which are '0 stock' and so on...
So for now, we don't have a valid solution which covers all aspects of your use-case.
I will speak with our QA Team to see if they possibly know any workaround I am not aware of - if they have it, we will make sure to come back to this ticket and share it with you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Halit,
Just a small follow up from my end, on that last part of your scenario, to create a way for a table to only pull values which are '0' from the data set;
I additionally spoke with our QA Team, and they confirmed everything I already wrote is the extent of our knowledge on a specific use-case such as this one, they don't have any additional advice for that scenario.
Maybe it can be done with some high level of Custom SQL Query, such as a custom WHERE statement, where you would get the Query to only 'look up' for specific data, but writing Custom Queries or debugging them is not covered by our Support.
Basically, if you can get a Query like that to return the data you need in your Database directly, via PHPMyAdmin or any other DB management Tool - then you can try the same Query in our SQL Query based table and it should work.
If you encounter any filtering issue for an SQL Query table :
Our SQL Feature is not the same as a Database Management Tool, so for example - a specific Custom Query might work in your SQL Database directly but not in our SQL Feature of the Plugin, because we run everything through our PHP & SQL Parser, which has certain limitations.
We will do our best to advise.
On this documentation, there are more details which explain how our server-side processing works :
https://wpdatatables.com/documentation/table-features/server-side-processing/.
Basically, when the server-side option in a Table is enabled, the wpDataTables will give the search results through the Query;
So, our Plugin sends the Query to the database.
If that Query is formatted as
"SELECT ...
FROM ...
WHERE... "
but after the "FROM" if it has any complex Query, there can be errors;
as we mentioned, our SQL Query feature does not work in the same way as a Database Management Tool ( such as PHPMyAdmin and similar),
and is not meant to be used as one;
it is based on an SQL Parser which has limitations;
so it can happen that a specific complex Query might work in PhpMyAdmin but struggles to work through our server-side processing ( and the SQL Parser);
So when the Server-Side is enabled, our plugin sends a more complex SQL Query which in this case is too complicated for our Parser to handle,
instead of when the server-side is disabled, it just simply filters the data just by the values already seen in the column.
I hope that this helps to clarify everything.
So if you pull a Query which returns the data as you need it, but encounter a particular filter issue, you would need to either try and somehow simplify your SQL Query in order for our server-side processing to work;
or if you can make it work without server-side processing, if your data/number of rows of the table does not become too large, let's say above 4, 5, 6 thousand rows, and if the hosting server performs well,
you can 'get away' with disabling server-side on the table and see if that helps.
Here is how you can 'raise' the limit of rows for "server-side processing" toggle.
If your SQL query based tables are not bigger than 2.000 rows,
you can disable server-side on SQL tables, and it will work like it does for Excel tables. ( loads all rows regardless of pagination)
If you need to increase the row count while still having the "toggle" to disable server-side,
Please go to ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php and around line 2176 you'll see this:
You can change that number to a value bigger than the number of rows in your table.
Same should be applied in ../wp-content/plugins/wpdatatables/source/class.wdtconfigcontroller.php on lines 53:
And line 100:
That will increase the server-side automatic limit.
If none of that helps,
you can try preparing a MySQL view (which will return the data that you need, call it e.g. “view1” and then build a wpDataTables based on a simple query like "SELECT * FROM view1″.
If you need help with that, you can see our video, where we show an example of using View in our plugin.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables