This topic contains 1 reply, has 2 voices, and was last updated by Sofia Moss Sofia Moss 2 years, 8 months ago.

Limit store results inside searched address' country

  • Hello there,
    have been using Super Store Finder for a lot of time – such a great plugin.

    Now we are looking for a way to limit the store results inside the country whose searched address belong to.

    Unfortunately we have to use really big radius (300km) which leads the plugin to display results from another countries sometimes.

    e.x. Let’s say that visitor searches an address inside Berlin – Germany, the plugin will possible display stores which belong to Poland (near the borders, but still Poland)

    We would like the plugin to somehow display stores only inside Germany, not Poland.

    Furthermore, we have tried to use the “Country” filter, but it was not suitable for us because client’s company has stores all over the world, which leads the plugin to generate a really long Countries list.

    Thanks in advance for you replies,
    Best Regards.

    Sofia Moss
    StaffSuper ContributorUser Level

    Hi there,

    Thanks for reaching out, I’m afraid the Country Filter is the only way to filter based on Country in the plugin, if you don’t wish certain country to be displayed in the filter, you can modify the code below.

    Edit wp-content/plugins/superstorefinder-wp/ssf-wp-functions.php

    Search for code below:

    $countrylist .= "<ul><li> <label class="ssflabel"><input id="storesCountry" class="js-inputify" name="storesCountry" type="radio" value="" /> ".$country_name_wpml." </label></li></ul>";

    And change it to:

    if($country_name_wpml != "Australia" || $country_name_wpml != "China") {
    
    $countrylist .= "<ul><li><label class="ssflabel"><input id="storesCountry" class="js-inputify" name="storesCountry" type="radio" value="" /> ".$country_name_wpml." </label></li</ul>";
    
    }
    

    Cheers,
    Sofia

The topic ‘Limit store results inside searched address' country’ is closed to new replies.