Announcement

Collapse
No announcement yet.

Displaying images to coincide with Promotions

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

  • Displaying images to coincide with Promotions

    I'm contemplating displaying ad images on my home page to coincide with promotions set up in the Promotions Manager (12 in a row on different days).

    I'm concerned about being able to display the correct promotion because the validity of the promotion is based on 3DCart's server time (I assume) and I'll only be able to determine which ad to display based on the client's timestamp.

    Are my assumptions correct? Has anyone tried to do something similar?

    Thanks!
    Joanne Barker
    VS Web Design
    [email protected]

  • #2
    Your assumption is correct. Javascript can only get the client's time, not the server time. There may be a creative way to work around this but I cannot think of one off the top of my head.

    Comment


    • #3
      I wish I had a little PHP access....
      Joanne Barker
      VS Web Design
      [email protected]

      Comment


      • #4
        So no way to get the server time, eh?
        Joanne Barker
        VS Web Design
        [email protected]

        Comment


        • #5
          The system runs on ASP on a Windows server, so no PHP. And no ASP access.

          The only workaround I can think of would be to run a script on your own server that queries your store database using the advanced API and from that changes the image or whatever, and then your site would just load that image. No clean workaround.

          Comment


          • #6
            Interesting...I'll have to look into the advanced API. Thanks! I see your comments a lot on here and you always have great insight!
            Joanne Barker
            VS Web Design
            [email protected]

            Comment


            • #7
              Didn't really see where a date/timestamp would be returned from the API, but came up with another workaround.

              These are just promotions so not uber time sensitive. So, each promotion will be active really 3 days so that regardless of the server's time and regardless of the client's time, the promo will always be valid when an ad is displayed. Not pretty, but will result in happy customers.
              Joanne Barker
              VS Web Design
              [email protected]

              Comment


              • #8
                Yeah, I think client time is fine for this purpose.

                The advanced API won't return the server time, but you can query the database to see what promotion(s) are currently active.

                Comment


                • #9
                  Brilliant!
                  Joanne Barker
                  VS Web Design
                  [email protected]

                  Comment

                  Working...
                  X