first commit

This commit is contained in:
2024-11-05 12:22:50 +01:00
commit e5682a3912
19641 changed files with 2948548 additions and 0 deletions

View File

@@ -0,0 +1,117 @@
{**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* 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 license@prestashop.com 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*}
{extends file="helpers/form/form.tpl"}
{block name="other_fieldsets"}
{if $f == 1}
<div class="panel">
<h3>
<i class="icon-question-sign"></i> {l s='Help' d='Admin.Global'}
</h3>
<div class="row"><button type="button" class="btn btn-default toggle_help"><i class="icon-chevron-sign-down"></i> {l s='Show me more' d='Admin.Shopparameters.Help'}</button></div>
<div id="tracking_help" style="display: none;">
<p>{l s='Definitions:' d='Admin.Shopparameters.Help'}</p>
<ul>
<li>
{l s='The "http_referer" field is the website from which your customers arrive.' d='Admin.Shopparameters.Help'}<br />
{l s='For example, visitors coming from Google will have an "http_referer" value like this one: "http://www.google.com/search?q=prestashop".' d='Admin.Shopparameters.Help'}<br />
{l s='If the visitor arrives directly (by typing the URL of your shop, or by using their bookmarks, for example), the http_referer will be empty.' d='Admin.Shopparameters.Help'}<br />
{l s='If you\'d like to view all the visitors coming from Google, you can type "%google%" in this field. Alternatively, you can type "%google.fr%" if you want to view visitors coming from Google France, only.' d='Admin.Shopparameters.Help'}<br />
</li>
<br />
<li>
{l s='The "request_uri" field is the URL from which the customers come to your website.' d='Admin.Shopparameters.Help'}<br />
{l s='For example, if the visitor accesses a product page, the URL will be like this one: "%smusic-ipods/1-ipod-nano.html".' sprintf=[$uri] d='Admin.Shopparameters.Help'}<br />
{l s='This is helpful because you can add tags or tokens in the links pointing to your website.' d='Admin.Shopparameters.Help'}
{l s='For example, you can post a link (such as "%sindex.php?myuniquekeyword" -- note that you added "?myuniquekeyword" at the end of the URL) in an online forum or as a blog comment, and get visitors statistics for that unique link by entering "%%myuniquekeyword" in the "request_uri" field.' sprintf=[$uri] d='Admin.Shopparameters.Help'}
{l s='This method is more reliable than the "http_referer" one, but there is one disadvantage: if a search engine references a page with your link, then it will be displayed in the search results and you will not only indicate visitors from the places where you posted the link, but also those from the search engines that picked up that link.' d='Admin.Shopparameters.Help'}
</li>
<br />
<li>
{l s='The "Include" fields indicate what has to be included in the URL.' d='Admin.Shopparameters.Help'}
</li>
<br />
<li>
{l s='The "Exclude" fields indicate what has to be excluded from the URL.' d='Admin.Shopparameters.Help'}
</li>
<br />
<li>
{l s='When using simple mode, you can use a wide variety of generic characters to replace other characters:' d='Admin.Shopparameters.Help'}
<ul>
<li>{l s='"_" will replace one character. If you want to use the real "_", you should type this: "\\\\_".' d='Admin.Shopparameters.Help'}</li>
<li>{l s='"%" will replace any number of characters. If you want to use the real "%", you should type this: "\\\\%".' d='Admin.Shopparameters.Help'}</li>
</ul>
</li>
<br />
<li>
{l s='The Simple mode uses the MySQL "LIKE" pattern matching, but for a higher potency you can use MySQL\'s regular expressions in the Expert mode.' d='Admin.Shopparameters.Help'}
<a class="btn btn-link _blank" href="http://dev.mysql.com/doc/refman/5.0/en/regexp.html" style="font-style: italic;"><i class="icon-external-link-sign"></i> {l s='Take a look at MySQL\'s documentation for more details.' d='Admin.Shopparameters.Help'}</a>
</li>
</ul>
</div>
</div>
{/if}
{/block}
{block name="other_input"}
{if $key == 'help'}
<a class="btn btn-default toggle_help">
<i class="icon-question-sign"></i> {l s='Get help!' d='Admin.Shopparameters.Help'}
</a>
{/if}
{/block}
{block name="fieldset"}
{if $f == 3}
<div id="tracking_expert" style="display: none;">
{$smarty.block.parent}
</div>
{else}
{$smarty.block.parent}
{/if}
{/block}
{block name="label"}
{if isset($input.legend)}
<legend>{$input.legend}</legend>
{/if}
{if isset($input.label)}
<label class="control-label col-lg-3" for="{if isset($input.id) && $input.id}{$input.id|escape:'html':'UTF-8'}{elseif isset($input.name) && $input.name}{$input.name|escape:'html':'UTF-8'}{/if}">{$input.label}</label>
{/if}
{/block}
{block name="script"}
$( document ).ready(function() {
$('.toggle_help').click(function() {
$('#tracking_help').slideToggle();
if ($(this).find('i').hasClass('icon-chevron-sign-down'))
$(this).find('i').removeClass('icon-chevron-sign-down').addClass('icon-chevron-sign-up');
else if ($(this).find('i').hasClass('icon-chevron-sign-up'))
$(this).find('i').removeClass('icon-chevron-sign-up').addClass('icon-chevron-sign-down');
});
});
{/block}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* 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 license@prestashop.com 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* 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 license@prestashop.com 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* 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 license@prestashop.com 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../../');
exit;

View File

@@ -0,0 +1,84 @@
{**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* 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 license@prestashop.com 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*}
{extends file="helpers/list/list_header.tpl"}
{block name="override_header"}
<script type="text/javascript">
$(function() {
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
var btn_submit_calendar = $('#submitDatePicker');
if (btn_save_calendar.length > 0 && btn_submit_calendar.length > 0)
{
btn_submit_calendar.hide();
btn_save_calendar.click(function() {
btn_submit_calendar.before('<input type="hidden" name="'+btn_submit_calendar.attr("name")+'" value="1" />');
$('#calendar_form').submit();
});
}
var btn_save_settings = $('span[class~="process-icon-save-settings"]').parent();
var btn_submit_settings = $('#submitSettings');
if (btn_save_settings.length > 0 && btn_submit_settings.length > 0)
{
btn_submit_settings.hide();
btn_save_settings.click(function() {
btn_submit_settings.before('<input type="hidden" name="'+btn_submit_settings.attr("name")+'" value="1" />');
$('#settings_form').submit();
});
}
var btn_save_refresh_index = $('span[class~="process-icon-refresh-index"]').parent();
var btn_submit_refresh_index = $('#submitRefreshIndex');
if (btn_save_refresh_index.length > 0 && btn_submit_refresh_index.length > 0)
{
btn_submit_refresh_index.hide();
btn_save_refresh_index.click(function() {
btn_submit_refresh_index.before('<input type="hidden" name="'+btn_submit_refresh_index.attr("name")+'" value="1" />');
$('#refresh_index_form').submit();
});
}
var btn_save_refresh_cache = $('span[class~="process-icon-refresh-cache"]').parent();
var btn_submit_refresh_cache = $('#submitRefreshCache');
if (btn_save_refresh_cache.length > 0 && btn_submit_refresh_cache.length > 0)
{
btn_submit_refresh_cache.hide();
btn_save_refresh_cache.click(function() {
btn_submit_refresh_cache.before('<input type="hidden" name="'+btn_submit_refresh_cache.attr("name")+'" value="1" />');
$('#refresh_cache_form').submit();
});
}
});
</script>
{if $enable_calendar}
{$calendar_form}
{$settings_form}
{/if}
{/block}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* 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 license@prestashop.com 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../../');
exit;

View File

@@ -0,0 +1,132 @@
{**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* 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 license@prestashop.com 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 https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*}
{extends file="helpers/view/view.tpl"}
{block name="override_tpl"}
<script type="text/javascript">
$(function() {
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
var btn_submit_calendar = $('#submitDatePicker');
if (btn_save_calendar.length > 0 && btn_submit_calendar.length > 0)
{
btn_submit_calendar.hide();
btn_save_calendar.click(function() {
btn_submit_calendar.before('<input type="hidden" name="'+btn_submit_calendar.attr("name")+'" value="1" />');
$('#calendar_form').submit();
});
}
});
</script>
{if $enable_calendar}
{$calendar_form}
{/if}
</div>
<script type="text/javascript">
function updateConversionRate(id_product)
{
$.getJSON('index.php',
{
ajax: 1,
controller: 'AdminReferrers',
action: 'productFilter',
id_employee:{$id_employee},
token:'{$token|escape:'html':'UTF-8'}',
id_referrer:{$referrer->id},
id_product:id_product
},
function(j) {
{foreach $display_tab as $key => $value}
$("#{$key}").html(j[0].{$key});
{/foreach}
}
)
}
function fillProducts(filter)
{
var form = document.layers ? document.forms.product_referrers : document.product_referrers;
var filter = form.filterProduct.value;
$.getJSON('index.php',
{
ajax: 1,
controller: 'AdminReferrers',
action: 'fillProducts',
id_employee:{$id_employee},
token:'{$token|escape:'html':'UTF-8'}',
id_lang:{$id_lang},
filter:filter
},
function(j) {
form.selectProduct.length = j.length + 1;
for (var i = 0; i < j.length; i++)
{
form.selectProduct.options[i+1].value = j[i].id_product;
form.selectProduct.options[i+1].text = j[i].name;
}
}
);
}
</script>
<div class="panel">
<h3>
<i class="icon-bar-chart"></i> {l s='Statistics' d='Admin.Shopparameters.Feature'}
</h3>
<h2>{$referrer->name}</h2>
<table class="table">
{foreach $display_tab as $data => $label}
<tr>
<td>{$label}</td>
<td id="{$data}"></td>
</tr>
{/foreach}
</table>
<form id="product_referrers" name="product_referrers" class="form-horizontal">
<div class="form-group">
<label class="control-label col-lg-3">{l s='Filter by product:' d='Admin.Shopparameters.Feature'}</label>
<div class="col-lg-9">
<select id="selectProduct" class="fixed-width-xl" name="selectProduct" onfocus="fillProducts();" onchange="updateConversionRate(this.value);">
<option value="0" selected="selected">- {l s='All' d='Admin.Global'} -</option>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">{l s='Search' d='Admin.Actions'}</label>
<div class="col-lg-9">
<input class="btn btn-default" type="text" size="34" id="filterProduct" name="filterProduct" onkeyup="fillProducts();" />
</div>
</div>
</form>
</div>
<script type="text/javascript">
updateConversionRate(0);
</script>
{/block}