ok, if you want it in the CSV as well try changing this around line 118
to:PHP Code:$products[] = array(
'products_id' => $current_inventory->fields['products_id'],
'products_model' => $current_inventory->fields['products_model'],
'products_name' => $current_inventory->fields['products_name'],
'categories_name' => $current_inventory->fields['categories_name'],
'manufacturers_name' => $current_inventory->fields['manufacturers_name'],
'products_quantity' => $current_inventory->fields['products_quantity'],
'products_quantity_order_min' => $current_inventory->fields['products_quantity_order_min'],
'products_price' => $currencies->format($current_inventory->fields['products_price']),
'total' => $currencies->format($current_inventory->fields['total']),
);
PHP Code:$products[] = array(
'products_id' => $current_inventory->fields['products_id'],
'products_model' => $current_inventory->fields['products_model'],
'products_name' => $current_inventory->fields['products_name'],
'products_image' => DIR_WS_CATALOG_IMAGES.$current_inventory->fields['products_image'],
'categories_name' => $current_inventory->fields['categories_name'],
'manufacturers_name' => $current_inventory->fields['manufacturers_name'],
'products_quantity' => $current_inventory->fields['products_quantity'],
'products_quantity_order_min' => $current_inventory->fields['products_quantity_order_min'],
'products_price' => $currencies->format($current_inventory->fields['products_price']),
'total' => $currencies->format($current_inventory->fields['total']),
);
It is now showing only one URL in all the fields on the products images column in the CSV file
http://XXXXXX.com/images
it is still not showing proper URLs of each products
Here are the screenshots of what I am getting:
admin panel: http://i140.photobucket.com/albums/r...nvrepadmin.png
CSV file: http://i140.photobucket.com/albums/r.../activerep.png
The links are fine in admin panel, but the URLs are incomplete in the CSV file.
Hi,
Thanks for your help Zencart team,
I managed to get the desired report by changing
$lang_id = $_SESSION['languages_id'] != '' ? intval($_SESSION['languages_id']) : 1;
$products_query_raw = "select p.products_id, products_quantity, pd.products_name, p.products_model, p.products_price, (products_quantity * p.products_price) as total, categories_name, p.products_quantity_order_min, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd using(products_id) LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON(cd.categories_id = p.master_categories_id AND cd.language_id = '" . $lang_id . "') left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) " . $db_category_where . " group by p.products_id order by " . $sort . " " . $dir;
//echo 'sql: ' . $products_query_raw . '<br>';
if ($csv == '1') {
to this:
$lang_id = $_SESSION['languages_id'] != '' ? intval($_SESSION['languages_id']) : 1;
$products_query_raw = "select p.products_id, products_quantity, pd.products_name, p.products_model, p.products_image, p.products_price, (products_quantity * p.products_price) as total, categories_name, p.products_quantity_order_min, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd using(products_id) LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON(cd.categories_id = p.master_categories_id AND cd.language_id = '" . $lang_id . "') left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) " . $db_category_where . " group by p.products_id order by " . $sort . " " . $dir;
//echo 'sql: ' . $products_query_raw . '<br>';
if ($csv == '1') {
CSV file is now giving correct reporting.
Thanks !!
Hi,
I am brand new to zen cart, and a 'pigeon' programmer, so please understand that I while I can understand concepts, I have to nut it out with the programming by turning each cog in my brain individually ......
Having scoured the forums and net for answers, I don't think this has been covered, relating to this module (please correct me if I'm wrong)
I am almost entirely happy withe my store, and am populating, however have a little bug with this particular add-on relating to 'report by category' from the drop down menu:
When running this report from 'top' category, everything works well (very, very well .... Exactly what I was after - thank you to author).
However, when I select a category or subcategory, I receive the 'warning, an error occurred, please refresh, etc', and the list does not populate.
I have looked at the myAdminDebug files, with the following result: (nb: ****** in place of store and admin names)
[04-Feb-2016 14:52:43 UTC] PHP Warning: explode() expects parameter 2 to be string, array given in /home/******/public_html/store/******/stats_inventory_report.php on line 73
[04-Feb-2016 14:52:43 UTC] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 :: select count(*) as total from zc_products p left join zc_products_description pd using(products_id) LEFT JOIN zc_categories_description cd ON(cd.categories_id = p.master_categories_id AND cd.language_id = '1') left join zc_manufacturers m using(manufacturers_id) WHERE ==> (as called by) /home/******/public_html/store/******/includes/classes/split_page_results.php on line 39 <== in /home/******/public_html/store/includes/classes/db/mysql/query_factory.php on line 155
From what I can conclude, it appears that I have two errors occurring, however the second is possibly related to / resulting from the first.
My 'pigeon' interprets the first as a problem with the variable being returned: the request is asking for a string, but receiving an array .... sound right?
Any ideas on how I might resolve this? Either way, this add-on is going to be very useful, however I have around 2,000 items to manage. It would be much more handy if I could break this report down by category.
Thank you for taking the time to read - I hope someone will be able to assist, however it isn't a 'show stopper' for me, by any means.
Using: ZC 1.5.4, downloaded plug-in about a week ago.
PHP Version: 5.3.29 (Zend: 2.3.0) PHP Memory Limit: 128M
Database: MySQL 10.0.20-MariaDB-cll-lve
I do have quite a few other add-ons in place - this was one of the earlier installs, and has given the same result since installation.
NB. I do not have any manufacturers specified, however did test adding a manufacturer to a product, with the same result. Don't think this should affect category level reporting, but perhaps?
Regards,
Tim Bowden
TDK APDC
Last edited by tdkapdc; 4 Feb 2016 at 04:40 PM.