Page 6 of 8 FirstFirst ... 45678 LastLast
Results 51 to 60 of 74
  1. #51
    Join Date
    Oct 2007
    Posts
    134
    Plugin Contributions
    0

    Default Re: ZC Inventory Report Module

    Quote Originally Posted by bislewl View Post
    Ok, Here is a rough idea. If you don't feel comfortable you may need to hire someone.
    Using file-set for version 1.9.0
    Line 114: you will need to add p.products_image into the sql select statment

    somewhere between 200-210
    your's need to add a table header perhaps
    HTML Code:
    <td class="dataTableHeadingContent" align="center">Image Link</td>
    between 235-245 as position as above
    you will want to add something like:
    PHP Code:
    <td class="dataTableContent" align="center"><a href="<?php echo DIR_WS_IMAGES.$products->fields['products_image']; ?>" target="_blank">Link</a></td>
    I haven't verified if that works, but that should get you pretty close.
    Hi,
    I did just as suggested by you.
    Now, I am able to see a column in the report with Product image heading and LINK for all the images, but on clicking on the LINK, it shows the XXXXX.com/admin/images page for all the links

    Moreover, on downloading the ACTIVE products report, the products image column in present, but it does not show any link. it has blank values.

  2. #52
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: ZC Inventory Report Module

    Quote Originally Posted by muteyaar View Post
    Hi,
    I did just as suggested by you.
    Now, I am able to see a column in the report with Product image heading and LINK for all the images, but on clicking on the LINK, it shows the XXXXX.com/admin/images page for all the links

    Moreover, on downloading the ACTIVE products report, the products image column in present, but it does not show any link. it has blank values.
    is it pulling in the product_images? If not is the product images in the select statement?
    it should look like:
    PHP Code:
    $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, p.products_image 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
    try using this line instead
    PHP Code:
    <td class="dataTableContent" align="center"><a href="<?php echo DIR_WS_CATALOG_IMAGES.$products->fields['products_image']; ?>" target="_blank">Link</a></td>
    That should resolve the /admin issue

  3. #53
    Join Date
    Oct 2007
    Posts
    134
    Plugin Contributions
    0

    Default Re: ZC Inventory Report Module

    Quote Originally Posted by bislewl View Post
    is it pulling in the product_images? If not is the product images in the select statement?
    it should look like:
    PHP Code:
    $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, p.products_image 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
    try using this line instead
    PHP Code:
    <td class="dataTableContent" align="center"><a href="<?php echo DIR_WS_CATALOG_IMAGES.$products->fields['products_image']; ?>" target="_blank">Link</a></td>
    That should resolve the /admin issue
    Hi, thanks for the quick reply.
    I added the code given by you .
    It is now showing the links for product images in the ADMIN panel. But when I down load the ACTIVE products report, the product images column has BLANK values.. Nothing shows there.

  4. #54
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: ZC Inventory Report Module

    Quote Originally Posted by muteyaar View Post
    Hi, thanks for the quick reply.
    I added the code given by you .
    It is now showing the links for product images in the ADMIN panel. But when I down load the ACTIVE products report, the product images column has BLANK values.. Nothing shows there.
    ok, if you want it in the CSV as well try changing this around line 118
    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']),
            ); 
    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'],
                
    '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']),
            ); 

  5. #55
    Join Date
    Oct 2007
    Posts
    134
    Plugin Contributions
    0

    Default Re: ZC Inventory Report Module

    Quote Originally Posted by bislewl View Post
    ok, if you want it in the CSV as well try changing this around line 118
    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']),
            ); 
    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'],
                
    '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

  6. #56
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: ZC Inventory Report Module

    Quote Originally Posted by muteyaar View Post
    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
    I should be showing the complete url, as long as the product has an image.
    Is your spreadsheet software hiding the rest? It's the only thing I can think of right now

  7. #57
    Join Date
    Oct 2007
    Posts
    134
    Plugin Contributions
    0

    Default Re: ZC Inventory Report Module

    Quote Originally Posted by bislewl View Post
    I should be showing the complete url, as long as the product has an image.
    Is your spreadsheet software hiding the rest? It's the only thing I can think of right now
    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.

  8. #58
    Join Date
    Oct 2007
    Posts
    134
    Plugin Contributions
    0

    Default Re: ZC Inventory Report Module

    Quote Originally Posted by muteyaar View Post
    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 !!

  9. #59
    Join Date
    Jan 2016
    Location
    Perth, Western Australia
    Posts
    3
    Plugin Contributions
    0

    Default Re: ZC Inventory Report Module

    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.

  10. #60
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,366
    Plugin Contributions
    94

    Default Re: ZC Inventory Report Module

    I believe that your 'pigeon' interpretation of the issue is close. The problem appears to be that the script is calling the PHP function explode and supplying an array for the 2nd argument instead of a string. Fix that issue and the sQL error will resolve itself.

    What is the block of code around line 73 of the stats_inventory_report script? You can use the "CODE" tags (the # in the toolbar you see when you're creating a post) to wrap the code-block.

    Although it's not going to shed additional light on this error, you might want to install the myDEBUG Backtrace (https://www.zen-cart.com/downloads.php?do=file&id=1879) plugin to help in solving future issues.

 

 
Page 6 of 8 FirstFirst ... 45678 LastLast

Similar Threads

  1. v154 SBA Inventory Report
    By catsma_97504 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 6 May 2016, 04:16 PM
  2. Inventory Report
    By damonp in forum All Other Contributions/Addons
    Replies: 17
    Last Post: 31 Jan 2011, 10:51 PM
  3. Store inventory report?
    By RocketFoot in forum General Questions
    Replies: 4
    Last Post: 14 May 2009, 01:15 PM
  4. Inventory Order Report
    By j1l2i3p4k5i6n7g8 in forum General Questions
    Replies: 4
    Last Post: 5 Jan 2008, 05:55 PM
  5. Inventory Report with Attributes
    By brad512 in forum General Questions
    Replies: 6
    Last Post: 31 Dec 2006, 09:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR