Jump to content

How Do I Edit A Live Link Onto My Maintenance Mode Page?


zzZDerekZzz

Recommended Posts

Hi,
   I recently figured out how to edit the text shown on my maintenance mode page. I added some text that asks my potential customer to visit my ebay store, while my site is down. After editing the maintenance.tpl.php file, via adding the web address to my Ebay store. The web address does show up on my maintenance page, but it’s not a live link that will redirect them to my Ebay store when clicked upon.  So they have to cut and paste, in order to get to my Ebay Store.

How would I make this a live link?  I’m no programmer, so please do keep any help simple. The domain that holds my web site provides me with a utf-8 editor, that I’ve been using to edit my maintenance.tpl.php file.

 

Below I'm showing the line that I edited on my maintenance mode page, although this text is showing a fictitious Ebay Store web address.

 

<?php echo smartyTranslate(array('s'=>'http://www.stores.ebay.com/my-ebaystore'),$_smarty_tpl);?>




Thanks


Derek
 

Below shows the location of the maintenance mode page file.

 

/public_html
   /cache
     /smarty
        /compile
         /de
          /e2
           /35
             /maintenance.tpl.php
 

Edited by zzZDerekZzz (see edit history)
Link to comment
Share on other sites

and also you are changing the wrong file.  what you are changing is the compiled cached php file, which can be erased in the future if the cache is ever removed or recreated.

 

what you need to change is the template file, which would be located in the following directory

/themes/<theme_name>/maintenance.tpl

  • Like 2
Link to comment
Share on other sites

Hi Simonas & Bellini13,

   Thanks for the reply and help on this.

Bellini13,
 I did try editing that file before,  but it had no effect on what was being displayed on my Maintenance page.

That file you said to edit was located at

/home
    /Web folder name
        /public_html
            /themes
               /default-bootstrap/maintenance.tpl
   
Since I don't know how to Down Load and keep a copy of my Presta Shop site on my PC,  I've been logging directly into my web site’s server’s site, going through their cPanel to find and edit those (maintenance.tpl  & maintenance.tpl.php) files. Furthermore, I did a search of all the files located on there and found only those 2 files (maintenance.tpl  & maintenance.tpl.php).

Below is a full copy of that maintenance.tpl file, located at /public_html/themes/default-bootstrap/maintenance.tpl 

I tried editing the {l s='http://www.stores.ebay.com/my-ebaystore'}. with a faults ebay address and that info does not show up on my maintenance page, when I set my Presta Shop to "Maintenance mode"

{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2015 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

<!DOCTYPE html>
<html lang="{$language_code|escape:'html':'UTF-8'}">
<head>
    <meta charset="utf-8">
    <title>{$meta_title|escape:'html':'UTF-8'}</title>
{if isset($meta_description)}
    <meta name="description" content="{$meta_description|escape:'html':'UTF-8'}">
{/if}
{if isset($meta_keywords)}
    <meta name="keywords" content="{$meta_keywords|escape:'html':'UTF-8'}">
{/if}
    <meta name="robots" content="{if isset($nobots)}no{/if}index,follow">
    <link rel="shortcut icon" href="{$favicon_url}">
           <link href="{$css_dir}maintenance.css" rel="stylesheet">
           <link href='//fonts.googleapis.com/css?family=Open+Sans:600' rel='stylesheet'>
</head>
<body>
        <div class="container">
            <div id="maintenance">
                <div class="logo"><img src="{$logo_url}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}"{/if} alt="logo" /></div>
                    {$HOOK_MAINTENANCE}
                    <div id="message">
                             <h1 class="maintenance-heading">{l s='We\'ll be back soon.'}</h1>
                            {l s='We are currently updating our shop'}
                                <br />
                                                        {l s='In the mean time please visit our Ebay store link below.'}
                                <br />
                                                        {l s='http://www.stores.ebay.com/my-ebaystore'}
                               
                           </div>
                </div>
            </div>
        </div>
</body>
</html>

Edited by zzZDerekZzz (see edit history)
Link to comment
Share on other sites

Bellini13 (or if anyone else can help too)

 

 I get that you're saying that this is a cache file...seeing how it's located in a cache folder

 

But why isn't that other file you're suggesting I edit, not having any effect on what's displayed on my Maintenance Page?

 

 

---------------

Below is a copy of the text and the location of that other file (maintenance.tpl.php) that has been updating the text shown on my maintenance page.

 

/public_html
   /cache
     /smarty
        /compile
         /de
          /e2
           /35
             /maintenance.tpl.php

 

 

 

 

<?php /* Smarty version Smarty-3.1.19, created on 2015-09-23 23:49:01
         compiled from "/home/smartdri/public_html/themes/default-bootstrap/maintenance.tpl" */ ?>
<?php /*%%SmartyHeaderCode:989456512560372ada8fc07-26889217%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' =>
  array (
    'dee235c0d3fcd3354f83aae6792d9f0f4e721fab' =>
    array (
      0 => '/home/webfolderName/public_html/themes/default-bootstrap/maintenance.tpl',
      1 => 1440081812,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '989456512560372ada8fc07-26889217',
  'function' =>
  array (
  ),
  'variables' =>
  array (
    'language_code' => 0,
    'meta_title' => 0,
    'meta_description' => 0,
    'meta_keywords' => 0,
    'nobots' => 0,
    'favicon_url' => 0,
    'css_dir' => 0,
    'logo_url' => 0,
    'logo_image_width' => 0,
    'logo_image_height' => 0,
    'HOOK_MAINTENANCE' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_560372adb2ca94_89865228',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_560372adb2ca94_89865228')) {function content_560372adb2ca94_89865228($_smarty_tpl) {?>

<!DOCTYPE html>
<html lang="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['language_code']->value, ENT_QUOTES, 'UTF-8', true);?>
">
<head>
    <meta charset="utf-8">
    <title><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['meta_title']->value, ENT_QUOTES, 'UTF-8', true);?>
</title>
<?php if (isset($_smarty_tpl->tpl_vars['meta_description']->value)) {?>
    <meta name="description" content="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['meta_description']->value, ENT_QUOTES, 'UTF-8', true);?>
">
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['meta_keywords']->value)) {?>
    <meta name="keywords" content="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['meta_keywords']->value, ENT_QUOTES, 'UTF-8', true);?>
">
<?php }?>
    <meta name="robots" content="<?php if (isset($_smarty_tpl->tpl_vars['nobots']->value)) {?>no<?php }?>index,follow">
    <link rel="shortcut icon" href="<?php echo $_smarty_tpl->tpl_vars['favicon_url']->value;?>
">
           <link href="<?php echo $_smarty_tpl->tpl_vars['css_dir']->value;?>
maintenance.css" rel="stylesheet">
           <link href='//fonts.googleapis.com/css?family=Open+Sans:600' rel='stylesheet'>
</head>
<body>
        <div class="container">
            <div id="maintenance">
                <div class="logo"><img src="<?php echo $_smarty_tpl->tpl_vars['logo_url']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['logo_image_width']->value) {?>width="<?php echo $_smarty_tpl->tpl_vars['logo_image_width']->value;?>
"<?php }?> <?php if ($_smarty_tpl->tpl_vars['logo_image_height']->value) {?>height="<?php echo $_smarty_tpl->tpl_vars['logo_image_height']->value;?>
"<?php }?> alt="logo" /></div>
                    <?php echo $_smarty_tpl->tpl_vars['HOOK_MAINTENANCE']->value;?>

                    <div id="message">
                             <h1 class="maintenance-heading"><?php echo smartyTranslate(array('s'=>'We\'ll be back soon.'),$_smarty_tpl);?>
</h1>
                <?php echo smartyTranslate(array('s'=>'We are currently updating our shop. In the mean time'),$_smarty_tpl);?>

                <br />
                                 <?php echo smartyTranslate(array('s'=>'please visit our Ebay Store at the link shown below.'),$_smarty_tpl);?>

                            <br />
                            <?php echo smartyTranslate(array('s'=>'http://www.stores.ebay.com/MyyEbay-Store'),$_smarty_tpl);?>

                    </div>
                </div>
            </div>
        </div>
</body>
</html>
<?php [spam-filter] ?>

Edited by zzZDerekZzz (see edit history)
Link to comment
Share on other sites

 

Code for link is:

<a href="your_link">link_title</a>

eg.

<a href="http://www.prestashop.com">PrestaShop</a>

 

Simonas Invertus,

   Here's the existing line in question, within that (maintenance.tpl.php) file located at

/public_html

   /cache

     /smarty

        /compile

         /de

          /e2

           /35

             /maintenance.tpl.php

 

 

<?php echo smartyTranslate(array('s'=>'http://www.stores.ebay.com/MyyebayStore'),$_smarty_tpl);?>

 

You say to replace it with the text shown below.

 

<a href="http://www.stores.ebay.com/MyyebayStore">My Ebay Store</a>

 

Question; Why am I removing all the other info in the existing line?  <?php echo smartyTranslate(array('s'=>'

 

Sorry for all the questions, I'm not a programmer and I just want to make sure I do this right.

 

 

Thanks

 

Derek

Edited by zzZDerekZzz (see edit history)
Link to comment
Share on other sites

and also you are changing the wrong file.  what you are changing is the compiled cached php file, which can be erased in the future if the cache is ever removed or recreated.

 

what you need to change is the template file, which would be located in the following directory

/themes/<theme_name>/maintenance.tpl

Bellini13,

 

   Thanks for the reply and help on this.

 

Bellini13,

 I did try editing that file before,  but it had no effect on what was being displayed on my Maintenance page.

 

That file you said to edit was located at

 

/home

    /Web folder name

        /public_html

            /themes

               /default-bootstrap/maintenance.tpl

   

Since I don't know how to Down Load and keep a copy of my Presta Shop site on my PC,  I've been logging directly into my web site’s server’s site, going through their cPanel to find and edit those (maintenance.tpl  & maintenance.tpl.php) files. Furthermore, I did a search of all the files located on there and found only those 2 files (maintenance.tpl  & maintenance.tpl.php).

 

Below is a full copy of that maintenance.tpl file, located at /public_html/themes/default-bootstrap/maintenance.tpl 

I tried editing the {l s='http://www.stores.ebay.com/my-ebaystore'}. with a faults ebay address and that info does not show up on my maintenance page, when I set my Presta Shop to "Maintenance mode"

 

{*

* 2007-2015 PrestaShop

*

* NOTICE OF LICENSE

*

* This source file is subject to the Academic Free License (AFL 3.0)

* that is bundled with this package in the file LICENSE.txt.

* It is also available through the world-wide-web at this URL:

* http://opensource.org/licenses/afl-3.0.php

* If you did not receive a copy of the license and are unable to

* obtain it through the world-wide-web, please send an email

* to [email protected] so we can send you a copy immediately.

*

* DISCLAIMER

*

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

* versions in the future. If you wish to customize PrestaShop for your

* needs please refer to http://www.prestashop.com for more information.

*

*  @author PrestaShop SA <[email protected]>

*  @copyright  2007-2015 PrestaShop SA

*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)

*  International Registered Trademark & Property of PrestaShop SA

*}

 

<!DOCTYPE html>

<html lang="{$language_code|escape:'html':'UTF-8'}">

<head>

    <meta charset="utf-8">

    <title>{$meta_title|escape:'html':'UTF-8'}</title>

{if isset($meta_description)}

    <meta name="description" content="{$meta_description|escape:'html':'UTF-8'}">

{/if}

{if isset($meta_keywords)}

    <meta name="keywords" content="{$meta_keywords|escape:'html':'UTF-8'}">

{/if}

    <meta name="robots" content="{if isset($nobots)}no{/if}index,follow">

    <link rel="shortcut icon" href="{$favicon_url}">

           <link href="{$css_dir}maintenance.css" rel="stylesheet">

           <link href='//fonts.googleapis.com/css?family=Open+Sans:600' rel='stylesheet'>

</head>

<body>

        <div class="container">

            <div id="maintenance">

                <div class="logo"><img src="{$logo_url}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}"{/if} alt="logo" /></div>

                    {$HOOK_MAINTENANCE}

                    <div id="message">

                             <h1 class="maintenance-heading">{l s='We\'ll be back soon.'}</h1>

                            {l s='We are currently updating our shop'}

                                <br />

                                                        {l s='In the mean time please visit our Ebay store link below.'}

                                <br />

                                                        {l s='http://www.stores.ebay.com/my-ebaystore'}

                               

                           </div>

                </div>

            </div>

        </div>

</body>

</html>

Link to comment
Share on other sites

when need to ensure you are recompiling smarty templates in your back office.  if you have this option disabled, then changes you make to the tpl files will not take effect

 

I'm sorry Bellini13, I don't know what this means. "when need to ensure you are recompiling smarty templates in your back office.  if you have this option disabled"

 

How do I recompile smarty templates?

 

..and where is my "back office" ?

Edited by zzZDerekZzz (see edit history)
Link to comment
Share on other sites

BackOffice is the place where you login to change settings of your shop it might be something like yourshop.com/admin but usually for security reasons it is recommended 'admin' part to rename to something else.

 

If you go to Advanced Parameters->Performance there is a button named Clear cache (and other settings related to the cache) if you click that button all the files from cache directory will be deleted, so you should not edit them.

 

Also, after every change made to the website you should clear your cache.

 

And the last thing, I did not say that you need to delete all the rest things from the file, I just wanted to say that instead of placing just a link that is not clickable you should place it in proper HTML.

 

I hope it clears somethings for you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...