Forums / All Other Contributions/Addons / Individual Products Profit and Cost Report v1.0

Individual Products Profit and Cost Report v1.0

Locked

Views: 8,096

Results 1 to 20 of 30
This thread is locked. New replies are disabled.
6 Jun 2006, 11:21 AM
#2
heronent avatar

heronent

New Zenner

Join Date:
Jul 2005
Posts:
15
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

I downloaded your contribution and it appears to be missing several files... especially the stats_products_margin.php file (plus the files that put the Profits Report on the Report Toolbar). Tom

6 Jun 2006, 11:28 AM
#3
farrukh avatar

farrukh

Zen Follower

Join Date:
Dec 2003
Posts:
233
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

heronent:

I downloaded your contribution and it appears to be missing several files... especially the stats_products_margin.php file (plus the files that put the Profits Report on the Report Toolbar). Tom

I accidently left the Reports Box file.

But the installation instruction has all the detail in order to install the contrib. Just follow the readme.txt

Also, i have renamed the stats_products_margin.php tp stats_products_profit.php

6 Jun 2006, 9:46 PM
#4
ivan02 avatar

ivan02

New Zenner

Join Date:
Jun 2006
Posts:
10
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

Hi Farrukh,

you forgot the sql-file or is it just an update?

ciao

6 Jun 2006, 11:22 PM
#5
heronent avatar

heronent

New Zenner

Join Date:
Jul 2005
Posts:
15
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

Hi again...yeah, I see what you're talking about in the install file...I saw it right after I posted my first reply. I've renamed the stats_products_profit to stats_products_margin and that parts working. However, there seem to be some database calls for tables I don't have. Is this an update to a previous contribution? Or, as was asked before, is there a MySQL update that I'm not seeing?

T

8 Jun 2006, 8:16 AM
#6
simon_m avatar

simon_m

New Zenner

Join Date:
Jan 2006
Posts:
71
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

Hi Farrukh

I am getting this when you look under Admin -> Reports

1054 Unknown column 'op.products_cost' in 'field list'
in:
[select SUM(op.products_quantity) as products_ordered, op.products_name, p.products_margin_gross_dollar, p.products_price,op.products_cost, op.products_id, SUM(op.products_cost * op.products_quantity) AS total_cost, (SUM(op.products_price) - SUM(op.products_cost)) AS total_profit FROM orders_products op LEFT JOIN products p ON (p.products_id = op.products_id ) GROUP BY p.products_id ORDER BY products_ordered DESC, products_name limit 0, 20]
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.

can you help

simon

Zen Cart:1.3.0.2
MySQL:4.1.19-standard
Linux:2.6.14.2-ts.grh.mh.ht
PHP Version:4.4.2

8 Jun 2006, 8:43 AM
#7
simon_m avatar

simon_m

New Zenner

Join Date:
Jan 2006
Posts:
71
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

simon-m:

Hi Farrukh

I am getting this when you look under Admin -> Reports

1054 Unknown column 'op.products_cost' in 'field list'
in:
[select SUM(op.products_quantity) as products_ordered, op.products_name, p.products_margin_gross_dollar, p.products_price,op.products_cost, op.products_id, SUM(op.products_cost * op.products_quantity) AS total_cost, (SUM(op.products_price) - SUM(op.products_cost)) AS total_profit FROM orders_products op LEFT JOIN products p ON (p.products_id = op.products_id ) GROUP BY p.products_id ORDER BY products_ordered DESC, products_name limit 0, 20]
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.

can you help

simon

Hi Farrukh

got over adove as "op.products_cost" to p.products_cost
in file Admin -> stats_products_profit.php

then get this

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

when i click

* Product Profit Report

or
* Product Report

Ido get this showing under Admin -> Reports

ID# Products Purchased Total Cost ($) Total Profit ($)
7205 Baumatic 125mm dia. Vent Kit. 3 metre flexible ducting 1 25.20 10.56
1098 Baumatic BT2100 60cm Slot-In Cooker 1 0.00 251.04
1128 Baumatic Chimney Cooker Hood, 60cm 1 0.00 110.11
691 Blanco Alta Chrome Tap High Pressure Only 1 0.00 108.72
984 BLANCO BE/MGF/CAN60 Filters Replacement aluminium metal grease f 1 0.00 0.00
695 Blanco Dual 5050, Single Lever Monobloc Mixer Tap 1 0.00 96.62
723 Blanco Strand 6075 Cruciform Monobloc Tap, Quarter Turn 1 0.00 118.08
Displaying 1 to 7 (of 7 products) Page 1 of 1

can you help

simon

Zen Cart:1.3.0.2
MySQL:4.1.19-standard
Linux:2.6.14.2-ts.grh.mh.ht
PHP Version:4.4.2

8 Jun 2006, 11:39 AM
#8
simon_m avatar

simon_m

New Zenner

Join Date:
Jan 2006
Posts:
71
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

heronent:

Hi again...yeah, I see what you're talking about in the install file...I saw it right after I posted my first reply. I've renamed the stats_products_profit to stats_products_margin and that parts working. However, there seem to be some database calls for tables I don't have. Is this an update to a previous contribution? Or, as was asked before, is there a MySQL update that I'm not seeing?

T

Hi

this works as part of the following cont's

http://www.zen-cart.com/forum/showthread.php?t=36336 ( Profit Markup/Margin Calculator)

and

http://www.zen-cart.com/forum/showthread.php?t=36878 ( Global Price Markup and Handling Fee Mod)

all should work on ZC 1.3

Zen Cart:1.3.0.2
MySQL:4.1.19-standard
Linux:2.6.14.2-ts.grh.mh.ht
PHP Version:4.4.2

12 Jun 2006, 8:58 PM
#10
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

Farrukh:

