Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

A sales report based on users

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 08-07-2006, 01:47 PM
 
metinex metinex is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 82
 

Default

create_array is a function that I had created before figuring out func_query function.

I haven't tested but if you use func_query instead the code might work. I also added the code for create_array above in my first post. You need to place that code somewhere in include/func.php
__________________
Jay S

Xcart 4.1.3 & Mysql 5.0.20
Xcart 4.0.17 & Mysql 4.1
Apache 2.0 & Linux Whitebox 3
Reply With Quote
  #12  
Old 08-08-2006, 03:40 AM
 
banzai banzai is offline
 

Newbie
  
Join Date: Oct 2005
Posts: 9
 

Default

Hi,

thank you, I forgot to upload the modified func.php

I changed "mow_report.php" to "sales_report.php" in two of the files because it was giving me file not found errors. Now it works.

thank you for your help!
Reply With Quote
  #13  
Old 08-14-2006, 02:20 AM
 
jackel jackel is offline
 

Advanced Member
  
Join Date: May 2006
Location: United Kingdom
Posts: 48
 

Default

when searching for orders in previous days , weeks etc nothing happens. Any ideas?
__________________
MarkH
Web Development Manager
Jackel International Limited
X-Cart Version 4.0.13 + Customisations
http://www.tommeetippee.co.uk/
Reply With Quote
  #14  
Old 08-14-2006, 02:36 AM
 
metinex metinex is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 82
 

Default

Make sure the form tag is referring to sales_report.php ot whatever file name you assigned it in admin folder.

<form name="report" method="post" action="sales_report.php">
__________________
Jay S

Xcart 4.1.3 & Mysql 5.0.20
Xcart 4.0.17 & Mysql 4.1
Apache 2.0 & Linux Whitebox 3
Reply With Quote
  #15  
Old 08-15-2006, 05:21 AM
 
jackel jackel is offline
 

Advanced Member
  
Join Date: May 2006
Location: United Kingdom
Posts: 48
 

Default

Hi I did that and it still doesnt do the business!. Any further ideas?
__________________
MarkH
Web Development Manager
Jackel International Limited
X-Cart Version 4.0.13 + Customisations
http://www.tommeetippee.co.uk/
Reply With Quote
  #16  
Old 08-15-2006, 05:58 AM
 
metinex metinex is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 82
 

Default

I think that the problem might be related to html form issues.

Just check generated output to see everything is fine ti submit the form.

Other than that I have limited information about your problem to help.
__________________
Jay S

Xcart 4.1.3 & Mysql 5.0.20
Xcart 4.0.17 & Mysql 4.1
Apache 2.0 & Linux Whitebox 3
Reply With Quote
  #17  
Old 08-15-2006, 11:45 PM
 
jackel jackel is offline
 

Advanced Member
  
Join Date: May 2006
Location: United Kingdom
Posts: 48
 

Default

Code:
<TABLE border="0" cellpadding="0" cellspacing="0"> <FORM action="/shop/admin/sales_report.php" method="POST" name="asl_form"> <TR> <TD>Current language:</TD> <TD> <INPUT type="hidden" name="redirect" value=""> <SELECT name="asl" onChange="javascript: document.asl_form.submit()"> <OPTION value="DE">German</OPTION> <OPTION value="ES">Spanish</OPTION> <OPTION value="FR">French</OPTION> <OPTION value="GB" selected>English</OPTION> <OPTION value="IT">Italian</OPTION> </SELECT> </TD></TR> </FORM> </TABLE>

Code:
<form name="report" method="post" action="http://secure.tommeetippee.com/shop/admin/sales_report.php"> <input type="radio" name="lastday" value="0" checked> Today <input type="radio" name="lastday" value="1" > Last 1 day <input type="radio" name="lastday" value="7" > Last 7 day <input type="radio" name="lastday" value="30" > Last 30 day <input type="radio" name="lastday" value="365" > Last 365 day <input type="submit" style="margin-top:5px"> <div style="line-height:10px"></div> There are 1 orders. <table> <tr> <th align="left" width="160px">Login</th> <th style="padding-right:15px">Name</th> <th>Total</th> <th>Count</th> <th>Last Order</th> <th>Last Order #</th> <th>Referer</th> <th>Status</th> </tr> <tr> <td> <input style="padding-left:0px; padding-right:10px" onClick="document.report.action='sales_report.php?login=anonymous646'" title="anonymous646" type="submit" class="submitLink" value="anonymous646"> <input name='orderid' type='hidden' value='anonymous646' /> </td> <td>Name removed for data protection act</td> <td align="right">бё</td> <td align="center">1</td> <td width="105">Aug 16 08:11 AM</td> <td align="center">2666</td> <td></td> <td align="center">P</td> </tr> <tr><td>TOTAL</td><td></td><td align="right" >бёtotal</td> <td></td><td></td></tr> </table> <h2>NEW USERS WITH NO ORDER</h2> <table> <tr> <th align="left" width="160px">Login</th> <th style="padding-right:15px">Name</th> <th>Total</th> <th>Count</th> <th>Last Order</th> <th>Last Order #</th> <th>Referer</th> <th>Status</th> </tr> <tr> <td> <input style="padding-left:0px; padding-right:10px" onClick="document.report.action='sales_report.php?login=removed for data protection act'" title="removed" type="submit" class="submitLink" value="Noonoo"> <input name='orderid' type='hidden' value='Noonoo' /> </td> <td>removed name for data protection act</td> <td align="right"></td> <td align="center"></td> <td width="105">Aug 16 12:40 AM</td> <td align="center"></td> <td>other</td> <td align="center"></td> </tr> </table> </form>
__________________
MarkH
Web Development Manager
Jackel International Limited
X-Cart Version 4.0.13 + Customisations
http://www.tommeetippee.co.uk/
Reply With Quote
  #18  
Old 08-17-2006, 10:16 AM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default

I have followed the mod and displays the page, but i get a error which is:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\maxking\shisha\shopcart\include\func.php on line 5891

Now looking at the line the error is:

while ($query_result= mysql_fetch_array($result))

I am using x-cart 4.18

The full file that i put into the include/func.php is:

Code:
function create_array($query) { $result= mysql_query($query); $array_final = array(); while ($query_result= mysql_fetch_array($result)) array_push($array_final, $query_result); return ($array_final); }

As described in the installation instructions.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #19  
Old 08-18-2006, 01:27 AM
 
jackel jackel is offline
 

Advanced Member
  
Join Date: May 2006
Location: United Kingdom
Posts: 48
 

Default

Hi,

any solutions to the problem I have posted about? the forms look fine to me but if someone can offer any other suggestions I would be greatful.

As for this guys error above i'd say it could be that this function is not available to you on IIS with PHP, I used to find IIS very temperamental when it came to php!
__________________
MarkH
Web Development Manager
Jackel International Limited
X-Cart Version 4.0.13 + Customisations
http://www.tommeetippee.co.uk/
Reply With Quote
  #20  
Old 12-29-2010, 08:27 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: A sales report based on users

Hi,
Though it was an old thread.But anyone can successfully test and implement on X cart pro 4.1.x based store.I want to see a demo.
__________________
4.6.1 Platinum


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:00 AM.

   

 
X-Cart forums © 2001-2020