Re: ZC Inventory Report Module
Hi lat9,
Thanks for taking an interest, and I will download and start using myDebug backtrace plugin.
the code preceding, and including line 73 is as follows:
Code:
$where_array = array();
if ($cat != '') {
$where_array[] = " master_categories_id = '".$cat."' ";
}
if ($status != ''){
$where_array[] = " products_status = '".$status."' ";
}
if ($mfg != ''){
$where_array[] = " manufacturers_id = '".$mfg."' ";
}
if(count($where_array) > 0){
$db_category_where = " WHERE ".explode(" AND ", $where_array);
}
else{
$db_category_where = '';
}
Line 73 is
Code:
$db_category_where = " WHERE ".explode(" AND ", $where_array);
near the bottom.
I can see a reference to manufacturer above, which is what led me to try adding a manufacturer to one of my products, to see if it made a difference.
Appreciate your input / thoughts.
Tim
TDK APDC
Re: ZC Inventory Report Module
Oh, I see now, it's a coding issue in the original script (I've got no idea how it ever ran properly). The 'and' clauses are being built up into an array and then want to be stringified for use in the SQL query.
The correct PHP function to use is implode, like this:
Code:
$db_category_where = " WHERE ".implode(" AND ", $where_array);
Re: ZC Inventory Report Module
Nice work,
Hit the nail right on the head, and is now working perfectly.
Thank you very much for your assistance.
It has made a useful tool in to an extremely useful tool for me.
Much appreciated.
Tim Bowden
TDK APDC
Re: ZC Inventory Report Module
Tim, thanks for the follow-up; I'm glad to have helped.
... and ... welcome to the Zen Cart community!
Re: ZC Inventory Report Module
2020 Update - Inventory Report drops right into Zen Cart 1.55f and 1.56c if anyone needs it :)
It has also been integrated into the Twitch Base6 public release.
Re: ZC Inventory Report Module
Hello,
the plugin is exactly what I need.
Is it possible to display only active products?
I have over a thousand of inactive products which I keep for backup only. I don't want them been counted.
Twitch Inventory Report Advanced
Submitted to plugins...
Twitch Inventory Report Advanced
22a for Zen Cart 1.57c
May 11.2022
Added Twitch Admin Product Thumbnails (TAP Thumb) to Inventory Report Module v1.9.2 with Twitch Base7 image control switches all working together. This printable inventory report can be used to quickly check images, print visual inventory audit lists and more.
Inventory report tested on Zen Cart 1.57c to display or hide images with the newest TAP Thumb image checker - works if you do not have Twitch TAP Thumb installed.
Re: Twitch Inventory Report Advanced
Twitch, could I get you to resubmit your plugin as a brand new plugin? I just realized you've changed the filenames and a bunch of other things, and it would make more sense to have a separate download and support thread for your mod.
Re: Twitch Inventory Report Advanced
Quote:
Originally Posted by
swguy
Twitch, could I get you to resubmit your plugin as a brand new plugin? I just realized you've changed the filenames and a bunch of other things, and it would make more sense to have a separate download and support thread for your mod.
There is no need to continue branching good modules, this is an improvement on the old module just like any other. The added features can all be turned on/off - as you could easily upgrade and choose to use them or not.
Re: Twitch Inventory Report Advanced
It's not "just an improvement" if you rebrand it completely, which you have done.
You have also changed filenames, (again, to reflect your own branding), which makes it different from a simple bug fix update.
Please resubmit as new so I can submit required fixes to the old module.