*

Hunter777

  • ****
  • 153 posts
View Counter in Search View for Premium Ads in top block
« on: April 11, 2018, 06:54:40 PM »
If you ON - Show Premium Listings block on Search Page then every time when you refresh a search page or selecting next page - View counter for premium listings in top block increasing by 2 times.

Where it could be corrected ?

*

MB Themes

Re: View Counter in Search View for Premium Ads in top block
« Reply #1 on: April 12, 2018, 07:32:43 AM »
@Hunter777
View counter is handled by osclass core. It may be caused because lisiting is showed twice - as premium - as regular
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hunter777

  • ****
  • 153 posts
Re: View Counter in Search View for Premium Ads in top block
« Reply #2 on: April 12, 2018, 03:50:07 PM »
It's clear. It is not clear how this can be changed?

*

Hunter777

  • ****
  • 153 posts
Re: View Counter in Search View for Premium Ads in top block
« Reply #3 on: April 12, 2018, 03:52:04 PM »
Do not tell what file-code is responsible for displaying views in a duplicate for a premium block?

*

MB Themes

Re: View Counter in Search View for Premium Ads in top block
« Reply #4 on: April 12, 2018, 08:47:04 PM »
It is in core files, not sure where, do not use to change core
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

ferry

  • ****
  • 155 posts
Re: View Counter in Search View for Premium Ads in top block
« Reply #5 on: April 13, 2018, 01:24:34 AM »
in main.php around line 70add the osc_item_is_premium  part  and 1 more <?php } ?>


search this and add the red parts


Code: [Select]
        <?php if( osc_count_latest_items() > 0) { ?>
          <div class="block">
            <div class="wrap">
              <?php $c 1?>
              <?php while ( osc_has_latest_items() ) { 
 <?php if(osc_item_is_premium() == 0) { ?>

                <?php veronika_draw_item($c'gallery'); ?>
               
                <?php $c++; ?>
              <?php ?>
  <?php ?>
            </div>
          </div>

*

Hunter777

  • ****
  • 153 posts
Re: View Counter in Search View for Premium Ads in top block
« Reply #6 on: April 13, 2018, 01:49:20 AM »
When the page is updated, +1 views in the premium ad block are added. How do I make sure that when I refresh the page my ad views in the premium block are not pummeled? And your code with an error but does not work vseravno to solve this problem

*

ferry

  • ****
  • 155 posts
Re: View Counter in Search View for Premium Ads in top block
« Reply #7 on: April 13, 2018, 01:59:42 AM »
It works for me and dont have duplicated premium ads

*

Hunter777

  • ****
  • 153 posts
Re: View Counter in Search View for Premium Ads in top block
« Reply #8 on: April 13, 2018, 02:00:41 AM »
Can you describe in detail what I need to do and where to change?

*

MB Themes

Re: View Counter in Search View for Premium Ads in top block
« Reply #9 on: April 13, 2018, 12:30:45 PM »
@Hunter777
I just get into my mind that there used to be also problem with showing views. If you had i.e. 3 locales/languages and 20 views on item, osclass returned 60 views instead.... some fix was on osclass forums.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots