Advertisement:

Author Topic: User Statistics  (Read 1272 times)

andresvendedor

  • Jr. Member
  • **
  • Posts: 59
User Statistics
« on: August 11, 2012, 04:14:26 am »
Users should see a statistics for their own ads, for example under manage ads it could tell how many views they have had.

Andre

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: User Statistics
« Reply #1 on: August 11, 2012, 04:52:58 am »
Hi andresvendedor,

You can add that to your theme by adding this line of code.


<?php echo osc_item_views(); ?>


Jay

andresvendedor

  • Jr. Member
  • **
  • Posts: 59
Re: User Statistics
« Reply #2 on: August 12, 2012, 01:58:38 am »
I tried it, and it seems to only return the amount of views of the first publishing day, and not the total amount of views.

I look into table: oc_t_item_stats and notice that it logs views and stores the amount of views pr day as separate records. According to this table it seems that <?php echo osc_item_views(); ?> only returns the amount of views from the day the ad was published.

Am I right? If so, how could I display the total amount of views?

PS: I am using the real estate theme.

Thanks in advance

Andres
« Last Edit: August 12, 2012, 02:06:08 am by andresvendedor »

andresvendedor

  • Jr. Member
  • **
  • Posts: 59
Re: User Statistics
« Reply #3 on: August 16, 2012, 03:11:43 pm »
Turned out I needed to upgrade to OSclass 3.0 to get the correct statistics. Works fine now  :)

Thx

Andres