Originally Posted by
wolfderby
So I've been trying to teach myself php using this add-on and I'm attempting to add product cost to the report (pulling from the product cost fields created by the profit margin calculator add-on for 1.3.9f) and I was able to integrate the product cost into the report for the product line stats. However, I'm unsure as to how to do the math to add a profit field line by line for each product.
I also don't know how to add the costs together for the timeframe total at the top of the product lines report.
Nor can I seem to figure out how to calculate total profit for each order because there isn't a total cost field in the database for each order, like a total rev and/or total sub-total. Should I attempt to add this database field and have it calculate in check out somehow, or have the script tabulate it?
Does anyone have any suggestions on how I might learn to do this, or the method I should go about trying to do this?
Thanks,
b