This is a discussion on Sales Report 2 within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; I am not strong in PHP - so make this edit at your own risk - *BACKUP FIRST* !! This ...
| |||||||
| Register | FAQ | Donate | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| This is my first addition to a contrib. - there is no file to download - but it forces me to put something so I put in vs 2.2.0. I needed to see the Model Number as well as the Product Name - so in admin/classes/sales_report2.php find this Query: $this->queryItemCnt = "SELECT op.products_id as pid, op.orders_products_id, op.products_name as pname, sum(op.products_quantity) as pquant, sum(op.final_price * op.products_quantity) as psum, op.products_tax as ptax FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op WHERE o.orders_id = op.orders_id"; Add op.products_model as pm, like this: $this->queryItemCnt = "SELECT op.products_id as pid, op.products_model as pm, op.orders_products_id, op.products_name as pname, sum(op.products_quantity) as pquant, sum(op.final_price * op.products_quantity) as psum, op.products_tax as ptax FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op WHERE o.orders_id = op.orders_id"; Then - in admin/sales_report/template_default.php look for lines of code like this: I had two of those in my file. I replaced them with this: (notice the echo of the 'pm') This resulted in my report showing me the model numbers just before the product name. I have not looked at the CSV template yet - but at least this is functioning for me online. I hope it helps someone else as well :) More...
__________________ Michael Sasek osCMax Developer *** Do not PM me requesting paid help. The only paid work I do is for AABox Web Hosting customers *** Stay Up To Date with everything osCMax: Free osCMax Newsletters - Security notices, New Releases, osCMax News osCMax on Twitter - Up to the minute info as it happens. Know it first. osCMax User Manual - osCMax Templates - Advanced Template Tutorial |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sales Tax identification report | josemanuel | osCMax v2 Features Discussion | 0 | 12-26-2006 06:47 PM |
| Custom Sales Report for osC(MAX/ommerce) | imjasonn | osCMax v2 Features Discussion | 0 | 09-27-2005 07:29 AM |
| Help hacking in the 'sales report' contrib | groggory | osCMax v1.7 Discussion | 3 | 05-10-2005 07:32 AM |
| Bug report 1147 | razz2 | osCMax v1.7 Discussion | 1 | 02-22-2005 01:13 PM |
| Stock Report | siric | osCMax v1.7 Discussion | 2 | 11-17-2003 05:10 AM |