Skip to content

[WIP] V1.4.x.shopinvader Geoip - #132

Open
sylvainc wants to merge 21 commits into
locomotivecms:v1.4.xfrom
akretion:v1.4.x.shopinvader-geoip
Open

[WIP] V1.4.x.shopinvader Geoip#132
sylvainc wants to merge 21 commits into
locomotivecms:v1.4.xfrom
akretion:v1.4.x.shopinvader-geoip

Conversation

@sylvainc

@sylvainc sylvainc commented Apr 8, 2019

Copy link
Copy Markdown

Hello,

This patch is a proof of concept (DO NOT MERGE IT!), major refactors/improvements needed (l have a limited knowledge in Ruby/Rails/Steam) but it seems to works!

The goal is to create a new liquid variable called country which as its name indicates allows to determine from which country the query comes from, which is very useful in multi-lingual/multi-country sites.

Technically the language is detected by the using a GeoIP database (Maxmind) which allows from the IP address of the visitor to determine the country.

As this search is expensive we use a specific cookie to store this information in the next queries, and a country parameter in the URL allows to modify this cookie and thus the current country of the user.

I'will try to improve this patch in the next days...

Regards

sebastienbeau and others added 21 commits June 25, 2018 15:04
…fy the code. Smtp key are now hardcoded, only stmp namespace is customizable
…o display the index page in the default locale by calling path_to
…tead of the session, so you can cache it easier with external proxy
…the service registred already have keep in memory the information of the person logged. By doing a redirect we are sure to build a page without information that depend of the current sign out user
…his raise an issue when injecting cookie. As cookies are not needed for robots.txt we do not pass them
[FIX] solve issue on robot.txt page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants