Jump to content

Archived

This topic is now archived and is closed to further replies.

A-J-O

[Resolved] Offline code located?

Recommended Posts

Hello,

Where is the code for the offline page located, I would like to point it to a smarty php file instead of using the textarea text as this adds <p> tags to the html and I cant get a valid html 5 markup.

Regards

Antony

Share this post


Link to post
Share on other sites

The file /controllers/controller.index.inc.php, at the end calls the general function offline().

In the file /includes/functions.inc.php, the general function offline() first checks to see if the store is set to be offline. If it is, then a check is made to see if the admin is logged in (admins get to see the storefront).

If no admin is logged in, $offlineContent is read from the store's configuration, and if any offline.??? files in the root folder of the store are present, only the first offline.??? file is read in and, if a php file, is executed. (Note that $offlineContent is available to the code of the php file.)

If no offline.??? files exist, $offlineContent, and only that content, is sent to the browser.

There is a hook available.

Finally, PHP exits.

The store is fully awake, so the file offline.php could contain what is necessary to call a skin template or a defined string assembled within that file -- such as being offline but still provide some sort of Featured Product or Products on Sale in a stripped down layout of the store.

Share this post


Link to post
Share on other sites

Thanks you your help, this worked a treat.

I put a offline.php in the root and pointed the css and other code to the theme I am using.

Thanks again

Antony

Share this post


Link to post
Share on other sites

×
×
  • Create New...