WebSite X5Help Center

 
Michel M.
Michel M.
User

Site restrictions  en

Autor: Michel M.
Visitado 775, Seguidores 1, Compartilhado 0  

Dear Sirs

Looking to get help plese.

As we are whoesaler serve only London , is there any way to restrect clients of purchase if they are outside london?

Hope to get help soon as it's realy an important matter

Kind regards

Publicado em
2 RESPOSTAS - 2 ÚTEIS
Claudio D.
Claudio D.
Moderator
Usuário do mês IT

I hope you are on linux host...
if yes, you can do it by putting in the htaccess on your host
of instructions to allow only people from London to visit your site or your store folders , only.
everyone else you block them .
Or , better yet, with all pages in php,
you always redirect based on the visitor's IP ...
take a cue from here:
https://stackoverflow.com/questions/29088644/php-redirect-based-on-ip-addresses

Ler mais
Publicado em de Claudio D.
Stiac Engineering
Stiac Engineering
User

Interesting topic!

If instead of PHP you wanted to use JavaScript, you could use code that actually takes advantage of geographic location if you wanted, using actual GPS data you could use this code https://www.gebher.com/blog/index.php?redirect-based-on-geolocation

The operation is approximately simple, i.e. if the user is not within a kilometer radius, modifiable by us and from the headquarters of our business, he is redirected to an alert page to inform him appropriately.

I hope it can be useful.

Ler mais
Publicado em de Stiac Engineering