osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Sales Report 2

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 ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Closed Thread

 

LinkBack Thread Tools
  #1  
Old 01-31-2007, 03:03 PM
michael_s's Avatar
osCMax Developer


 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 15,713
Thanks: 139
Thanked 606 Times in 519 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post Sales Report 2

I am not strong in PHP - so make this edit at your own risk - *BACKUP FIRST* !!

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -8. The time now is 11:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design