X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Total Members (https://forum.x-cart.com/showthread.php?t=9994)

TheComputerGuy 10-24-2004 05:50 PM

Total Members
 
Hi there,
I need to get the total number of registered users I have in my database out. I also would like to get the total online.

How would I do that??

I would appreciate any advice,

Chris

lildawg 10-25-2004 11:59 AM

What do you mean by out? I am a little bit confused on what you are trying to do please explain a little better.

pmstudios 10-25-2004 12:28 PM

There's already a Users online module you could use. Take a look in skin1/modules/Users_online/

To get the total number of registered customers in your database
Code:

$result = mysql_query("SELECT login FROM $sql_tbl[customers] WHERE usertype='C'");
$total_registered_users = mysql_num_rows($result);

$smarty->assign("total_registered_users", $total_registered_users);



P.S. You should put your X-Cart version in your forum signature

groovico 10-26-2004 03:48 AM

If you want to export customer details you can use quite a few of our x-cart add ons for this type of thing.

http://www.firetanksoftware.com/x-cart-addon-features.html

TheComputerGuy 10-27-2004 01:14 PM

$total_registered_users

Would that be what I put in the template?

pmstudios 10-27-2004 01:21 PM

Quote:

Originally Posted by TheComputerGuy
$total_registered_users

Would that be what I put in the template?



Yes, in the template you would use {$total_registered_users}

If you want to display the total on every page, you'll need to include the PHP code from my previous post in a file like auth.php


All times are GMT -8. The time now is 06:49 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.