Jump to content

[Resolved] Offline code located?


A-J-O

Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...