This contribution requires you to have Profit Markup Calculator (http://www.zen-cart.com/forum/showthread.php?t=36336)

installed prior to installing the Cost Report.

I have your other contrib installed, and i just installed this report, however im running into the same issues as the others are. but if i change the file from profit to margin i get a server error. But if i leave it as profit it shows me 2 links with the error below it..

Now i see the post where dude changes op.????? to p.?????? when i look at that file i see that alot of them have an "o" infront of the p, is this correct, or should i remove all them?

also when i hover over the links it shows them going to the stat_products_margin.php file which is actualy called profit? does this need to be changed somewhere?

any help wouldbe great.
Thanks
Wicked

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

12 Jun 2006, 10:09 PM
#11
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

sorry for the double post but i would like to post an image of what i have, and show that there are only 279 products, when i have 3119 products.... 260 of which are deactivated if that means anything....

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

12 Jun 2006, 11:47 PM
#12
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

and i know this is a tripple post, but its in reguards to my last post..

I noticed a bit closer at your screenshot of this release, and its showing the same info that my current setup is showing, but im wondering if you plan to add all the fields that you had in a previous screenshot of the report. Showing the sale total and sale price along with the product cost and totals..... this would be great.

if you have a donation account setup, id be more than happy to donate to your hard and wonderfull work on the contrib.

i hope to hear from you soon
Wicked

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

13 Jun 2006, 1:24 AM
#13
simon_m avatar

simon_m

New Zenner

Join Date:
Jan 2006
Posts:
71
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

Hi Wicked

did you get the 2 reportes working or not?

i am only geting the same report showing from the 2

simon

Zen Cart:1.3.0.2
MySQL:4.1.19-standard
Linux:2.6.14.2-ts.grh.mh.ht
PHP Version:4.4.2

13 Jun 2006, 1:28 AM
#14
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

simon-m:

Hi Wicked

did you get the 2 reportes working or not?

i am only geting the same report showing from the 2

simon

same thing... same report showing for both...im still tring to find out whats wrong, and see if i can fix it..... without the author here tho. it makes it hard

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

13 Jun 2006, 1:43 AM
#15
simon_m avatar

simon_m

New Zenner

Join Date:
Jan 2006
Posts:
71
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

Hi

can we say that the report that is showing is the Product Profit Report?

and the Product Report is the one we all need?

without the author and the nonexistence stats_Product_Report.php.

so we need to workout what we need it to show

poss a less than <??% to show in back and a >??% to show in red

simon

Zen Cart:1.3.0.2
MySQL:4.1.19-standard
Linux:2.6.14.2-ts.grh.mh.ht
PHP Version:4.4.2

13 Jun 2006, 1:54 AM
#16
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

i believe your correct... are you sure that there is suppose to be another stats_product_report.php file that we are missing? or does it do all this through the one file?

im seeing in the stats_products_profit.php file (located in admin/) both links are going to that same file? should they be, and all functions are located in the file, or are we really missing another file?

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

13 Jun 2006, 2:05 AM
#17
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

what do you have in your stats_products_profit.php file under /admin/?

this is what i have

<?php if (isset($_GET['page']) && ($_GET['page'] > 1)) $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS_REPORTS - MAX_DISPLAY_SEARCH_RESULTS_REPORTS; // The new query uses real order info from the orders_products table, and is theoretically more accurate. // To use this newer query, remove the "1" from the following line ($products_query_raw1 becomes $products_query_raw ) $products_query_raw1 = "select SUM(op.products_quantity) as products_ordered, op.products_name, p.products_margin_gross_dollar, p.products_price,p.products_cost, op.products_id, SUM(p.products_cost * op.products_quantity) AS total_cost, (SUM(op.products_price) - SUM(p.products_cost)) AS total_profit FROM ".TABLE_ORDERS_PRODUCTS." op LEFT JOIN " . TABLE_PRODUCTS . " p ON (p.products_id = op.products_id ) GROUP BY p.products_id ORDER BY products_ordered DESC, products_name"; -------------------------------------------------------- -------------------------------------------------------- Do you have the same thing? or did you remove more of the "o"s from that list?

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

13 Jun 2006, 2:06 AM
#18
simon_m avatar

simon_m

New Zenner

Join Date:
Jan 2006
Posts:
71
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

it would be better if it was in one .php as it would be less work for others to set up?

but

I was looking at the Product Stock Report in admin and this could be used as a 2nd .php with the addon the is needed, should only need to be moved and remaned BUT THE AUTHOR OF IT WOULD STILL BE GIVEN THERE CREDIT.

Zen Cart:1.3.0.2
MySQL:4.1.19-standard
Linux:2.6.14.2-ts.grh.mh.ht
PHP Version:4.4.2

13 Jun 2006, 2:10 AM
#19
simon_m avatar

simon_m

New Zenner

Join Date:
Jan 2006
Posts:
71
Plugin Contributions:
0

Re: Individual Products Profit and Cost Report v1.0

wickedklown:

what do you have in your stats_products_profit.php file under /admin/?

this is what i have

<?php if (isset($_GET['page']) && ($_GET['page'] > 1)) $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS_REPORTS - MAX_DISPLAY_SEARCH_RESULTS_REPORTS; // The new query uses real order info from the orders_products table, and is theoretically more accurate. // To use this newer query, remove the "1" from the following line ($products_query_raw1 becomes $products_query_raw ) $products_query_raw1 = "select SUM(op.products_quantity) as products_ordered, op.products_name, p.products_margin_gross_dollar, p.products_price,p.products_cost, op.products_id, SUM(p.products_cost * op.products_quantity) AS total_cost, (SUM(op.products_price) - SUM(p.products_cost)) AS total_profit FROM ".TABLE_ORDERS_PRODUCTS." op LEFT JOIN " . TABLE_PRODUCTS . " p ON (p.products_id = op.products_id ) GROUP BY p.products_id ORDER BY products_ordered DESC, products_name"; -------------------------------------------------------- -------------------------------------------------------- Do you have the same thing? or did you remove more of the "o"s from that list?

yes i removed the "o" from the op.products_cost as the cost is in the products table and not in the order table

Zen Cart:1.3.0.2
MySQL:4.1.19-standard
Linux:2.6.14.2-ts.grh.mh.ht
PHP Version:4.4.2