Page 1 of 1

Fix incorrect totals in Products Purchased Report OC1.5.6

Posted: Tue Dec 03, 2013 6:28 am
by stokeyblokey
dodgytotalsinreport.jpg

Dubious math... - dodgytotalsinreport.jpg (11.44 KiB) Viewed 686 times

Fix for incorrect Totals shown in Reports>Product>Purchased in OC1.5.6.

Works on default admin model file in OC 1.5.6 but should work in others so long as they don't mess with the admin files too much - test and report back please!

Install: Simply copy the vqmod folder to your shop's root directory (where you can see admin, catalog etc) - no core files are overwritten.

To uninstall simply remove the xml file from your vqmod/xml folder

All this fix does is replace the total calculation code from the admin/model/report/product.php with one which calculates tax correctly.
fixed_totals_in_report.jpg

Better! - fixed_totals_in_report.jpg (21.33 KiB) Viewed 686 times

Credits to ADD Creative and zilgrg for correcting my faulty code attempt! :good:

If you want to hard code this fix just use the xml to show you what code to replace and what to replace it with.

Download page

All support enquiries to stokeyblokey125@hotmail.com

If you want to support me in my quest to learn more about php and Opencart and to keep producing free mods with support, then please feel free to donate £1 or $1 or €1 (but no more than that please!) - thank you :)

Stokey