Vote for v1.5 Fixes

PrestaShop Forum: Build a free online shop. Count on the Community!

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum: Build a free online shop. Count on the Community!

Jump to content

 
Photo

Age Verification/Terms and conditions Splash page (Maybe in thickbox) on site load


  • Please log in to reply
8 replies to this topic
LeeWhitehouse

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts

Posted 12 February 2009 - 08:34 AM

I'm looking for something similar to the splash page on the www.spankwire.com website, something where a user has to agree to the terms and conditions on the page before being able to access content on the page. I thought this could maybe be done with thickbox or it could be fairly simple for anyone knows what they are going. Also a useful tools for any adult orientated e-shops.

Thickbox would be a nice effect so the page was made slightly opaque through a shadow on the focused box.

If someone could help me out it would be much appreciated.

Kind regards,
Lee

LeeWhitehouse

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts

Posted 12 February 2009 - 08:51 AM

http://yensdesign.co...p-using-jquery/

This may help anyone who wants to try and figure it out... will have a go myself in a short while but been up all night. Its 07:54am. Long nights work on this site!

LeeWhitehouse

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts

Posted 12 February 2009 - 09:57 AM

Ok... been working on this, managed to get it working by including the code in the header tpl in my theme directory. However everytime a page is loaded it likes to display the warning. I need it once per visit possibly or only on the main main page (store home directory).

Page i'm currently working on www.deltanineseeds.com

TropischBruin

    PrestaShop Fanatic

  • Moderators
  • 2199 posts

Posted 12 February 2009 - 10:02 AM

Should be related to your cookie.

Don't ask me how to do this :smirk:
Norman in 't VeldtModeratorPrestaShopForums
Help PrestaShop, make a donation!

LeeWhitehouse

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts

Posted 12 February 2009 - 01:10 PM

hmmm... could really do with somr help on things. Here are the current files:

header.tpl

<!-- Header -->       <link rel="stylesheet" href="http://www.deltanineseeds.com/store/themes/deltanineseeds/css/general.css" type="text/css" media="screen" />    [removed][removed]    [removed][removed]</head><body>    <div id="popupContact">        <a id="popupContactClose">x</a>        <h1>WARNING: NO USERS UNDER 18!</h1>        <p id="contactArea">            Before continuing on this site please note that you must agree to our terms and conditions which are viewable <a href="http://www.deltanineseeds.com/termsandconditions.php">here</a>.                              No users under the age of 18 may browse this site!                              Press ESCAPE, Click on X (right-top) or Click Out from the popup to continue on the site!         </p>    </div>    <div id="backgroundPopup"></div></body>   <div id="header">    <div id="Banner">{$HOOK_TOP}</div>   </div>




general.css

table {border-collapse:separate;border-spacing:0pt;}caption, th, td {font-weight:normal;text-align:left;}blockquote:before, blockquote:after, q:before, q:after {content:"";}blockquote, q {quotes:"" "";}a{cursor: pointer;text-decoration:none;}br.both{clear:both;}#backgroundPopup{display:none;position:fixed;_position:absolute; /* hack for internet explorer 6*/height:100%;width:100%;top:0;left:0;background:#000000;border:1px solid #cecece;z-index:1;}#popupContact{display:none;position:fixed;_position:absolute; /* hack for internet explorer 6*/height:384px;width:408px;background:#FFFFFF;border:2px solid #cecece;z-index:2;padding:12px;font-size:13px;}#popupContact h1{text-align:left;color:#6FA5FD;font-size:22px;font-weight:700;border-bottom:1px dotted #D3D3D3;padding-bottom:2px;margin-bottom:20px;}#popupContactClose{font-size:14px;line-height:14px;right:6px;top:4px;position:absolute;color:#6fa5fd;font-weight:700;display:block;}


popup.js

/***************************///@Author: Adrian "yEnS" Mato Gondelle//@website: www.yensdesign.com//@email: yensamg@gmail.com//@license: Feel free to use it, but keep this credits please!                    /***************************///SETTING UP OUR POPUP//0 means disabled; 1 means enabled;var popupStatus = 0;//loading popup with jQuery magic!function loadPopup(){    //loads popup only if it is disabled    if(popupStatus==0){        $("#backgroundPopup").css({            "opacity": "0.7"        });        $("#backgroundPopup").fadeIn("slow");        $("#popupContact").fadeIn("slow");        popupStatus = 1;    }}//disabling popup with jQuery magic!function disablePopup(){    //disables popup only if it is enabled    if(popupStatus==1){        $("#backgroundPopup").fadeOut("slow");        $("#popupContact").fadeOut("slow");        popupStatus = 0;    }}//centering popupfunction centerPopup(){    //request data for centering    var windowWidth = document.documentElement.clientWidth;    var windowHeight = document.documentElement.clientHeight;    var popupHeight = $("#popupContact").height();    var popupWidth = $("#popupContact").width();    //centering    $("#popupContact").css({        "position": "absolute",        "top": windowHeight/2-popupHeight/2,        "left": windowWidth/2-popupWidth/2    });    //only need force for IE6        $("#backgroundPopup").css({        "height": windowHeight    });    }//CONTROLLING EVENTS IN jQuery$(document).ready(function(){            //LOADING POPUP    //Click the button event!$(document).ready(function() {        //centering with css        centerPopup();        //load popup        loadPopup();    });                //CLOSING POPUP    //Click the x event!    $("#popupContactClose").click(function(){        disablePopup();    });    //Click out event!    $("#backgroundPopup").click(function(){        disablePopup();    });    //Press Escape event!    $(document).keypress(function(e){        if(e.keyCode==27 && popupStatus==1){            disablePopup();        }    });});


LeeWhitehouse

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts

Posted 12 February 2009 - 01:49 PM

Using klaus hartl jquery cookie plugin where should I put these values and under what conditions to make the popup only show if the cookie is not present or invalid. And to create a cookie when the popup has been closed once.

http://www.stilbuero...gin-for-jquery/

$.cookie('age_verification'); // get cookie

$.cookie('age_verification', { expires: 2 }); // set cookie with an expiration date seven days in the future

What changes must be made to popup.js?

Almost there now!

LeeWhitehouse

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts

Posted 12 February 2009 - 03:57 PM

Definately stuck on this one at the minute.

LeeWhitehouse

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts

Posted 12 February 2009 - 08:11 PM

So close yet so far...

Pop Warning is now working... but as for checking cookies as to whether to display the warning has really got me stuck in my tracks.

I would like for the cookie to generate when the warning has been closed through either of the 3 closure methods in popup.js. I would also like the cookie to expire on either each fresh visit to the site, 30 minutes from generation, or 1 day from generation so that the warning pops up again. Once closed a new cookie generated so the popup is again hidden and not causing disruption.

Someone out there must be able to help?

mrandre

    PrestaShop Apprentice

  • Members
  • PipPip
  • 33 posts

Posted 30 March 2009 - 11:05 PM

is this the final version on how to get it to work ??
i would like to do same, any update ?


hmmm... could really do with somr help on things. Here are the current files:

header.tpl

<!-- Header -->       <link rel="stylesheet" href="http://www.deltanineseeds.com/store/themes/deltanineseeds/css/general.css" type="text/css" media="screen" />    [removed][removed]    [removed][removed]</head><body>    <div id="popupContact">        <a id="popupContactClose">x</a>        <h1>WARNING: NO USERS UNDER 18!</h1>        <p id="contactArea">            Before continuing on this site please note that you must agree to our terms and conditions which are viewable <a href="http://www.deltanineseeds.com/termsandconditions.php">here</a>.                              No users under the age of 18 may browse this site!                              Press ESCAPE, Click on X (right-top) or Click Out from the popup to continue on the site!         </p>    </div>    <div id="backgroundPopup"></div></body>   <div id="header">    <div id="Banner">{$HOOK_TOP}</div>   </div>




general.css

table {border-collapse:separate;border-spacing:0pt;}caption, th, td {font-weight:normal;text-align:left;}blockquote:before, blockquote:after, q:before, q:after {content:"";}blockquote, q {quotes:"" "";}a{cursor: pointer;text-decoration:none;}br.both{clear:both;}#backgroundPopup{display:none;position:fixed;_position:absolute; /* hack for internet explorer 6*/height:100%;width:100%;top:0;left:0;background:#000000;border:1px solid #cecece;z-index:1;}#popupContact{display:none;position:fixed;_position:absolute; /* hack for internet explorer 6*/height:384px;width:408px;background:#FFFFFF;border:2px solid #cecece;z-index:2;padding:12px;font-size:13px;}#popupContact h1{text-align:left;color:#6FA5FD;font-size:22px;font-weight:700;border-bottom:1px dotted #D3D3D3;padding-bottom:2px;margin-bottom:20px;}#popupContactClose{font-size:14px;line-height:14px;right:6px;top:4px;position:absolute;color:#6fa5fd;font-weight:700;display:block;}


popup.js

/***************************///@Author: Adrian "yEnS" Mato Gondelle//@website: www.yensdesign.com//@email: yensamg@gmail.com//@license: Feel free to use it, but keep this credits please!                    /***************************///SETTING UP OUR POPUP//0 means disabled; 1 means enabled;var popupStatus = 0;//loading popup with jQuery magic!function loadPopup(){    //loads popup only if it is disabled    if(popupStatus==0){        $("#backgroundPopup").css({            "opacity": "0.7"        });        $("#backgroundPopup").fadeIn("slow");        $("#popupContact").fadeIn("slow");        popupStatus = 1;    }}//disabling popup with jQuery magic!function disablePopup(){    //disables popup only if it is enabled    if(popupStatus==1){        $("#backgroundPopup").fadeOut("slow");        $("#popupContact").fadeOut("slow");        popupStatus = 0;    }}//centering popupfunction centerPopup(){    //request data for centering    var windowWidth = document.documentElement.clientWidth;    var windowHeight = document.documentElement.clientHeight;    var popupHeight = $("#popupContact").height();    var popupWidth = $("#popupContact").width();    //centering    $("#popupContact").css({        "position": "absolute",        "top": windowHeight/2-popupHeight/2,        "left": windowWidth/2-popupWidth/2    });    //only need force for IE6        $("#backgroundPopup").css({        "height": windowHeight    });    }//CONTROLLING EVENTS IN jQuery$(document).ready(function(){            //LOADING POPUP    //Click the button event!$(document).ready(function() {        //centering with css        centerPopup();        //load popup        loadPopup();    });                //CLOSING POPUP    //Click the x event!    $("#popupContactClose").click(function(){        disablePopup();    });    //Click out event!    $("#backgroundPopup").click(function(){        disablePopup();    });    //Press Escape event!    $(document).keypress(function(e){        if(e.keyCode==27 && popupStatus==1){            disablePopup();        }    });});






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users