This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

siken

  • ****
  • 136 posts
Visitor counter code
« on: August 16, 2018, 05:55:37 PM »
In loop-single.php when clicking on the photo, I created a preview using the modal of item-send-friend.php, but I do not know what line I should put in that file so that each time I click on the photo, I add the view to the visualization counter...

What is the visitor counter code?

*

MB Themes

Re: Visitor counter code
« Reply #1 on: August 16, 2018, 06:00:40 PM »
I do not think there is function for that, in model check item.php for class that do it.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

siken

  • ****
  • 136 posts
Re: Visitor counter code
« Reply #2 on: August 16, 2018, 07:42:05 PM »
Then, in item.php which line is the one that activates the hits counter?

*

MB Themes

Re: Visitor counter code
« Reply #3 on: August 17, 2018, 09:55:23 AM »
@alexandromt
oc-includes/osclass/model/item.php
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

siken

  • ****
  • 136 posts
Re: Visitor counter code
« Reply #4 on: August 18, 2018, 10:09:44 AM »
Well, thank you, but now it would be necessary to know where to put it so that each time that item-send-friend.php is opened a visit to the visit counter is added ...

Marked as best answer by frosticek on August 25, 2018, 01:28:58 PM
*

MB Themes

Re: Visitor counter code
« Reply #5 on: August 25, 2018, 01:28:53 PM »
@alexandromt
You should try bit more....

Code: [Select]
ItemStats::newInstance()->increase('i_num_views', osc_item_id());
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots