Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    May 2006
    Posts
    170
    Plugin Contributions
    1

    Have a Drink Stock vs. Sales Report Thread

    I am happy to give back to the ZC community with this report that I have found very useful for managing my own store.

    https://www.zen-cart.com/downloads.php?do=file&id=1371

    Stock vs. Sales Report
    --------------------------

    - For each product sold in a given period (specified in the stats_stock.php file), determines total sales for the product, current stock level, and how many days until the product is projected to be out of stock.

    - This is very useful for catalogs where the rate of sales between different products varies significantly. For a low selling item you might be fine having only 3 items in stock compared to a high selling item that you need 100 in stock.

    - If the product is projected to be out of stock within a number of days that you specify, it highlights the product and shows you an estimate of how many units need to be reordered to remove the alert status.

    - Sort by stock projection, current stock, or current sales.

    - This contribution tested and working on my Zen-Carts 1.3.9.h. & 1.5.0. I hope it helps you keep track of stock ordering issues as much as it helps me!

  2. #2
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: Stock vs. Sales Report Thread

    Hi! Thanks for putting this together for everyone!! One question, does this take attributes into account? If not, do you think it can be added without too much reworking of the code?

    Zen Cart and it's community are the best!!

  3. #3
    Join Date
    May 2006
    Posts
    170
    Plugin Contributions
    1

    Default Re: Stock vs. Sales Report Thread

    Quote Originally Posted by lankeeyankee View Post
    Hi! Thanks for putting this together for everyone!! One question, does this take attributes into account? If not, do you think it can be added without too much reworking of the code?
    That's definitely something that I want to do. I am planning to install the stock by attributes contribution to my 1.3.9h cart soon, and would like the report to work with that.

    In the mean time, as a halfway measure, it might be useful to at least break down the sales figures by attributes.

  4. #4
    Join Date
    Dec 2004
    Location
    Redcliffe QLD, Australia
    Posts
    193
    Plugin Contributions
    1

    red flag Re: Stock vs. Sales Report Thread

    Hi. I've just installed this mod but I've got a problem - I get an error - I believe it has to do with the fact that I'm supposed to edit the stats_stock.php file. Problem is your instructions aren't clear on how to edit this file.

    I'm getting the following error:
    Error!

    Unable to determine the page link!

    Function used:

    zen_href_link('', '&product_type=&cPath=&pID=&action=new_product', 'NONSSL')
    Can you provide an example of what needs to changed in the stats_stock.php file.

    Thanks.

  5. #5
    Join Date
    May 2006
    Posts
    170
    Plugin Contributions
    1

    Default Re: Stock vs. Sales Report Thread

    Quote Originally Posted by ozetrade View Post
    Hi. I've just installed this mod but I've got a problem - I get an error - I believe it has to do with the fact that I'm supposed to edit the stats_stock.php file. Problem is your instructions aren't clear on how to edit this file.

    I'm getting the following error:


    Can you provide an example of what needs to changed in the stats_stock.php file.

    Thanks.
    The defaults should work fine in the php file. No edits required. What version of ZC are you running?

    Just saw your signature, that all sites are running 1.3.9h, which is the same as mine. There must be something different between our installs: are you running any SEO or URL rewrites? Perhaps you have something other than the standard product categories?
    Last edited by ts232; 17 Apr 2012 at 03:47 PM.

  6. #6
    Join Date
    May 2012
    Posts
    1
    Plugin Contributions
    0

    Default Re: Stock vs. Sales Report Thread

    Quote Originally Posted by ozetrade View Post
    Hi. I've just installed this mod but I've got a problem - I get an error - I believe it has to do with the fact that I'm supposed to edit the stats_stock.php file. Problem is your instructions aren't clear on how to edit this file.

    I'm getting the following error:


    Can you provide an example of what needs to changed in the stats_stock.php file.

    Thanks.
    Hmm, anybody ever figure this one out? Just did a clean install of zen-cart 1.5. Added a new product category and a product to test everything and I’m getting the above error as well.

  7. #7
    Join Date
    May 2006
    Posts
    170
    Plugin Contributions
    1

    Default Re: Stock vs. Sales Report Thread

    Quote Originally Posted by lankeeyankee View Post
    Hi! Thanks for putting this together for everyone!! One question, does this take attributes into account? If not, do you think it can be added without too much reworking of the code?
    Version 2.0 now has partial support for stock with attributes. I am doing a new version that provides fuller support.

  8. #8
    Join Date
    May 2006
    Posts
    170
    Plugin Contributions
    1

    Default Re: Stock vs. Sales Report Thread

    Quote Originally Posted by mrrocketman View Post
    Hmm, anybody ever figure this one out? Just did a clean install of zen-cart 1.5. Added a new product category and a product to test everything and I’m getting the above error as well.
    Does the error occur when loading the initial report page, or when trying to click on one of the product links?

    I am working on a new feature version and would like to correct this error, but I am not seeing any of these errors on my cart. An example of the product links generated by the report is:

    http://<DOMAIN>/<ADMIN>/product.php?&product_type=1&cPath=6_282_779&pID=106&action=new_product

    Are all of the problems happening in 1.5? Anyone having problems in 1.3.x?

  9. #9
    Join Date
    Jul 2006
    Location
    Holland
    Posts
    27
    Plugin Contributions
    0

    Default Re: Stock vs. Sales Report Thread

    Anyone having problems in 1.3.x?

    Getting this error

    Code:
    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND zo.date_purchased > DATE_ADD(CURRENT_DATE(), INTERVAL -365 DAY) GROUP BY w' at line 9
    in:
    [SELECT COUNT(*) as total_orders, SUM(op.products_quantity) AS total_units, CONCAT('[ ', opa.products_options, ': ', opa.products_options_values,' ]') AS products_options_values_pair, SUBSTRING(opa.products_options_values, 1, 999) AS width FROM orders_products_attributes opa INNER JOIN orders_products op USING(orders_products_id) INNER JOIN orders zo ON zo.orders_id = op.orders_id WHERE products_options_values LIKE '%%' AND products_id = AND zo.date_purchased > DATE_ADD(CURRENT_DATE(), INTERVAL -365 DAY) GROUP BY width ORDER BY total_orders DESC;]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    Any idea ?

    Tnx

  10. #10
    Join Date
    Feb 2013
    Posts
    3
    Plugin Contributions
    0

    Default Re: Stock vs. Sales Report Thread

    Hello Everyone,

    Just wondering if anyone has seen the following error: "WARNING: An Error occurred, please refresh the page and try again."

    I've installed the latest Sales vs Stock Plugin on a fresh 1.5.1 Zen Cart build.

    I've had the same error on the test & live sight.

    Cheers

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Monthly Sales and Tax Summary Report [support thread]
    By skipwater in forum Addon Admin Tools
    Replies: 236
    Last Post: 1 Sep 2023, 03:51 AM
  2. v151 Sales Report with Graphs support thread
    By JacobBushnell in forum Addon Admin Tools
    Replies: 17
    Last Post: 25 Jul 2019, 02:27 PM
  3. v151 Adding Stock Status to the Low Stock Report
    By nigelt74 in forum General Questions
    Replies: 0
    Last Post: 7 Aug 2014, 09:36 AM

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