Forums / Templates, Stylesheets, Page Layout / Single click overlay image/text/window for homepage (summer closing style...)

Single click overlay image/text/window for homepage (summer closing style...)

Views: 836

Results 1 to 6 of 6
3 Sep 2012, 2:51 PM
#1
mickymix avatar

mickymix

New Zenner

Join Date:
Jun 2012
Posts:
41
Plugin Contributions:
0

Single click overlay image/text/window for homepage (summer closing style...)

Hi,
I would need to place a kind of "advice" at the homepage of my webshop, to make sure customers see it and don't bypass it too easily... and I don't even want it to be a boring thing...

Somethink like "We will be closed for holidays from xxx to yyy - Click to continue"

It would definitely be better if it could be an overlay window with text and close button, or, if nothing better, an image I can build and a close button.

The most important thing is that I would need this only to appear once per session, or at least only when recalling the homepage...

Beside the js I could use (there are some around), where would the best place to put this code ?

I've tried placing it in "/includes/templates/mytemplate/common/tlp_main_page.php", but this way it appears at every single click within the eshop... :-(

BTW: I'm not so PRO, while not even being so DUMB... :-)

Any help/hint/suggestion appreciated (search function did not helped too much, beside searchwords...).

:blush:

ABANDONED PROJECT

4 Sep 2012, 1:09 AM
#2
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Single click overlay image/text/window for homepage (summer closing style...)

One thought: don't assume everyone will enter your store through the home page. People will find other pages via search engines and drop in directly on those pages.

To make it appear just once your js (or whatever code you end up using) will need to set a cookie, or in some other way identify the "session" of the site visitor.

Rob

Breakfast: the most important donut of the day.

4 Sep 2012, 6:37 AM
#3
mickymix avatar

mickymix

New Zenner

Join Date:
Jun 2012
Posts:
41
Plugin Contributions:
0

Re: Single click overlay image/text/window for homepage (summer closing style...)

Thank you Rob,
indeed, not being used to eCommerce website, this consideration was something I never thought about... but, actually, it's a dogma... :-)

The problem now increases in size then...

Is there any hint on which possible solution I may apply to solve this ?

Leaving the idea of keeping the ad on the homepage, I think it would be better to place it in some other place which is always loaded (header ???), and try to identify the "session" from there...

My idead was to use facebox, but I've met hints towards ThickBox, FancyBox, QuickView and some others... still investigating them all...

:unsure:

ABANDONED PROJECT

4 Sep 2012, 12:38 PM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Single click overlay image/text/window for homepage (summer closing style...)

If you have some space in your logo, why not edit it (keeping a copy for replacement later) so it says what you need to say in a way which people will notice but is not so in-your-face that they will be bothered by seeing it all the time. No code, no sessions, no problem.

Rob

Breakfast: the most important donut of the day.

4 Sep 2012, 1:59 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,114
Plugin Contributions:
56

Re: Single click overlay image/text/window for homepage (summer closing style...)

FWIW, what I've done for this case is to modify the use of my admin's Configuration->Website Maintenance->NOTICE PUBLIC Before going Down for Maintenance: ON/OFF and ->Date and hours for notice before maintenance.

First, I copied /includes/languages/english.php to /includes/languages/MY_TEMPLATE/english.php and edited this line

  define('TEXT_BEFORE_DOWN_FOR_MAINTENANCE', 'NOTICE: This website is scheduled to be down for maintenance on: ');

to read:

  define('TEXT_BEFORE_DOWN_FOR_MAINTENANCE', '<b>Note:</b> We will be on vacation from %s.  Any orders that require shipping will be handled when we return.');

Then, I copied /includes/init_includes/init_header.php to /includes/init_includes/overrides/init_header.php and edited these lines

// give the visitors a message that the website will be down at ... time
if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'false') ) {
  $messageStack->add('header', TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE);
}

to read

// give the visitors a message that the website will be down at ... time
if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'false') ) {
  $messageStack->add('header', sprintf(TEXT_BEFORE_DOWN_FOR_MAINTENANCE, PERIOD_BEFORE_DOWN_FOR_MAINTENANCE));
}

Now, when we're going on vacation I use my admin to edit the Date and hours for notice before maintenance to read September 1 until September 8 and then set the notice before going down for maintenance to 'true'. When we're back, I change the switch back to 'false'.

23 Feb 2013, 11:37 AM
#6
mickymix avatar

mickymix

New Zenner

Join Date:
Jun 2012
Posts:
41
Plugin Contributions:
0

Re: Single click overlay image/text/window for homepage (summer closing style...)

lat9:

Now, when we're going on vacation I use my admin to edit the Date and hours for notice before maintenance to read September 1 until September 8 and then set the notice before going down for maintenance to 'true'. When we're back, I change the switch back to 'false'.

Hi lat9,

even if in late for my answer (but still with the need for a solution), I need to say thank you.

You gave me a great idea and I'll use your same trick to solve my need.

Thanks a lot.
mickymix

ABANDONED PROJECT