• So for example, for a website we have physical stores in Sweden, Belgium, France and Germany but when a user from Belgium visits the site he has no need to see which stores there are in Sweden for example.

    How can I limit that so it only shows the stores from (the country) from where the user is?

    We are working with the WPML plugin though, I tried adding different stores in different language variations but no bueno. Still shows on all ‘languages’

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    If your comfortable with code, then I can explain how to possible make this work ( it’s untested ).

    Thread Starter lucasssssd

    (@lucasssssd)

    Thanks for the reply Tijmen.

    Yes I’m somewhat comfortable with code. I’m looking forward to your reply.

    Thank you for your time!

    Plugin Author Tijmen Smit

    (@tijmensmit)

    First you need to follow the first two steps described here.

    Next you need to modify the original SQL query with this and this filter so it includes the returned country iso code.

    This code includes an additional line for the zip meta data, just change that to wpsl_country_iso and include it in the main query.

    Don’t copy all the code from the zip example, start with copying the original sql query and include the inner join for the wpsl_country_iso based on the country code returned based on the users ip.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only show stores based on the users country?’ is closed to new replies.