Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2011
    Posts
    339
    Plugin Contributions
    0

    Default Is It Possible To Create A One-Time Popup "In Front Of" The Index.php Page?

    We'd like to create a pop-up that will appear when a person visits a site. We'll be using it as an adult-site warning, so it needs to have responsive "enter" and "go away" buttons...and only appears when the site initially loads. It won't appear again no matter how many pages the person views...but if they close the site and come back, it will reappear.

    Is that possible using ZenCart? If not, can someone suggest a different program that can do the job?

    Thanks very much for your help!

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Is It Possible To Create A One-Time Popup "In Front Of" The Index.php Page?

    That's certainly possible! The easiest way would be to add an extra-function file (in /includes/functions/extra_functions) that checks to see whether the customer has already accepted the warning (by interrogating whether the variable $_SESSION['warning_accepted'] is set).

    If that variable is not set, the customer is redirected to a new page ('welcome') that displays your message with a checkbox that indicates that they've read and accept the 'warning' and a "go" button.

    When the customer clicks the go-button, the welcome page's processing checks to see if the checkbox has been checked. If the checkbox has been checked, the variable $_SESSION['warning_accepted'] is set to true and the customer is redirected to the main/index page; otherwise, the "welcome" page is redisplayed.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 12 Jul 2016, 04:21 PM
  2. I have a php closing tag symbol "?>" on the top left side Create Account Page - HELP!
    By techschema in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 17 Aug 2010, 02:22 PM
  3. "one time charge" in the confirmation email
    By Rastabloke in forum General Questions
    Replies: 10
    Last Post: 17 Oct 2009, 10:16 PM
  4. How to take out the "New Products For November" section from the front page?
    By AZUKI in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Nov 2007, 01:45 AM
  5. Replies: 1
    Last Post: 22 Sep 2007, 07:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR