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

enter image description here

tell me if u didn't understand


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -