Files
drmaterac.pl/modules/ets_promotion/views/templates/hook/cron.tpl
2025-01-06 20:47:25 +01:00

88 lines
5.3 KiB
Smarty

{*
* Copyright ETS Software Technology Co., Ltd
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 website only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future.
*
* @author ETS Software Technology Co., Ltd
* @copyright ETS Software Technology Co., Ltd
* @license Valid for 1 website (or project) for each purchase of license
*}
<div class="clearfix">
<div class="emp-cronjob ets_pr_form configuration active">
<div class="row mt-15">
<div class="col-lg-12">
<p class="ets-mp-text-strong mb-10"><span style="color: red;">*</span> {l s='Some important notes before setting Cronjob:' mod='ets_promotion'}</p>
<ul>
<li>{l s='Cronjob frequency should be at least twice per day, the recommended frequency is once per minute' mod='ets_promotion'}</li>
<li>{l s='How to set up a cronjob is different depending on your server. If you\'re using a Cpanel hosting, watch this video for more reference:' mod='ets_promotion'}
<a href="https://www.youtube.com/watch?v=bmBjg1nD5yA" target="_blank" rel="noreferrer noopener">https://www.youtube.com/watch?v=bmBjg1nD5yA</a> <br>
{l s='You can also contact your hosting provider to ask them for support on setting up the cronjob' mod='ets_promotion'}
</li>
</ul>
<p class="ets-mp-text-strong emp-block mb-15"><span style="color: red;">*</span> {l s=' Set up a cronjob as below on your server to automatically delete expired discount codes or used discount codes.' mod='ets_promotion'}</p>
<p class="mb-15 emp-block"><span class="ets-mp-text-bg-light-gray">* * * * * {$php_path|escape:'html':'UTF-8'} {$dir_cronjob|escape:'html':'UTF-8'} secure=<span class="emp-cronjob-secure-value">{$ETS_PR_CRONJOB_TOKEN|escape:'html':'UTF-8'}</span></span></p>
<p class="ets-mp-text-strong mb-10"><span style="color: red;">*</span> {l s='Execute the cronjob manually by clicking on the button below' mod='ets_promotion'}</p>
<a href="{$link_conjob nofilter}" data-secure="{$ETS_PR_CRONJOB_TOKEN|escape:'html':'UTF-8'}" class="btn btn-default mb-10 js-emp-test-cronjob"><i></i>{l s='Execute cronjob manually' mod='ets_promotion'}</a>
</div>
</div>
<div class="mb-15 emp-block form-horizontal">
<div class="form-group form-group-cronjob">
<label class="control-label col-lg-12 required" style="text-align: left;margin-bottom: 10px;">
{l s='Cronjob secure token:' mod='ets_promotion'}
</label>
<div class="col-lg-6 flex">
<input name="ETS_PR_CRONJOB_TOKEN" id="ETS_PR_CRONJOB_TOKEN" value="{$ETS_PR_CRONJOB_TOKEN|escape:'html':'UTF-8'}" type="text" />
<button name="etsprSubmitUpdateToken" class="btn btn-default" type="submit">{l s='Update' mod='ets_promotion'}</button>
</div>
</div>
</div>
</div>
<div class="ets_pr_form cronjob_log">
<div class="mb-15 emp-block form-horizontal">
<div class="form-group form-group-cronjob">
<label class="control-label" style="float:left;text-align: left;margin-bottom: 10px;padding-left:5px;">
{l s='Save cronjob log' mod='ets_promotion'}
</label>
<div class="col-lg-9 flex">
<span class="switch prestashop-switch fixed-width-lg">
<input name="ETS_PR_SAVE_CRONJOB_LOG" id="ETS_PR_SAVE_CRONJOB_LOG_on" value="1" {if $ETS_PR_SAVE_CRONJOB_LOG}checked="checked"{/if} type="radio" />
<label for="ETS_PR_SAVE_CRONJOB_LOG_on">{l s='Yes' mod='ets_promotion'}</label>
<input name="ETS_PR_SAVE_CRONJOB_LOG" id="ETS_PR_SAVE_CRONJOB_LOG_off" value="0" type="radio" {if !$ETS_PR_SAVE_CRONJOB_LOG}checked="checked"{/if} />
<label for="ETS_PR_SAVE_CRONJOB_LOG_off">{l s='No' mod='ets_promotion'}</label>
<a class="slide-button btn"></a>
</span>
<p class="help-block">{l s='Only recommended for debug purpose' mod='ets_promotion'}</p>
</div>
</div>
<div class="form-group form-group-cronjob">
<label class="control-label col-lg-12" style="text-align: left;margin-bottom: 10px;">
{l s='Cronjob log:' mod='ets_promotion'}
</label>
<div class="col-lg-12 flex">
<textarea class="cronjob_log">{$cronjob_log nofilter}</textarea><br />
<button class="btn btn-default" name="etsprSubmitClearLog"><i class="icon icon-trash"></i> {l s='Clear log' mod='ets_promotion'}</button>
</div>
</div>
</div>
</div>
{if $cronjob_last}
<div class="mb-15 emp-block form-horizontal">
<p class="alert alert-info">{l s='Last time cronjob run' mod='ets_promotion'}: {$cronjob_last|escape:'html':'UTF-8'}</p>
</div>
{/if}
{if !$check_run}
<div class="mb-15 emp-block form-horizontal">
<p class="alert alert-danger">{l s='The last time cronjob executed was more than 24 hours ago. Please check your cronjob configuration.' mod='ets_promotion'}</p>
</div>
{/if}
</div>