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


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

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

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,329
Thanks: 68
Thanked 322 Times in 305 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


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
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 07: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 02:13 PM
Stock Report siric osCMax v1.7 Discussion 2 11-17-2003 06:10 AM


All times are GMT -8. The time now is 11:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax