Announcement

Collapse
No announcement yet.

Is there a Miva variable that contains the customer's IP address?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is there a Miva variable that contains the customer's IP address?

    Is there a Miva variable that contains the customer's IP address on the OPAY page?
    Larry
    Luce Kanun Web Design
    www.facebook.com/wajake41
    www.plus.google.com/116415026668025242914/posts?hl=en



    #2
    I believe it's s.Remote_Addr. Depending on what you're going to use it for, there can sometimes be issues with utilizing the visitor's IP address if three conditions are met:

    1) Your site is IPv6-enabled
    2) The visitor is on IPv6 (common for Comcast users since their network is years ahead of other ISP's)
    3) You're sending it to something that does not expect to receive an IPv6 address

    An example of this is authorize.net's fraud filters; they ask that you submit the visitor's IP to them in the variable x_customer_ip but don't bother to tell you that if you send it an IPv6 address, it will cause a decline.

    If your site is IPv6 enabled and you don't have access to an internet provider that is IPv6-enabled, our staff can test things for you as our offices have IPv6.
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      Hi David:
      Variable &mvt:system:remote_addr; is shown as populated with my ip address in the sfnt Token List but when I added it to my sfnt page the ip address doesn't display.
      We are hosted by miva, How does that relate to the 3 factors you listed?
      Thanks, Larry
      Larry
      Luce Kanun Web Design
      www.facebook.com/wajake41
      www.plus.google.com/116415026668025242914/posts?hl=en


      Comment


        #4
        I don't think s.remote_addr is available for display by default, you would have to assign it to another variable using mvt:assign first, then it should display accordingly:

        Code:
        <mvt:assign name="l.settings:current_ip" value="s.REMOTE_ADDR" />
        &mvt:current_ip;

        Comment


          #5
          That works.
          Thanks!
          Larry
          Luce Kanun Web Design
          www.facebook.com/wajake41
          www.plus.google.com/116415026668025242914/posts?hl=en


          Comment


            #6
            Originally posted by wajake41 View Post
            Hi David:
            We are hosted by miva, How does that relate to the 3 factors you listed?
            Thanks, Larry
            If you're only using the IP for display purposes, then safe to ignore the warning. If you're using it for sending to a third party service, and a failure of that service could prevent page load or a transaction, you'd want to test that they're actually set up to receive an IPv6 address in the data they want to be sent. If you encountered an issue, the only way to avoid it would be to have us disable IPv6 on the site in question. That goes back to my example earlier; anyone using authorize.net fraud filters can't also have their site IPv6 enabled because our authorize.net payment module is set to pass them the IP address of the shopper, and if the IP is IPv6, and fraud filters are on, every order attempt from an IPv6-enabled customer gets declined.
            David Hubbard
            CIO
            Miva
            [email protected]
            http://www.miva.com

            Comment


              #7
              Apparently you can't display system variables by writing entities such as mvt:system:remote_addr; . You have to mvt:assign s.remote_addr to some other variable, or use it in an mvt:eval or other expression that will display it. This is according to the video at http://www.miva.com/videos/web_devel...stem-variables (starting at about 3 mins. 35 secs.).
              Kent Multer
              Magic Metal Productions
              http://TheMagicM.com
              * Web developer/designer
              * E-commerce and Miva
              * Author, The Official Miva Web Scripting Book -- available on-line:
              http://www.amazon.com/exec/obidos/IS...icmetalproducA

              Comment


                #8
                I've had success with this example writing and displaying it on the page:
                HTML Code:
                <mvt:assign name="g.your_ip" value="s.remote_addr" />
                <p>Your IP address is <i style="font-size: 300%;">&mvte:global:your_ip;</i></p>

                Comment

                Working...
                X