Page 1 of 1

GetProductBreakdown Tweak Possible?

Posted: Tue Aug 05, 2014 12:09 pm
by abradley
Hi all, I am working on making improvements to the sales reports. The method the GOLD sales report uses to populate the grid is:

Code: Select all

public static IList<ProductBreakdownSummary> GetProductBreakdownSummary(
	DateTime fromDate,
	DateTime toDate,
	int vendorId,
	string sortExpression
)
We do not have a need for vendor at all, is it possible to get this functionality with a filter on Manufacturer instead without the source code? Im pretty sure I can hack something up of course but I feel there is an easier way I am overlooking(obviously the easiest is source -_- ).

Re: GetProductBreakdown Tweak Possible?

Posted: Tue Aug 05, 2014 12:28 pm
by abradley
So far, it looks to me like my best path without source is to do a custom query in a similar fashion to this: viewtopic.php?f=65&t=17153

Re: GetProductBreakdown Tweak Possible?

Posted: Wed Aug 06, 2014 3:56 am
by jmestep
If you want various new reports and can do a sql query, we have a plugin that enables you to run any select sql query and view the results on the screen and/or export the results to a file. It is one of our best selling plugins because if you know sql, you can get an unlimited number of reports for about the price you would pay a developer to do one admin page report. I wrote it because I had worked for an ecommerce merchant and had written a CRM system using MS Access where we stored all our order information. They were always wanting new reports ASAP. Here is a link to it
http://www.web2market.com/Report-Export-Wizard-P96.aspx

Re: GetProductBreakdown Tweak Possible?

Posted: Fri Aug 29, 2014 5:36 am
by mazhar
abradley wrote:Hi all, I am working on making improvements to the sales reports. The method the GOLD sales report uses to populate the grid is:

Code: Select all

public static IList<ProductBreakdownSummary> GetProductBreakdownSummary(
	DateTime fromDate,
	DateTime toDate,
	int vendorId,
	string sortExpression
)
We do not have a need for vendor at all, is it possible to get this functionality with a filter on Manufacturer instead without the source code? Im pretty sure I can hack something up of course but I feel there is an easier way I am overlooking(obviously the easiest is source -_- ).
What about first get the break down summary using current method but make sure pass 0 as vendor id so that it doesn't filter over vendors. Once you have the result set you process it again and this time filter them over products which have desired manufacturer. This will have some performance hit to due to double processing but it should be the easiest option with much less effort.

Re: GetProductBreakdown Tweak Possible?

Posted: Thu Sep 04, 2014 6:55 am
by abradley
So your idea is good Mazhar, and it works as intended. We did buy the source code so I know we can get this done now. Right now my main obstacle is grabbing the sales data on each product's variants. I need a 30, 60, and 90 day "quantity sold" for each variant of every product in a manufacturer line. Time to read up on some nhibernate :P

Re: GetProductBreakdown Tweak Possible?

Posted: Mon Sep 08, 2014 8:06 am
by mazhar
abradley wrote:So your idea is good Mazhar, and it works as intended. We did buy the source code so I know we can get this done now. Right now my main obstacle is grabbing the sales data on each product's variants. I need a 30, 60, and 90 day "quantity sold" for each variant of every product in a manufacturer line. Time to read up on some nhibernate :P
While reading about Nhibernate you will come across HBM mappings! I posted the instructions about how to enable Visual Studio IntelliSense support for them here viewtopic.php?f=47&t=18091
I hope they will make it easy to deal with mappings.