Announcement

Collapse
No announcement yet.

If visitor IP address is then display Message

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

    If visitor IP address is then display Message

    I am trying to find a way if "customers or visitors ip address= " then display a special message to the customer.

    Of course this will only work with dedicated ip addresses

    has anyone attempted something like this before.

    #2
    Simple, basically:

    [code]
    <mvt:if expr="s.remote_addr EQ '123.123.123.123'">
    Show Message
    </mvt:if>

    If you want to do a set of IPs, use this form

    <mvt:if expr="'|'$s.remote_addr$'|' IN '|123.123.123.123|221.221.222|232.232.232.232|'">
    Show Message
    </mvt:if>
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Very cool.

      Can you set an IP adress to be in pricegroup using this same method?
      example would be 10% off all item in store

      Comment


        #4
        Not a traditional price group since those are tied to customer accounts. You could perhaps message them a '10% coupon' that no one else without the specific IP would see...but of course, those customers could share that coupon.

        One thing that we as site developers find most helpful is knowing "what you are trying to achive" as opposed to "how you think you can achieve 'something'". Often, the answer to "how do I break through this impenetrable door is "go though the open window".
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          I am not a fan of coupon. is there a way to do 10% off site wide based on customer IP. This was you know they can not share the coupon code. and it is based on that location only

          Comment


            #6
            Not that I know of. Pricing controls are pretty low level to ensure people can't come to your site and fake prices. You might be able to use something like ToolBelt or Toolkit (add on modules) to temporarily put visitors into a price group.
            Bruce Golub
            Phosphor Media - "Your Success is our Business"

            Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
            phosphormedia.com

            Comment


              #7
              Could you trigger applying the coupon in the background without showing it to the customer or requiring action on their part? It seems like a little AJAX or mvt:call would do the trick nicely.

              Comment


                #8
                I haven't tested this, but something like this should work to automatically apply a coupon.

                Code:
                <mvt:assign name="g.Coupon_Code" Value="'20OFF'" /> 
                 <mvt:do file="g.Module_Feature_PGR_RT" name="l.success" value="Action_ApplyCouponToBasket()" />
                This is the same function that gets called when someone submits the coupon box from the front end.
                Brennan Heyde
                VP Product
                Miva, Inc.
                [email protected]
                https://www.miva.com

                Comment


                  #9
                  Originally posted by Brennan View Post
                  I haven't tested this, but something like this should work to automatically apply a coupon.

                  Code:
                  <mvt:assign name="g.Coupon_Code" Value="'20OFF'" />
                  <mvt:do file="g.Module_Feature_PGR_RT" name="l.success" value="Action_ApplyCouponToBasket()" />
                  This is the same function that gets called when someone submits the coupon box from the front end.

                  I would love to say this worked but it seems to put header into a loop and continued repeating greeting I place around customer IP address

                  Comment

                  Working...
                  X