*

vidjii

  • ***
  • 59 posts
Add class clear cookie on all categorie + Logo
« on: March 30, 2017, 04:09:09 PM »
I have a lot of feedback from my users, on pages that display no ads.

After their first research , the location is registered for all categories, all future searches, It is totally illogic

Users should be able to save their favorite search, but it does not have to do this automatically.

The solution is to empty the cookie when person does a search, click on a category , click on logo , or just on search button.

https://drive.google.com/file/d/0B3KkxiuoxrfFUWVuOW15aWJMcHM/view

How i can add clear-cookie On it's button ?

 ( sorry google trad) :D

regards
vidjii




« Last Edit: March 30, 2017, 04:33:28 PM by vidjii »

*

MB Themes

Re: Add class clear cookie on all categorie + Logo
« Reply #1 on: March 30, 2017, 07:56:14 PM »
You see France in location only, but if you take look into source code, you will see that region is stored as well.
I will take a look why just country is shown in location input.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

vidjii

  • ***
  • 59 posts
Re: Add class clear cookie on all categorie + Logo
« Reply #2 on: March 30, 2017, 08:03:06 PM »
thx ;) Many moms do not understand why their search does not work , Thank you for her   ;)

*

MB Themes

Re: Add class clear cookie on all categorie + Logo
« Reply #3 on: March 31, 2017, 09:00:31 AM »
In functions.php replace function veronika_get_term with:

Code: [Select]
function veronika_get_term($term = '', $country = '', $region = '', $city = ''){
  if( $term == '') {
    if( $city <> '' && is_numeric($city) ) {
      $city_info = City::newInstance()->findByPrimaryKey( $city );
      $region_info = Region::newInstance()->findByPrimaryKey( $city_info['fk_i_region_id'] );
      return $city_info['s_name'] . ' - ' . $region_info['s_name'];
    }
 
    if( $region <> '' && is_numeric($region) ) {
      $region_info = Region::newInstance()->findByPrimaryKey( $region );
      return $region_info['s_name'];
    }

    if( $region <> '') {
      $location = $region;

      if( $city <> '' ) {
        $location .= ' - ' . $city;
      }

      if( $country <> '') {
        if(strlen($country) == 2) {
          $country_info = Country::newInstance()->findByCode( $country );
          $location .= ' (' . $country_info['s_name'] . ')';
        } else {
          $location .= ' (' . $country . ')';
        }
      }

      return $location;
    }

    if( $country <> '' && strlen($country) == 2 ) {
      $country_info = Country::newInstance()->findByCode( $country );
      return $country_info['s_name'];
    }

  } else {
    return $term;
  }
}
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

vidjii

  • ***
  • 59 posts
Re: Add class clear cookie on all categorie + Logo
« Reply #4 on: March 31, 2017, 11:39:56 AM »
thx  it is fix ;)

its possible to add refresh cache in link logo.jpg ? A lot of user use   logo for back to homepage

*

MB Themes

Re: Add class clear cookie on all categorie + Logo
« Reply #5 on: March 31, 2017, 11:43:51 AM »
It would be, but it is question if it is wanted.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots