update
This commit is contained in:
@@ -0,0 +1,279 @@
|
||||
{extends file="helpers/form/form.tpl"}
|
||||
{block name="script"}
|
||||
$(document).ready(function() {
|
||||
$('.iframe-upload').fancybox({
|
||||
'width' : 900,
|
||||
'height' : 600,
|
||||
'type' : 'iframe',
|
||||
'autoScale' : false,
|
||||
'autoDimensions': false,
|
||||
'fitToView' : false,
|
||||
'autoSize' : false,
|
||||
onUpdate : function() {
|
||||
$('.fancybox-iframe').contents().find('a.link').data('field_id', $(this.element).data("input-name"));
|
||||
$('.fancybox-iframe').contents().find('a.link').attr('data-field_id', $(this.element).data("input-name"));
|
||||
},
|
||||
afterShow: function() {
|
||||
$('.fancybox-iframe').contents().find('a.link').data('field_id', $(this.element).data("input-name"));
|
||||
$('.fancybox-iframe').contents().find('a.link').attr('data-field_id', $(this.element).data("input-name"));
|
||||
},
|
||||
helpers: {
|
||||
overlay: {
|
||||
locked: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.x13gpsr_image_option_selector li').forEach(function (item) {
|
||||
item.addEventListener('click', function () {
|
||||
var target = document.querySelector(item.dataset.target);
|
||||
var value = item.dataset.option;
|
||||
|
||||
if (target) {
|
||||
target.value = value;
|
||||
var event = new Event('change');
|
||||
target.dispatchEvent(event);
|
||||
}
|
||||
|
||||
document.querySelectorAll('.x13gpsr_image_option_selector.x13gpsr_image_option_selector_' + item.dataset.target.replace('#', '') + ' li').forEach(function (li) {
|
||||
li.classList.remove('active');
|
||||
});
|
||||
item.classList.add('active');
|
||||
|
||||
handleFieldDependencies();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
handleFieldDependencies();
|
||||
let $fieldDependencies = getFieldDependencies();
|
||||
for (let i = 0; i < $fieldDependencies.length; i++) {
|
||||
$(document).off($fieldDependencies[i]).on('change', '[name="'+ $fieldDependencies[i] +'"]', function () {
|
||||
handleFieldDependencies($fieldDependencies[i]);
|
||||
}).bind(i);
|
||||
}
|
||||
function getFieldDependencies()
|
||||
{
|
||||
let fieldDependencies = [];
|
||||
$('.depends-on').each(function (index, node) {
|
||||
var $element = $(node);
|
||||
var $classes = $element.prop('class').split(/\s+/);
|
||||
for (var i = 0; i < $classes.length; i++) {
|
||||
let current = $classes[i];
|
||||
if (current.includes('depends-field')) {
|
||||
let parts = current.replace('depends-field-', '').split(':');
|
||||
fieldDependencies.push(parts[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return fieldDependencies;
|
||||
}
|
||||
|
||||
function inArray(needle, haystack) {
|
||||
var length = haystack.length;
|
||||
for(var i = 0; i < length; i++) {
|
||||
if(haystack[i] == needle) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function handleFieldDependencies(specificFieldName)
|
||||
{
|
||||
let specificField = specificFieldName || false;
|
||||
$('.depends-on').each(function (index, node) {
|
||||
var $element = $(node);
|
||||
var $classes = $element.prop('class').split(/\s+/);
|
||||
let $method = 'match';
|
||||
let $fieldName = false,
|
||||
$fieldValue = false,
|
||||
$fieldType = false,
|
||||
$currentValue;
|
||||
if ($element.hasClass('depends-on-multiple')) {
|
||||
$fieldValue = [];
|
||||
$fieldName = [];
|
||||
$fieldType = [];
|
||||
}
|
||||
|
||||
for (var i = 0; i < $classes.length; i++) {
|
||||
let current = $classes[i];
|
||||
if (current.includes('depends-where')) {
|
||||
if (current == 'depends-where-is-not') {
|
||||
$method = 'not_match';
|
||||
}
|
||||
}
|
||||
if (current.includes('depends-field')) {
|
||||
let parts = current.replace('depends-field-', '').split(':');
|
||||
let $nameOfTheField = parts[0];
|
||||
let $valueOfTheField = parts[1].split('--');
|
||||
if ($element.hasClass('depends-on-multiple')) {
|
||||
$fieldName.push($nameOfTheField);
|
||||
$fieldValue.push($valueOfTheField);
|
||||
} else {
|
||||
$fieldName = $nameOfTheField;
|
||||
$fieldValue = $valueOfTheField;
|
||||
}
|
||||
|
||||
if($('input[name="'+ $nameOfTheField +'"]').length > 0){
|
||||
$typeOfTheField = $('input[name="'+ $nameOfTheField +'"]').attr('type');
|
||||
}else if($('textarea[name="'+ $nameOfTheField +'"]').length == 1){
|
||||
$typeOfTheField = 'textarea';
|
||||
}else if($('select[name="'+ $nameOfTheField +'"]').length == 1){
|
||||
$typeOfTheField = 'select';
|
||||
}
|
||||
|
||||
if ($element.hasClass('depends-on-multiple')) {
|
||||
$fieldType.push($typeOfTheField);
|
||||
} else {
|
||||
$fieldType = $typeOfTheField;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($element.hasClass('depends-on-multiple')) {
|
||||
var showBasedOnMultiple = true;
|
||||
for (var i = 0; i < $fieldName.length; i++) {
|
||||
if ($fieldType[i] == 'checkbox' || $fieldType[i] == 'radio'){
|
||||
$currentValue = $('[name="'+ $fieldName[i] +'"]:checked').val();
|
||||
} else {
|
||||
$currentValue = $('[name="'+ $fieldName[i] +'"]').val();
|
||||
}
|
||||
|
||||
$searchedValues = $fieldValue[i];
|
||||
if ($method == 'match') {
|
||||
if (!inArray($currentValue, $searchedValues)) {
|
||||
showBasedOnMultiple = false;
|
||||
}
|
||||
}
|
||||
if ($method == 'not_match') {
|
||||
if (inArray($currentValue, $searchedValues)) {
|
||||
showBasedOnMultiple = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (showBasedOnMultiple) {
|
||||
$element.show();
|
||||
} else {
|
||||
$element.hide();
|
||||
}
|
||||
} else {
|
||||
if (specificField && specificField != $fieldName) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($fieldType == 'checkbox' || $fieldType == 'radio'){
|
||||
$currentValue = $('[name="'+ $fieldName +'"]:checked').val();
|
||||
} else {
|
||||
$currentValue = $('[name="'+ $fieldName +'"]').val();
|
||||
}
|
||||
|
||||
if ($method == 'not_match' && $fieldName && $fieldValue) {
|
||||
if ($fieldValue.includes($currentValue)) {
|
||||
$element.hide();
|
||||
} else {
|
||||
$element.show();
|
||||
}
|
||||
}
|
||||
if ($method == 'match' && $fieldName && $fieldValue) {
|
||||
if ($fieldValue.includes($currentValue)) {
|
||||
$element.show();
|
||||
} else {
|
||||
$element.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
{/block}
|
||||
{* {block name="label"}
|
||||
{if isset($input.errors) && !empty($input.errors)}
|
||||
<div class="col-lg-12">
|
||||
<div class="alert alert-danger">{$input.errors}</div>
|
||||
</div>
|
||||
{/if}
|
||||
{$smarty.block.parent}
|
||||
{/block} *}
|
||||
{block name="input"}
|
||||
{if $input.type == 'file_lang'}
|
||||
<div class="row">
|
||||
{foreach from=$languages item=language}
|
||||
{if $languages|count > 1}
|
||||
<div class="translatable-field lang-{$language.id_lang|escape:'UTF-8'}" {if $language.id_lang != $defaultFormLanguage}style="display:none"{/if}>
|
||||
{/if}
|
||||
<div class="col-lg-9">
|
||||
{*$fields_value|d*}
|
||||
{if isset($fields_value['image']) && $fields_value['image'][$language.id_lang] != ''}
|
||||
<img src="{$image_baseurl|escape:'UTF-8'}{$language.iso_code|escape:'UTF-8'}/{$fields_value['image'][$language.id_lang]|escape:'UTF-8'}" class="img-thumbnail" /><br><br>
|
||||
{/if}
|
||||
<input id="{$input.name|escape:'UTF-8'}_{$language.id_lang|escape:'UTF-8'}" type="file" name="{$input.name|escape:'UTF-8'}_{$language.id_lang|escape:'UTF-8'}" class="hide" />
|
||||
<div class="dummyfile input-group">
|
||||
<span class="input-group-addon"><i class="icon-file"></i></span>
|
||||
<input id="{$input.name|escape:'UTF-8'}_{$language.id_lang|escape:'UTF-8'}-name" type="text" class="disabled" name="filename" readonly />
|
||||
<span class="input-group-btn">
|
||||
<button id="{$input.name|escape:'UTF-8'}_{$language.id_lang|escape:'UTF-8'}-selectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
|
||||
<i class="icon-folder-open"></i> {l s='Choose a file' mod='x13gpsr'}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{if $languages|count > 1}
|
||||
<div class="col-lg-2">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
|
||||
{$language.iso_code|escape:'UTF-8'}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach from=$languages item=lang}
|
||||
<li><a href="javascript:hideOtherLanguage({$lang.id_lang|escape:'UTF-8'});" tabindex="-1">{$lang.name}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
{if $languages|count > 1}
|
||||
</div>
|
||||
{/if}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#{$input.name|escape:'UTF-8'}_{$language.id_lang|escape:'UTF-8'}-selectbutton').click(function(e) {
|
||||
$('#{$input.name|escape:'UTF-8'}_{$language.id_lang|escape:'UTF-8'}').trigger('click');
|
||||
});
|
||||
$('#{$input.name|escape:'UTF-8'}_{$language.id_lang|escape:'UTF-8'}').change(function(e) {
|
||||
var val = $(this).val();
|
||||
var file = val.split(/[\\/]/);
|
||||
$('#{$input.name|escape:'UTF-8'}_{$language.id_lang|escape:'UTF-8'}-name').val(file[file.length - 1]);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/foreach}
|
||||
</div>
|
||||
{elseif $input.type == 'image_option'}
|
||||
<div class="x13gpsr_image_option_selector_wrapper">
|
||||
<ul class="x13gpsr_image_option_selector x13gpsr_image_option_selector_{$input.name|escape:'html':'UTF-8'}">
|
||||
{foreach $input.options as $option}
|
||||
<li data-option="{$option.id}" data-target="#{$input.name}"
|
||||
class="col-md-3{if $fields_value[$input.name] == $option.id} active{/if}">
|
||||
<div class="x13gpsr_image_option_wrapper">
|
||||
<img class="img-fluid img-responsive" src="{$option.img}" alt="{$option.label}" title="{$option.label}">
|
||||
<p class="text-center text-muted">{$option.label}</p>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<select name="{$input.name}" id="{$input.name}">
|
||||
{foreach $input.options as $option}
|
||||
<option value="{$option.id}" {if $fields_value[$input.name] == $option.id}selected{/if}>{$option.label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<hr>
|
||||
{elseif $input.type == 'selectImage'}
|
||||
<input name="{$input.name|escape:'html':'UTF-8'}" id="{$input.name|escape:'html':'UTF-8'}" value="{$fields_value[$input.name]|escape:'html':'UTF-8'}" type="text" />
|
||||
<p>
|
||||
<a href="filemanager/dialog.php?type=1&field_id={$input.name|escape:'html':'UTF-8'}" class="btn btn-default iframe-upload" data-input-name="{$input.name|escape:'html':'UTF-8'}" type="button">{l s='Image selector' mod='x13gpsr'} <i class="icon-angle-right"></i></a>
|
||||
</p>
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
11
modules/x13gpsr/views/templates/admin/_configure/index.php
Normal file
11
modules/x13gpsr/views/templates/admin/_configure/index.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
13
modules/x13gpsr/views/templates/admin/admin.tpl
Normal file
13
modules/x13gpsr/views/templates/admin/admin.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{* <div class="panel" id="module_default_configuration">
|
||||
<div class="panel-heading">
|
||||
{l s='General information about using GPSR module from X13' mod='x13gpsr'}
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
{l s='Lorem ipsum.' mod='x13gpsr'}<br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
{l s='Module documentation:' mod='x13gpsr'} <a href="https://x13.pl/doc/dokumentacja-historia-cen-omnibus-dla-prestashop" target="_blank">https://x13.pl/doc/dokumentacja-historia-cen-omnibus-dla-prestashop</a>
|
||||
</div> *}
|
||||
@@ -0,0 +1,42 @@
|
||||
<h4>{l s='Map Your Columns' mod='x13gpsr'}</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Field' mod='x13gpsr'}</th>
|
||||
<th>{l s='CSV Column' mod='x13gpsr'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$importableFields key=field item=details}
|
||||
<tr>
|
||||
<td>
|
||||
<span>{$field}{if $details.required} <span style="color:red">*</span>{/if}</span>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control mapping-select" data-field="{$field}">
|
||||
<option value="">{l s='Select a column' mod='x13gpsr'}</option>
|
||||
<option value="skip">{l s='Skip Column' mod='x13gpsr'}</option>
|
||||
{foreach from=$csvHeaders item=header key=index}
|
||||
<option data-column="{$header|escape:'html'}" value="{$index}">{$header|escape:'html'}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{foreach from=$languages item=language}
|
||||
<tr>
|
||||
<td>extra_note_{$language.iso_code}</td>
|
||||
<td>
|
||||
<select class="form-control mapping-select" data-field="extra_note_{$language.iso_code}">
|
||||
<option value="">{l s='Select a column' mod='x13gpsr'}</option>
|
||||
<option value="skip">{l s='Skip Column' mod='x13gpsr'}</option>
|
||||
{foreach from=$csvHeaders item=header key=index}
|
||||
<option data-column="{$header|escape:'html'}" value="{$index}">{$header|escape:'html'}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" id="xgpsr-temp-file-path" value="{$tempFilePath}">
|
||||
39
modules/x13gpsr/views/templates/admin/csv_importer/modal.tpl
Normal file
39
modules/x13gpsr/views/templates/admin/csv_importer/modal.tpl
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="modal fade" id="xgpsr-csv-import-modal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{l s='Import CSV' mod='x13gpsr'}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="xgpsr-mapping-error-container" style="display: none;"></div>
|
||||
<form id="xgpsr-csv-import-form">
|
||||
<div class="form-group">
|
||||
<label for="xgpsr-csv-file">{l s='Select CSV File' mod='x13gpsr'}</label>
|
||||
<input type="file" class="form-control" id="xgpsr-csv-file" name="xgpsr-csv-file" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="xgpsr-csv-delimeter">{l s='CSV Delimiter' mod='x13gpsr'}</label>
|
||||
<select class="form-control" id="xgpsr-csv-delimeter" name="xgpsr-csv-delimeter">
|
||||
<option value=";">{l s='Semicolon (;)' mod='x13gpsr'}</option>
|
||||
<option value=",">{l s='Comma (,)' mod='x13gpsr'}</option>
|
||||
<option value="_">{l s='Underline (_)' mod='x13gpsr'}</option>
|
||||
<option value="|">{l s='Pipe (|)' mod='x13gpsr'}</option>
|
||||
<option value="\t">{l s='Tab' mod='x13gpsr'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" id="xgpsr-temp-file-path" name="xgpsr-temp-file-path" value="">
|
||||
</form>
|
||||
<div id="xgpsr-mapping-container"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary"
|
||||
data-dismiss="modal">{l s='Close' mod='x13gpsr'}</button>
|
||||
<button type="button" id="xgpsr-process-mapping" class="btn btn-primary"
|
||||
disabled>{l s='Import' mod='x13gpsr'}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
11
modules/x13gpsr/views/templates/admin/index.php
Normal file
11
modules/x13gpsr/views/templates/admin/index.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
14
modules/x13gpsr/views/templates/admin/module-notice.tpl
Normal file
14
modules/x13gpsr/views/templates/admin/module-notice.tpl
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
{l s='Using the GPSR module from x13.pl' mod='x13gpsr'}
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<ul>
|
||||
<li>{l s='After installing the module, you must check whether the information about the manufacturer and the person responsible is displayed correctly in the store.' mod='x13gpsr'}</li>
|
||||
{* <li>{l s='After installing the module, you must fill in additional product information, including warnings and certificates, instructions, technical data, and attachments.' mod='x13gpsr'}</li> *}
|
||||
<li>{l s='Make sure that you have full product safety information on the product page, which you can fill in directly in the store using features and description.' mod='x13gpsr'}</li>
|
||||
<li>{l s='This module is provided as-is. All responsibility for compliance with the law rests with the store administrator.' mod='x13gpsr'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<a
|
||||
href="{$href|escape:'html':'UTF-8'}"
|
||||
title="{$title|escape:'html':'UTF-8'}"
|
||||
data-action="{$action|escape:'html':'UTF-8'}"
|
||||
data-type={$type|escape:'html':'UTF-8'}
|
||||
data-id="{$product_id}" data-name="{$product_name}">
|
||||
<i class="{$icon|escape:'html':'UTF-8'}"></i> {$title|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
@@ -0,0 +1,13 @@
|
||||
<h2 class="h2">{l s='Products without a brand' mod='x13gpsr'}</h2>
|
||||
<div class="alert alert-info">
|
||||
{l s='Below you can find a list of products that do not have a brand assigned. You can assign a brand to them by selecting products and then using Bulk Update. This should help you to better manage the relation between responsible manufacturers and persons and their brands.' mod='x13gpsr'}
|
||||
</div>
|
||||
|
||||
{if $hasDefaultResponsibleManufacturerAssigned}
|
||||
|
||||
<div class="alert alert-warning">
|
||||
{l s='You have enabled the option to assign a default responsible manufacturer (it is set to: %s) for products that do not have a brand assigned. This option is enabled in the Responsible Manufacturers tab. Options set here for products with no brands will have a higher priority.' mod='x13gpsr' sprintf=$defaultResponsibleManufacturerName}
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
<hr/>
|
||||
@@ -0,0 +1,18 @@
|
||||
<h2 class="h2">{l s='Products without a responsible manufacturer' mod='x13gpsr'}</h2>
|
||||
<div class="alert alert-warning">
|
||||
<p>
|
||||
<b>
|
||||
{l s='Below you can find a list of products that do not have a responsible manufacturer assigned. You can assign a responsible manufacturer to them by selecting products and then using Bulk Update.' mod='x13gpsr'}
|
||||
</b>
|
||||
</p>
|
||||
<p>
|
||||
{l s='Be careful, assigning a responsible manufacturer to a product will remove the current responsible manufacturer.' mod='x13gpsr'}
|
||||
</p>
|
||||
<p class="text-danger">
|
||||
{l s='If you already have a mapping between a Responsible Manufacturer and a Brand, performing an update action here will override your previously set mapping.' mod='x13gpsr'}
|
||||
</p>
|
||||
<p>
|
||||
{l s='Options set for individual products have a higher priority. If possible, use PrestaShop Brands to map responsible manufacturers to products.' mod='x13gpsr'}
|
||||
</p>
|
||||
</div>
|
||||
<hr/>
|
||||
@@ -0,0 +1,18 @@
|
||||
<h2 class="h2">{l s='Products without a responsible person' mod='x13gpsr'}</h2>
|
||||
<div class="alert alert-warning">
|
||||
<p>
|
||||
<b>
|
||||
{l s='Below you can find a list of products that do not have a responsible person assigned. You can assign a responsible person to them by selecting products and then using Bulk Update.' mod='x13gpsr'}
|
||||
</b>
|
||||
</p>
|
||||
<p>
|
||||
{l s='Be careful, assigning a responsible person to a product will remove the current responsible person.' mod='x13gpsr'}
|
||||
</p>
|
||||
<p class="text-danger">
|
||||
{l s='If you already have a mapping between a Responsible person and a Brand, performing an update action here will override your previously set mapping.' mod='x13gpsr'}
|
||||
</p>
|
||||
<p>
|
||||
{l s='Options set for individual products have a higher priority. If possible, use PrestaShop Brands to map responsible persons to products.' mod='x13gpsr'}
|
||||
</p>
|
||||
</div>
|
||||
<hr/>
|
||||
@@ -0,0 +1,56 @@
|
||||
<div class="x13gpsr-kpi">
|
||||
<div class="col">
|
||||
<div class="panel x13gpsr-kpi-panel bpsr-kpi-no-brand">
|
||||
<h4 class="x13gpsr-kpi-heading">
|
||||
<img src="{$url_img}brand.svg" width="42" height="42">
|
||||
{l s='Unbranded products' mod='x13gpsr'}
|
||||
</h4>
|
||||
<p class="x13gpsr-kpi-desc">
|
||||
{l s='The number of all products that do not have a brand assigned.' mod='x13gpsr'}</p>
|
||||
<p class="x13gpsr-kpi-number {$classNoBrand}">
|
||||
<span>{$nbOfProductsWithNoBrand}</span> {l s='pcs' mod='x13gpsr'}
|
||||
</p>
|
||||
{if $isMultiStoreUsed}<span class="x13gpsr-kpi-multistore">{l s='(in all shop)' mod='x13gpsr'}</span>{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="panel x13gpsr-kpi-panel bpsr-kpi-no-brand">
|
||||
<h4 class="x13gpsr-kpi-heading">
|
||||
<img src="{$url_img}responsible-manufacturer.svg" width="42" height="42">
|
||||
{l s='No manufacturer assigned' mod='x13gpsr'}
|
||||
</h4>
|
||||
<p class="x13gpsr-kpi-desc">
|
||||
{l s='Number of products that do not have an assigned responsible manufacturer by brand and individual.' mod='x13gpsr'}
|
||||
</p>
|
||||
<p class="x13gpsr-kpi-number {$classNoManufacturer}">
|
||||
<span>{$nbOfProductsWithNoResponsibleManufacturer}</span> {l s='pcs' mod='x13gpsr'}
|
||||
</p>
|
||||
{if $isMultiStoreUsed}<span class="x13gpsr-kpi-multistore">{l s='(in all shop)' mod='x13gpsr'}</span>{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="panel x13gpsr-kpi-panel bpsr-kpi-no-brand">
|
||||
<h4 class="x13gpsr-kpi-heading">
|
||||
<img src="{$url_img}responsible-person.svg" width="42" height="42">
|
||||
{l s='No responsible person assigned' mod='x13gpsr'}
|
||||
</h4>
|
||||
<p class="x13gpsr-kpi-desc">
|
||||
{l s='Number of products that do not have an assigned responsible person by brand and individual.' mod='x13gpsr'}<br/>
|
||||
<span>{l s='Only required for non-EU products.' mod='x13gpsr'}</span>
|
||||
</p>
|
||||
<p class="x13gpsr-kpi-number {$classNoPerson}">
|
||||
<span>{$nbOfProductsWithNoResponsiblePerson}</span> {l s='pcs' mod='x13gpsr'}
|
||||
</p>
|
||||
{if $isMultiStoreUsed}<span class="x13gpsr-kpi-multistore">{l s='(in all shop)' mod='x13gpsr'}</span>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
{l s='This tab allows you to monitor products that do not have brands, manufacturers or responsible persons.' mod='x13gpsr'}<br/>
|
||||
{l s='Here you can quickly assign missing data.' mod='x13gpsr'}<br/>
|
||||
{l s='Remember that assigning manufacturers or responsible persons works as an individual assignment and will overwrite the setting by manufacturer after mapping. Make sure that you do not want to assign only brands, and based on them the data about the responsible person and manufacturer will be transferred automatically.' mod='x13gpsr'}
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
@@ -0,0 +1,17 @@
|
||||
<div class="alert alert-info">
|
||||
{l s='In PrestaShop, the term "Brand" has been used instead of "Manufacturer" for quite some time. To make bulk data management easier, we decided to add a "Manufacturers" tab, where you can link the Brands from your store.' mod='x13gpsr'}<br/>
|
||||
<br/>
|
||||
<strong>{l s='What is the difference between a Brand and a Manufacturer?' mod='x13gpsr'}</strong><br/>
|
||||
{l s='In short, a manufacturer is the company responsible for producing a product. However, it can manage multiple brands, which may belong to the same product category or entirely different ones.' mod='x13gpsr'}<br/>
|
||||
{l s='For example, P&G (Procter & Gamble) is the manufacturer responsible for brands like Pampers, Oral-B, and Gillette. Similarly, Mars Incorporated is the manufacturer behind brands such as M&M’s, Pedigree, and Orbit.' mod='x13gpsr'}<br/>
|
||||
<br/>
|
||||
<strong>
|
||||
{if $isX13AllegroInstalled}
|
||||
{l s='You are using our PrestaShop integration with Allegro!' mod='x13gpsr'}<br/>
|
||||
{else}
|
||||
{l s='It looks like you are not using our Allegro Integration module yet!' mod='x13gpsr'}<br/>
|
||||
{/if}
|
||||
</strong>
|
||||
{l s='You can map each manufacturer from our GPSR module with a manufacturer from Allegro - thanks to this, when listing and updating offers, their data will be transferred automatically.' mod='x13gpsr'} - wkrótce<br/><br/>
|
||||
{l s='Keep in mind that while responsible manufacturers are typically mapped to brands for convenience, you can override these assignments for individual products directly. This flexibility allows you to customize the data as needed.' mod='x13gpsr'}
|
||||
</div>
|
||||
16
modules/x13gpsr/views/templates/admin/responsible-person.tpl
Normal file
16
modules/x13gpsr/views/templates/admin/responsible-person.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="alert alert-info">
|
||||
{l s='When selling products originating from outside the European Union (EU), you are required to provide a contact person responsible for product safety. This can be either an individual or a company.' mod='x13gpsr'}<br/>
|
||||
{l s='Typically, such a person is already designated within Europe, and information about them can be obtained from your supplier, importer, or manufacturer.' mod='x13gpsr'}<br/><br/>
|
||||
{l s='To simplify assigning a responsible person to products, we have introduced the option to link them to multiple brands in your store.' mod='x13gpsr'}<br/>
|
||||
|
||||
<br/>
|
||||
<strong>
|
||||
{if $isX13AllegroInstalled}
|
||||
{l s='You are using our PrestaShop integration with Allegro!' mod='x13gpsr'}<br/>
|
||||
{else}
|
||||
{l s='It looks like you are not using our Allegro Integration module yet!' mod='x13gpsr'}<br/>
|
||||
{/if}
|
||||
</strong>
|
||||
{l s='You can map each responsible person from our GPSR module with a responsible person from Allegro - thanks to this, when listing and updating offers, their data will be transferred automatically.' mod='x13gpsr'} - wkrótce<br/><br/>
|
||||
{l s='Keep in mind that while responsible persons are typically mapped to brands for convenience, you can override these assignments for individual products directly. This flexibility allows you to customize the data as needed.' mod='x13gpsr'}
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="mb-3">
|
||||
<h6 class="xgpsr-modal-bo-title">{l s='Selected Products' mod='x13gpsr'}</h6>
|
||||
{if $selectedProducts|@count > 0}
|
||||
<div style="max-height: 100px; overflow-y: auto; padding: 10px;">
|
||||
{foreach from=$selectedProducts key=id item=name}
|
||||
<div>
|
||||
<strong>{$name}</strong> (ID: {$id})
|
||||
<input type="hidden" name="selectedProducts[]" value="{$id}" data-name="{$name}">
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{else}
|
||||
<div>{l s='No products selected.' mod='x13gpsr'}</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="form-group">
|
||||
<h6 class="xgpsr-modal-bo-title">{l s='Select a brand' mod='x13gpsr'}</h6>
|
||||
<select id="id_brand" name="bulk_update_data[id_brand]" class="form-control">
|
||||
<option value="0">{l s='Select a brand' mod='x13gpsr'}</option>
|
||||
{foreach from=$brands item=brand}
|
||||
<option value="{$brand.id_manufacturer}">{$brand.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
42
modules/x13gpsr/views/templates/admin/updaters/modal.tpl
Normal file
42
modules/x13gpsr/views/templates/admin/updaters/modal.tpl
Normal file
@@ -0,0 +1,42 @@
|
||||
<div class="modal-dialog x13gpsr-modal" role="document">
|
||||
<form>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header x13gpsr-modal-header">
|
||||
<h5 class="modal-title">{$x13gpsr_modal_title|escape}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{l s='Close' mod='x13gpsr'}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="xgpsr-progress-container" style="display: none; margin-top: 15px;">
|
||||
<div class="progress">
|
||||
<div id="xgpsr-progress-bar" class="progress-bar" role="progressbar" style="width: 0%;"
|
||||
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
|
||||
</div>
|
||||
</div>
|
||||
{$x13gpsr_modal_selected_products_html nofilter}
|
||||
<div id="xgpsr-updater-specific-container">
|
||||
{$x13gpsr_modal_uppdater_specific_html nofilter}
|
||||
</div>
|
||||
|
||||
<div class="x13gpsr-logs" style="display: none;">
|
||||
<h6 class="xgpsr-modal-bo-title">{$eventLogText|escape:'html'}</h6>
|
||||
<div id="xgpsr-bulk-update-logs">
|
||||
{l s='Logs...' mod='x13gpsr'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer d-flex justify-content-end">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" id="xgpsr-cancel-button">
|
||||
{$cancelText|escape:'html'}
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" data-type="{$bulkEditType}" id="xgpsr-submit-bulk-update">
|
||||
{$confirmText|escape:'html'}
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary pull-right" data-dismiss="modal" id="xgpsr-close-button" style="display: none;">
|
||||
{$closeText|escape:'html'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="form-group">
|
||||
<h6 class="xgpsr-modal-bo-title">{l s='Select a responsible manufacturer' mod='x13gpsr'}</h6>
|
||||
<select name="bulk_update_data[id]" class="form-control">
|
||||
<option value="0">{l s='Select a responsible manufacturer' mod='x13gpsr'}</option>
|
||||
{* <option value="-1">{l s='Remove responsible manufacturer from the product individual settings' mod='x13gpsr'}</option> *}
|
||||
{foreach from=$items item=record}
|
||||
<option value="{$record.id}">{$record.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="form-group">
|
||||
<h6 class="xgpsr-modal-bo-title">{l s='Select a responsible person' mod='x13gpsr'}</h6>
|
||||
<select name="bulk_update_data[id]" class="form-control">
|
||||
<option value="0">{l s='Select a responsible person' mod='x13gpsr'}</option>
|
||||
{* <option value="-1">{l s='Remove responsible person from the product individual settings' mod='x13gpsr'}</option> *}
|
||||
{foreach from=$items item=record}
|
||||
<option value="{$record.id}">{$record.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
24
modules/x13gpsr/views/templates/front/1.6/modal.tpl
Normal file
24
modules/x13gpsr/views/templates/front/1.6/modal.tpl
Normal file
@@ -0,0 +1,24 @@
|
||||
{$is_ps_16 = version_compare($smarty.const._PS_VERSION_, '1.7.0.0', '<')}
|
||||
|
||||
<div id="x13gpsr" class="x13gpsr x13gpsr__backdrop {if $is_ps_16}x13gpsr__backdrop--16{/if} x13gpsr-hidden">
|
||||
<div id="x13gpsr" class="x13gpsr__box x13gpsr__box--{if $x13gpsr.config.layout == 'box'}default{else}fixed{/if}">
|
||||
<div class="x13gpsr__box-inner">
|
||||
<div class="x13gpsr__box-header">
|
||||
<p class="x13gpsr__box-title">Odpowiedzialność za produkt</p>
|
||||
<button class="x13gpsr__btn x13gpsr__btn--close" type="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#232323">
|
||||
<path
|
||||
d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="x13gpsr__box-body">
|
||||
{if $x13gpsr.config.layout == 'cloud_with_tabs'}
|
||||
{include file='../../hook/_partials/1.6/tabs.tpl'}
|
||||
{else}
|
||||
{include file='../../hook/_partials/1.6/info.tpl'}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
24
modules/x13gpsr/views/templates/front/modal.tpl
Normal file
24
modules/x13gpsr/views/templates/front/modal.tpl
Normal file
@@ -0,0 +1,24 @@
|
||||
{$is_ps_16 = version_compare($smarty.const._PS_VERSION_, '1.7.0.0', '<')}
|
||||
|
||||
<div id="x13gpsr" class="x13gpsr x13gpsr__backdrop {if $is_ps_16}x13gpsr__backdrop--16{/if} x13gpsr-hidden">
|
||||
<div id="x13gpsr" class="x13gpsr__box x13gpsr__box--{if $x13gpsr.config.layout == 'box'}default{else}fixed{/if}">
|
||||
<div class="x13gpsr__box-inner">
|
||||
<div class="x13gpsr__box-header">
|
||||
<p class="x13gpsr__box-title">{l s='Responsibility for the Product' mod='x13gpsr'}</p>
|
||||
<button class="x13gpsr__btn x13gpsr__btn--close" type="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#232323">
|
||||
<path
|
||||
d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="x13gpsr__box-body">
|
||||
{if $x13gpsr.config.layout == 'cloud_with_tabs'}
|
||||
{include file='module:x13gpsr/views/templates/hook/_partials/tabs.tpl'}
|
||||
{else}
|
||||
{include file='module:x13gpsr/views/templates/hook/_partials/info.tpl'}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
23
modules/x13gpsr/views/templates/hook/1.6/custom.tpl
Normal file
23
modules/x13gpsr/views/templates/hook/1.6/custom.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="x13gpsr x13gpsr-shop-{$x13gpsr.shopId} x13gpsr--{$x13gpsr.hookName}">
|
||||
{if $x13gpsr.config.layout != 'default'}
|
||||
<p class="x13gpsr-info-desc">
|
||||
{l s='Product compliance details:' mod='x13gpsr'}
|
||||
<a href="#x13gpsr" rel="nofollow" class="x13gpsr__btn--show">
|
||||
{if !empty($x13gpsr.responsibleManufacturer) && !empty($x13gpsr.responsiblePerson)}
|
||||
{l s='Manufacturer and person responsible for the product' mod='x13gpsr'}
|
||||
{elseif !empty($x13gpsr.responsibleManufacturer)}
|
||||
{l s='Manufacturer responsible for the product' mod='x13gpsr'}
|
||||
{elseif !empty($x13gpsr.responsiblePerson)}
|
||||
{l s='Responsibility for the Product' mod='x13gpsr'}
|
||||
{/if}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{include file='../../front/1.6/modal.tpl'}
|
||||
{else}
|
||||
<h2>{$x13gpsr.blockTitle}</h2>
|
||||
<div class="rte">
|
||||
{include file='../_partials/1.6/info.tpl'}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
25
modules/x13gpsr/views/templates/hook/1.6/product.tpl
Normal file
25
modules/x13gpsr/views/templates/hook/1.6/product.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="x13gpsr x13gpsr-shop-{$x13gpsr.shopId} x13gpsr--{$x13gpsr.hookName}">
|
||||
{if $x13gpsr.config.layout != 'default'}
|
||||
<p class="x13gpsr-info-desc">
|
||||
{l s='Product compliance details:' mod='x13gpsr'}
|
||||
<a href="#x13gpsr" rel="nofollow" class="x13gpsr__btn--show">
|
||||
{if !empty($x13gpsr.responsibleManufacturer) && !empty($x13gpsr.responsiblePerson)}
|
||||
{l s='Manufacturer and person responsible for the product' mod='x13gpsr'}
|
||||
{elseif !empty($x13gpsr.responsibleManufacturer)}
|
||||
{l s='Manufacturer responsible for the product' mod='x13gpsr'}
|
||||
{elseif !empty($x13gpsr.responsiblePerson)}
|
||||
{l s='Responsibility for the Product' mod='x13gpsr'}
|
||||
{/if}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{include file='../../front/1.6/modal.tpl'}
|
||||
{else}
|
||||
<section class="page-product-box">
|
||||
<h3 class="page-product-heading">{$x13gpsr.blockTitle}</h3>
|
||||
<div class="rte">
|
||||
{include file='../_partials/1.6/info.tpl'}
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
</div>
|
||||
13
modules/x13gpsr/views/templates/hook/_partials/1.6/info.tpl
Normal file
13
modules/x13gpsr/views/templates/hook/_partials/1.6/info.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{if !empty($x13gpsr.responsibleManufacturer)}
|
||||
{include file='../responsible_manufacturer.tpl'}
|
||||
{/if}
|
||||
|
||||
{if !empty($x13gpsr.responsiblePerson)}
|
||||
{include file='../responsible_person.tpl'}
|
||||
{/if}
|
||||
|
||||
{if $x13gpsr.config.displayExtraSafetyInformation}
|
||||
<div class="x13gpsr__informations">
|
||||
{$x13gpsr.extraSafetyInformation nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
37
modules/x13gpsr/views/templates/hook/_partials/1.6/tabs.tpl
Normal file
37
modules/x13gpsr/views/templates/hook/_partials/1.6/tabs.tpl
Normal file
@@ -0,0 +1,37 @@
|
||||
{if !empty($x13gpsr.responsibleManufacturer) || !empty($x13gpsr.responsiblePerson)}
|
||||
<ul class="x13gpsr__nav" id="x13gpsrTab" role="tablist">
|
||||
{if !empty($x13gpsr.responsibleManufacturer)}
|
||||
<li class="x13gpsr__nav-item">
|
||||
<a class="x13gpsr__nav-link active" id="x13gpsr-manufacturer-tab" data-toggle="x13gpsr-tab"
|
||||
href="#x13gpsrManufacturer" role="tab" aria-controls="x13gpsrManufacturer"
|
||||
aria-selected="true">{l s='Manufacturer' mod='x13gpsr'}</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if !empty($x13gpsr.responsiblePerson)}
|
||||
<li class="x13gpsr__nav-item">
|
||||
<a class="x13gpsr__nav-link{if empty($x13gpsr.responsibleManufacturer)} active{/if}" id="x13gpsr-person-tab" data-toggle="x13gpsr-tab" href="#x13gpsrPerson" role="tab"
|
||||
aria-controls="x13gpsrPerson" aria-selected="false">{l s='Responsible person' mod='x13gpsr'}</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
|
||||
<div class="x13gpsr__tab-content" id="x13gpsrTabContent">
|
||||
{if !empty($x13gpsr.responsibleManufacturer)}
|
||||
<div class="x13gpsr__tab-pane active" id="x13gpsrManufacturer" role="tabpanel"
|
||||
aria-labelledby="x13gpsr-manufacturer-tab">
|
||||
{include file='../../_partials/responsible_manufacturer.tpl'}
|
||||
</div>
|
||||
{/if}
|
||||
{if !empty($x13gpsr.responsiblePerson)}
|
||||
<div class="x13gpsr__tab-pane{if empty($x13gpsr.responsibleManufacturer)} active{/if}" id="x13gpsrPerson" role="tabpanel" aria-labelledby="x13gpsr-person-tab">
|
||||
{include file='../../_partials/responsible_person.tpl'}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $x13gpsr.config.displayExtraSafetyInformation}
|
||||
<div class="x13gpsr__informations">
|
||||
{$x13gpsr.extraSafetyInformation nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
13
modules/x13gpsr/views/templates/hook/_partials/info.tpl
Normal file
13
modules/x13gpsr/views/templates/hook/_partials/info.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{if !empty($x13gpsr.responsibleManufacturer)}
|
||||
{include file='module:x13gpsr/views/templates/hook/_partials/responsible_manufacturer.tpl'}
|
||||
{/if}
|
||||
|
||||
{if !empty($x13gpsr.responsiblePerson)}
|
||||
{include file='module:x13gpsr/views/templates/hook/_partials/responsible_person.tpl'}
|
||||
{/if}
|
||||
|
||||
{if $x13gpsr.config.displayExtraSafetyInformation}
|
||||
<div class="x13gpsr__informations">
|
||||
{$x13gpsr.extraSafetyInformation nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
@@ -0,0 +1,35 @@
|
||||
{if $x13gpsr.config.displayManufacturerLogo && $x13gpsr.hasManufacturer && $x13gpsr.manufacturerLogo}
|
||||
<p class="x13gpsr__manufacturer">
|
||||
<a href="{$x13gpsr.manufacturerUrl}" title="{$x13gpsr.manufacturerName}">
|
||||
<img src="{$x13gpsr.manufacturerLogo}" alt="{$x13gpsr.manufacturerName}">
|
||||
</a>
|
||||
</p>
|
||||
{/if}
|
||||
<p class="x13gpsr__list">
|
||||
<strong class="x13gpsr__item x13gpsr__title">{l s='Manufacturer' mod='x13gpsr'}</strong>
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span class="x13gpsr__label">{l s='Manufacturer Name' mod='x13gpsr'}:</span>{/if}
|
||||
{$x13gpsr.responsibleManufacturer.name}</span>
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='Adress' mod='x13gpsr'}:</span> {/if}{$x13gpsr.responsibleManufacturer.address}</span>
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='City' mod='x13gpsr'}:</span> {/if}{$x13gpsr.responsibleManufacturer.postcode}
|
||||
{$x13gpsr.responsibleManufacturer.city}</span>
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='Country' mod='x13gpsr'}:</span>
|
||||
{/if}{$x13gpsr.responsibleManufacturer.country}</span>
|
||||
{if $x13gpsr.responsibleManufacturer.email}
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='E-mail' mod='x13gpsr'}:</span> {/if}<a
|
||||
href="mailto:{$x13gpsr.responsibleManufacturer.email}">{$x13gpsr.responsibleManufacturer.email}</a></span>
|
||||
{/if}
|
||||
{if $x13gpsr.responsibleManufacturer.phone}
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='Phone' mod='x13gpsr'}:</span> {/if}{$x13gpsr.responsibleManufacturer.phone}</span>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
{if !empty($x13gpsr.responsibleManufacturer.extra_note)}
|
||||
<div class="x13gpsr__extraNote">
|
||||
{$x13gpsr.responsibleManufacturer.extra_note nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
@@ -0,0 +1,28 @@
|
||||
<p class="x13gpsr__list">
|
||||
<strong class="x13gpsr__item x13gpsr__title">{l s='Responsible person' mod='x13gpsr'}</strong>
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='Company name / Person Name' mod='x13gpsr'}:</span>
|
||||
{/if}{$x13gpsr.responsiblePerson.name}</span>
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='Adress' mod='x13gpsr'}:</span> {/if}{$x13gpsr.responsiblePerson.address}</span>
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='City' mod='x13gpsr'}:</span> {/if}{$x13gpsr.responsiblePerson.postcode}
|
||||
{$x13gpsr.responsiblePerson.city}</span>
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='Country' mod='x13gpsr'}:</span> {/if}{$x13gpsr.responsiblePerson.country}</span>
|
||||
{if $x13gpsr.responsiblePerson.email}
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='E-mail' mod='x13gpsr'}:</span> {/if}<a
|
||||
href="mailto:{$x13gpsr.responsiblePerson.email}">{$x13gpsr.responsiblePerson.email}</a></span>
|
||||
{/if}
|
||||
{if $x13gpsr.responsiblePerson.phone}
|
||||
<span class="x13gpsr__item">{if $x13gpsr.config.displayLabel}<span
|
||||
class="x13gpsr__label">{l s='Phone' mod='x13gpsr'}:</span> {/if}{$x13gpsr.responsiblePerson.phone}</span>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
{if !empty($x13gpsr.responsiblePerson.extra_note)}
|
||||
<div class="x13gpsr__extraNote">
|
||||
{$x13gpsr.responsiblePerson.extra_note nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
37
modules/x13gpsr/views/templates/hook/_partials/tabs.tpl
Normal file
37
modules/x13gpsr/views/templates/hook/_partials/tabs.tpl
Normal file
@@ -0,0 +1,37 @@
|
||||
{if !empty($x13gpsr.responsibleManufacturer) || !empty($x13gpsr.responsiblePerson)}
|
||||
<ul class="x13gpsr__nav" id="x13gpsrTab" role="tablist">
|
||||
{if !empty($x13gpsr.responsibleManufacturer)}
|
||||
<li class="x13gpsr__nav-item">
|
||||
<a class="x13gpsr__nav-link active" id="x13gpsr-manufacturer-tab" data-toggle="x13gpsr-tab"
|
||||
href="#x13gpsrManufacturer" role="tab" aria-controls="x13gpsrManufacturer"
|
||||
aria-selected="true">{l s='Manufacturer' mod='x13gpsr'}</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if !empty($x13gpsr.responsiblePerson)}
|
||||
<li class="x13gpsr__nav-item">
|
||||
<a class="x13gpsr__nav-link{if empty($x13gpsr.responsibleManufacturer)} active{/if}" id="x13gpsr-person-tab" data-toggle="x13gpsr-tab" href="#x13gpsrPerson" role="tab"
|
||||
aria-controls="x13gpsrPerson" aria-selected="false">{l s='Responsible person' mod='x13gpsr'}</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
|
||||
<div class="x13gpsr__tab-content" id="x13gpsrTabContent">
|
||||
{if !empty($x13gpsr.responsibleManufacturer)}
|
||||
<div class="x13gpsr__tab-pane active" id="x13gpsrManufacturer" role="tabpanel"
|
||||
aria-labelledby="x13gpsr-manufacturer-tab">
|
||||
{include file='module:x13gpsr/views/templates/hook/_partials/responsible_manufacturer.tpl'}
|
||||
</div>
|
||||
{/if}
|
||||
{if !empty($x13gpsr.responsiblePerson)}
|
||||
<div class="x13gpsr__tab-pane{if empty($x13gpsr.responsibleManufacturer)} active{/if}" id="x13gpsrPerson" role="tabpanel" aria-labelledby="x13gpsr-person-tab">
|
||||
{include file='module:x13gpsr/views/templates/hook/_partials/responsible_person.tpl'}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $x13gpsr.config.displayExtraSafetyInformation}
|
||||
<div class="x13gpsr__informations">
|
||||
{$x13gpsr.extraSafetyInformation nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
97
modules/x13gpsr/views/templates/hook/admin/product.tpl
Normal file
97
modules/x13gpsr/views/templates/hook/admin/product.tpl
Normal file
@@ -0,0 +1,97 @@
|
||||
<br/>
|
||||
<div class="panel bootstrap">
|
||||
<!-- Responsible Manufacturer -->
|
||||
<h3>{l s='Responsible Manufacturer' mod='x13gpsr'}</h3>
|
||||
<div class="form-group mb-3">
|
||||
{if $responsibleManufacturerByBrand}
|
||||
<div class="alert alert-info">
|
||||
<strong>{l s='Responsible manufacturer assigned by the brand of the product:' mod='x13gpsr'}</strong>
|
||||
{$responsibleManufacturerByBrand.name} ({$responsibleManufacturerByBrand.email})
|
||||
</div>
|
||||
{/if}
|
||||
<select name="responsible_manufacturer" id="x13gpsr_responsible_manufacturer" class="custom-select">
|
||||
<option value="0">{l s='Select to override' mod='x13gpsr'}</option>
|
||||
{foreach from=$responsibleManufacturers key=name item=id}
|
||||
<option value="{$id}" {if $id == $assignedResponsibleManufacturer}selected{/if}>{$name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="panel bootstrap">
|
||||
<!-- Responsible Person -->
|
||||
<h3>{l s='Responsible Person' mod='x13gpsr'}</h3>
|
||||
<div class="form-group mb-3 mt-3">
|
||||
{if $responsiblePersonByBrand}
|
||||
<div class="alert alert-info">
|
||||
<strong>{l s='Responsible person assigned by the brand of the product:' mod='x13gpsr'}</strong>
|
||||
{$responsiblePersonByBrand.name} ({$responsiblePersonByBrand.email})
|
||||
</div>
|
||||
{/if}
|
||||
<select name="responsible_person" id="x13gpsr_responsible_person" class="custom-select">
|
||||
<option value="0">{l s='Select to override' mod='x13gpsr'}</option>
|
||||
{foreach from=$responsiblePersons key=name item=id}
|
||||
<option value="{$id}" {if $id == $assignedResponsiblePerson}selected{/if}>{$name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="panel bootstrap">
|
||||
<!-- Additional Safety Information -->
|
||||
<h3>{l s='Additional safety information' mod='x13gpsr'}</h3>
|
||||
<div class="form-group mb-3">
|
||||
<div>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
{foreach from=$languages item=language}
|
||||
<li class="nav-item {if $language.id_lang == $defaultLanguage}active{/if}" role="presentation">
|
||||
<a class="{if $language.id_lang == $defaultLanguage}active{/if} nav-link"
|
||||
id="lang-tab-{$language.id_lang}" data-toggle="tab" href="#lang-{$language.id_lang}" role="tab"
|
||||
aria-controls="lang-{$language.id_lang}"
|
||||
{if $language.id_lang == $defaultLanguage}aria-selected="true"
|
||||
{else}aria-selected="false"
|
||||
{/if}>
|
||||
{$language.iso_code}
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<div class="tab-content p-3 border rounded">
|
||||
{foreach from=$languages item=language}
|
||||
<div class="tab-pane {if $language.id_lang == $defaultLanguage}active{/if}"
|
||||
id="lang-{$language.id_lang}" role="tabpanel" aria-labelledby="lang-tab-{$language.id_lang}">
|
||||
<textarea name="additional_safety_information_{$language.id_lang}"
|
||||
id="x13gpsr_additional_safety_information_{$language.id_lang}" class="form-control autoload_rte"
|
||||
rows="5">{$additionalSafetyInformation->extra_information[$language.id_lang]|default:'' nofilter}</textarea>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $isPs16}
|
||||
<div class="panel-footer">
|
||||
<a href="{$link->getAdminLink('AdminProducts')}" class="btn btn-default">
|
||||
<i class="process-icon-cancel"></i>
|
||||
{l s='Cancel'}
|
||||
</a>
|
||||
<button type="submit" name="submitAddproduct" class="btn btn-default pull-right">
|
||||
<i class="process-icon-save"></i>
|
||||
{l s='Save'}
|
||||
</button>
|
||||
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right">
|
||||
<i class="process-icon-save"></i>
|
||||
{l s='Save and stay'}
|
||||
</button>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
tinySetup({
|
||||
editor_selector: "autoload_rte"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
</div>
|
||||
23
modules/x13gpsr/views/templates/hook/custom.tpl
Normal file
23
modules/x13gpsr/views/templates/hook/custom.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="x13gpsr x13gpsr-shop-{$x13gpsr.shopId} x13gpsr--{$x13gpsr.hookName}">
|
||||
{if $x13gpsr.config.layout != 'default'}
|
||||
<p class="x13gpsr-info-desc">
|
||||
{l s='Product compliance details:' mod='x13gpsr'}
|
||||
<a href="#x13gpsr" rel="nofollow" class="x13gpsr__btn--show">
|
||||
{if !empty($x13gpsr.responsibleManufacturer) && !empty($x13gpsr.responsiblePerson)}
|
||||
{l s='Manufacturer and person responsible for the product' mod='x13gpsr'}
|
||||
{elseif !empty($x13gpsr.responsibleManufacturer)}
|
||||
{l s='Manufacturer responsible for the product' mod='x13gpsr'}
|
||||
{elseif !empty($x13gpsr.responsiblePerson)}
|
||||
{l s='Responsibility for the Product' mod='x13gpsr'}
|
||||
{elseif !empty($x13gpsr.extraSafetyInformation)}
|
||||
{l s='Person responsible for the product' mod='x13gpsr'}
|
||||
{/if}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{include file='module:x13gpsr/views/templates/front/modal.tpl'}
|
||||
{else}
|
||||
<h2>{$x13gpsr.blockTitle}</h2>
|
||||
{include file='module:x13gpsr/views/templates/hook/_partials/info.tpl'}
|
||||
{/if}
|
||||
</div>
|
||||
6
modules/x13gpsr/views/templates/hook/header.tpl
Normal file
6
modules/x13gpsr/views/templates/hook/header.tpl
Normal file
@@ -0,0 +1,6 @@
|
||||
<style>
|
||||
:root {
|
||||
--x13gpsr-color-link: {$x13gpsr_color_link};
|
||||
--x13gpsr-color-tab: {$x13gpsr_color_tab};
|
||||
}
|
||||
</style>
|
||||
11
modules/x13gpsr/views/templates/hook/index.php
Normal file
11
modules/x13gpsr/views/templates/hook/index.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
58
modules/x13gpsr/views/templates/hook/info.tpl
Normal file
58
modules/x13gpsr/views/templates/hook/info.tpl
Normal file
@@ -0,0 +1,58 @@
|
||||
{if $x13gpsr.config.displayManufacturerLogo && $x13gpsr.hasManufacturer}
|
||||
<p class="x13gpsr__manufacturer">
|
||||
{if $x13gpsr.manufacturerLogo}
|
||||
<a href="{$x13gpsr.manufacturerUrl}" title="{$x13gpsr.manufacturerName}">
|
||||
<img src="{$x13gpsr.manufacturerLogo}" alt="{$x13gpsr.manufacturerName}">
|
||||
</a>
|
||||
{else}
|
||||
{l s='Manufacturer' mod='x13gpsr'}: <a href="{$x13gpsr.manufacturerUrl}" title="{$x13gpsr.manufacturerName}">{$x13gpsr.manufacturerName}</a>
|
||||
{/if}
|
||||
</a>
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
{if !empty($x13gpsr.responsibleManufacturer)}
|
||||
<p class="x13gpsr__list">
|
||||
<strong class="x13gpsr__item">{l s='Manufacturer' mod='x13gpsr'}</strong>
|
||||
<span class="x13gpsr__item">{$x13gpsr.responsibleManufacturer.name}</span>
|
||||
<span class="x13gpsr__item">{$x13gpsr.responsibleManufacturer.address}</span>
|
||||
<span class="x13gpsr__item">{$x13gpsr.responsibleManufacturer.postcode}
|
||||
{$x13gpsr.responsibleManufacturer.city}</span>
|
||||
<span class="x13gpsr__item">{$x13gpsr.responsibleManufacturer.country}</span>
|
||||
<a class="x13gpsr__item"
|
||||
href="mailto:{$x13gpsr.responsibleManufacturer.email}">{$x13gpsr.responsibleManufacturer.email}</a>
|
||||
{if $x13gpsr.responsibleManufacturer.phone}
|
||||
<span class="x13gpsr__item">{$x13gpsr.responsibleManufacturer.phone}</span>
|
||||
{/if}
|
||||
</p>
|
||||
{if !empty($x13gpsr.responsibleManufacturer.extra_note)}
|
||||
<div class="x13gpsr__extraNote">
|
||||
{$x13gpsr.responsibleManufacturer.extra_note nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if !empty($x13gpsr.responsiblePerson)}
|
||||
<p class="x13gpsr__list">
|
||||
<strong class="x13gpsr__item">{l s='Responsible person' mod='x13gpsr'}</strong>
|
||||
<span class="x13gpsr__item">{$x13gpsr.responsiblePerson.name}</span>
|
||||
<span class="x13gpsr__item">{$x13gpsr.responsiblePerson.address}</span>
|
||||
<span class="x13gpsr__item">{$x13gpsr.responsiblePerson.postcode} {$x13gpsr.responsiblePerson.city}</span>
|
||||
<span class="x13gpsr__item">{$x13gpsr.responsiblePerson.country}</span>
|
||||
<a class="x13gpsr__item" href="mailto:{$x13gpsr.responsiblePerson.email}">{$x13gpsr.responsiblePerson.email}</a>
|
||||
{if $x13gpsr.responsiblePerson.phone}
|
||||
<span class="x13gpsr__item">{$x13gpsr.responsiblePerson.phone}</span>
|
||||
{/if}
|
||||
</p>
|
||||
{if !empty($x13gpsr.responsiblePerson.extra_note)}
|
||||
<div class="x13gpsr__extraNote">
|
||||
{$x13gpsr.responsiblePerson.extra_note nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $x13gpsr.config.displayExtraSafetyInformation}
|
||||
<div class="x13gpsr__informations">
|
||||
{$x13gpsr.extraSafetyInformation nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
28
modules/x13gpsr/views/templates/hook/product.tpl
Normal file
28
modules/x13gpsr/views/templates/hook/product.tpl
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="x13gpsr x13gpsr-shop-{$x13gpsr.shopId} x13gpsr--{$x13gpsr.hookName}">
|
||||
{if $x13gpsr.config.layout != 'default'}
|
||||
<p class="x13gpsr-info-desc">
|
||||
{l s='Product compliance details:' mod='x13gpsr'}
|
||||
<a href="#x13gpsr" rel="nofollow" class="x13gpsr__btn--show">
|
||||
{if !empty($x13gpsr.responsibleManufacturer) && !empty($x13gpsr.responsiblePerson)}
|
||||
{l s='Manufacturer and person responsible for the product' mod='x13gpsr'}
|
||||
{elseif !empty($x13gpsr.responsibleManufacturer)}
|
||||
{l s='Manufacturer responsible for the product' mod='x13gpsr'}
|
||||
{elseif !empty($x13gpsr.responsiblePerson)}
|
||||
{l s='Person responsible for the product' mod='x13gpsr'}
|
||||
{elseif !empty($x13gpsr.extraSafetyInformation)}
|
||||
{l s='Responsibility for the Product' mod='x13gpsr'}
|
||||
{/if}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{include file='module:x13gpsr/views/templates/front/modal.tpl'}
|
||||
{else}
|
||||
<h2>{$x13gpsr.blockTitle}</h2>
|
||||
|
||||
<div class="card card-block">
|
||||
<div class="card-body">
|
||||
{include file='module:x13gpsr/views/templates/hook/_partials/info.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="x13gpsr x13gpsr-shop-{$x13gpsr.shopId} x13gpsr--{$x13gpsr.hookName}">
|
||||
{include file='module:x13gpsr/views/templates/hook/_partials/info.tpl'}
|
||||
</div>
|
||||
11
modules/x13gpsr/views/templates/index.php
Normal file
11
modules/x13gpsr/views/templates/index.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
Reference in New Issue
Block a user