opencart2.x - How to show total user online OpenCart 2.0x -
i'm new, want show how many users (customer & visitor) online. find commercial extension , it's older version.
can point right direction on ?
edit 2:
add function in opencart22\catalog\model\catalog\category.php
public function gettotalcustomersonline($data = array()) { $sql = "select count(*) total `" . db_prefix . "customer_online`"; $query = $this->db->query($sql); return $query->row['total']; }
and add code in \opencart22\catalog\controller\common\header.php
$customer_total = $this->model_catalog_category->gettotalcustomersonline(); echo "customer online".$customer_total;
edit 1 opencart have function show online visitor/customer (on admin dashboard)
you can edit code , display on website
tell me if u didn't understand