simple setup for allowing visitors to choose their country

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nicole

    simple setup for allowing visitors to choose their country

    Hi

    I need to be able to change the currency and some form fields displayed on
    my website depending on where the visitor is based. I don't need a fully
    functional cart, just a kinda either display '$10' or '£7' sort of thing!

    I was planning on having a map on my opening screen with hotspots over the
    countries. On the links for the hot spots I was planning to have something
    like href="functions .php?FuncToExec =countrySelectU S"> in the functions.php i
    was going to set a session variable to the country ie 'US' and then
    automatically move to my normal page. Then in my forms etc I was planning on
    using if statements to select price etc.

    This seems rather long winded! Is it the right way to do it?
    Thanks for any help given
    NO




  • John Bokma

    #2
    Re: simple setup for allowing visitors to choose their country

    "Nicole" <nickywebsterjo hns@yahoo.co.uk > wrote:
    [color=blue]
    > Hi
    >
    > I need to be able to change the currency and some form fields
    > displayed on my website depending on where the visitor is based. I
    > don't need a fully functional cart, just a kinda either display '$10'
    > or '£7' sort of thing![/color]

    How many currencies?
    [color=blue]
    > I was planning on having a map on my opening screen with hotspots over
    > the countries.[/color]

    World map? Are you going to support them all? Is every visitor able to find
    his/her country on this map?
    [color=blue]
    > On the links for the hot spots I was planning to have
    > something like href="functions .php?FuncToExec =countrySelectU S"> in the
    > functions.php i was going to set a session variable to the country ie
    > 'US' and then automatically move to my normal page. Then in my forms
    > etc I was planning on using if statements to select price etc.[/color]

    php -> use a hash with the key the currency code, and the value the
    conversion rate. If the key is undefined, report "bad currency", don't fix
    it to a default (you might overlook a bug that way).

    --
    John Perl SEO tools: http://johnbokma.com/perl/
    or have them custom made
    Experienced (web) developer: http://castleamber.com/

    Comment

    • Miguel Cruz

      #3
      Re: simple setup for allowing visitors to choose their country

      Nicole <nickywebsterjo hns@yahoo.co.uk > wrote:[color=blue]
      > I need to be able to change the currency and some form fields displayed on
      > my website depending on where the visitor is based. I don't need a fully
      > functional cart, just a kinda either display '$10' or '£7' sort of thing!
      >
      > I was planning on having a map on my opening screen with hotspots over the
      > countries.[/color]

      That'll be popular with people from Singapore, Monaco, etc.

      miguel
      --
      Hit The Road! Photos from 38 countries on 5 continents: http://travel.u.nu
      Latest photos: Burma; Hong Kong; Macau; Amsterdam; Grand Canyon; Amman

      Comment

      • www.1-script.com

        #4
        Re: simple setup for allowing visitors to choose their country

        Nicole wrote:

        [color=blue]
        > Hi[/color]
        [color=blue]
        > I need to be able to change the currency and some form fields displayed
        > on
        > my website depending on where the visitor is based. I don't need a
        > fully
        > functional cart, just a kinda either display '$10' or '£7' sort of
        > thing![/color]


        I think the right way to do that would be using the GeoIP PHP API:



        This way you don't have to ask, just give them the custom layout based on
        their IP Address. Not without its limitations, but think about
        human-induced error factor: it is highly unlikely that you will get an
        honest answer from a visitor coming from Russia, India, China or any other
        place that online retailers don't like much. They know for the fact that
        they will be treated badly and maybe even denied access to the site, so
        why bother answering this question honestly? It's so easy to just pick
        U.S.A. from the list you've provided.

        --
        Cheers,
        Dmitri
        See Site Sig Below
        -------------------------------------



        --
        ##-----------------------------------------------##
        Article posted with Web Developer's USENET Archive

        Web and RSS gateway to your favorite newsgroup -
        alt.comp.lang.p hp,alt.php,alt.www.webmaster,comp.lang.php - messages and counting!
        ##-----------------------------------------------##

        Comment

        • Nicole

          #5
          Re: simple setup for allowing visitors to choose their country

          Hiya

          As I said its a simple solution that needed. I wont be supporting all
          countries, only the English speaking countries that I choose in the future
          to do marketing in.

          So small countries are not an issue, neither are countries such as china
          etc.

          I am trying to implement the idea, but cant seem to get my function executed
          from the hyper link :(

          N

          "www.1-script.com" <info_at_1-script_dot_com@ foo.com> wrote in message
          news:S0d7f.1862 09$cw3.36315@fe 01.news.easynew s.com...[color=blue]
          > Nicole wrote:
          >
          >[color=green]
          >> Hi[/color]
          >[color=green]
          >> I need to be able to change the currency and some form fields displayed
          >> on
          >> my website depending on where the visitor is based. I don't need a
          >> fully
          >> functional cart, just a kinda either display '$10' or '£7' sort of
          >> thing![/color]
          >
          >
          > I think the right way to do that would be using the GeoIP PHP API:
          >
          > http://www.maxmind.com/app/php
          >
          > This way you don't have to ask, just give them the custom layout based on
          > their IP Address. Not without its limitations, but think about
          > human-induced error factor: it is highly unlikely that you will get an
          > honest answer from a visitor coming from Russia, India, China or any other
          > place that online retailers don't like much. They know for the fact that
          > they will be treated badly and maybe even denied access to the site, so
          > why bother answering this question honestly? It's so easy to just pick
          > U.S.A. from the list you've provided.
          >
          > --
          > Cheers,
          > Dmitri
          > See Site Sig Below
          > -------------------------------------
          >
          >
          >
          > --
          > ##-----------------------------------------------##
          > Article posted with Web Developer's USENET Archive
          > http://www.1-script.com/forums
          > Web and RSS gateway to your favorite newsgroup -
          > alt.comp.lang.p hp,alt.php,alt.www.webmaster,comp.lang.php - messages and
          > counting!
          > ##-----------------------------------------------##[/color]


          Comment

          • Gordon Burditt

            #6
            Re: simple setup for allowing visitors to choose their country

            >I think the right way to do that would be using the GeoIP PHP API:[color=blue]
            >
            >http://www.maxmind.com/app/php
            >
            >This way you don't have to ask, just give them the custom layout based on
            >their IP Address.[/color]

            That's great to determine a DEFAULT, but let the user override it.
            People do occasionally visit other countries. People could access
            the Internet via international long-distance calls. And GeoIP is
            far from perfect in determining how an international company allocates
            its IP addresses within its own network (information which they
            may consider proprietary).
            [color=blue]
            >Not without its limitations, but think about
            >human-induced error factor: it is highly unlikely that you will get an
            >honest answer from a visitor coming from Russia, India, China or any other
            >place that online retailers don't like much.[/color]

            This was supposed to be a way of displaying things in the correct
            currency, NOT a security measure to exclude people.
            [color=blue]
            >They know for the fact that
            >they will be treated badly and maybe even denied access to the site, so
            >why bother answering this question honestly? It's so easy to just pick
            >U.S.A. from the list you've provided.[/color]

            And if they like looking at prices in US dollars, that's perfectly fine.
            They may not be able to spend their own country's currency outside
            that country anyway, and they may end up having to pay in US dollars.

            Gordon L. Burditt

            Comment

            • Toby Inkster

              #7
              Re: simple setup for allowing visitors to choose their country

              Nicole wrote:
              [color=blue]
              > I was planning on having a map on my opening screen with hotspots over the
              > countries.[/color]

              How do you expect Americans to use that?

              --
              Toby A Inkster BSc (Hons) ARCS
              Contact Me ~ http://tobyinkster.co.uk/contact

              Comment

              • R. Rajesh Jeba Anbiah

                #8
                Re: simple setup for allowing visitors to choose their country

                Nicole wrote:[color=blue]
                > I need to be able to change the currency and some form fields displayed on
                > my website depending on where the visitor is based. I don't need a fully
                > functional cart, just a kinda either display '$10' or '£7' sort of thing![/color]

                Looks wrong. Every currencies have different weightage. Say, for
                example 1Euro~55INR while 1USD~45INR.
                [color=blue]
                > I was planning on having a map on my opening screen with hotspots over the
                > countries.[/color]
                <snip>

                If supporting many countries, better not use the map at all. For
                example, India has different versioned map: Indian version of India,
                Pakistan version of India, CIA version of India, etc. So, there are
                more chances that it will hurt anyone of them when you prefer one map.
                (FYI, M$ had to touch their map of India in Win 95, IIRC).
                [color=blue]
                > This seems rather long winded! Is it the right way to do it?[/color]

                Better, look at other CMS source codes and implementation, esp one
                with all these supports.

                --
                <?php echo 'Just another PHP saint'; ?>
                Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

                Comment

                • Miguel Cruz

                  #9
                  Re: simple setup for allowing visitors to choose their country

                  www.1-script.com <info_at_1-script_dot_com@ foo.com> wrote:[color=blue]
                  > I think the right way to do that would be using the GeoIP PHP API:
                  >
                  > http://www.maxmind.com/app/php
                  >
                  > This way you don't have to ask, just give them the custom layout based on
                  > their IP Address. Not without its limitations, but think about
                  > human-induced error factor: it is highly unlikely that you will get an
                  > honest answer from a visitor coming from Russia, India, China or any other
                  > place that online retailers don't like much. They know for the fact that
                  > they will be treated badly and maybe even denied access to the site, so
                  > why bother answering this question honestly? It's so easy to just pick
                  > U.S.A. from the list you've provided.[/color]

                  One thing that really annoys me about Google is that when I use it from
                  another country, it redirects me to the "local" version and presents itself
                  in a language that more often than not, I can't understand. Then I have to
                  go in and set the language preferences for google.com.th or whatever - it
                  neither picks up on the setting I have for google.com, nor presents a
                  language option right on the main page.

                  Making bold yet inflexible guesses about people's preferences is quite often
                  a bad idea. It would be fine to present a recommended country selection, but
                  to insist on one based on IP address seems like a poor option.

                  Not to mention, of course, the unreliability of the practice in the first
                  place. If you look at the headers of my post you might think I'm in
                  Washington, DC, but I'm actually in Kuala Lumpur, some 10000 miles away.
                  There are proxy servers, corporate networks and VPNs, and all sorts of other
                  confounding factors.

                  miguel
                  --
                  Hit The Road! Photos from 38 countries on 5 continents: http://travel.u.nu
                  Latest photos: Burma; Hong Kong; Macau; Amsterdam; Grand Canyon; Amman

                  Comment

                  Working...