first commit

This commit is contained in:
2024-12-17 13:43:22 +01:00
commit 8e6cd8b410
21292 changed files with 3514826 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
{*
* 2007-2016 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 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 http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
* MODIFIED BY MYPRESTA.EU FOR PRESTASHOP 1.7 PURPOSES !
*
*}
{extends file="helpers/form/form.tpl"}
{block name="input"}
{if $input.type == 'products'}
<table id="{$input.name}">
<tr>
<th></th>
<th>ID</th>
<th width="80%">{l s='Product Name'}</th>
</tr>
{foreach $input.values as $value}
<tr>
<td>
<input type="checkbox" name="{$input.name}[]" value="{$value.id_product}"
{if isset($value.selected) && $value.selected == 1} checked {/if} />
</td>
<td>{$value.id_product}</td>
<td width="80%">{$value.name}</td>
</tr>
{/foreach}
</table>
{elseif $input.type == 'switch' && $smarty.const._PS_VERSION_|@addcslashes:'\'' < '1.6'}
{foreach $input.values as $value}
<input type="radio" name="{$input.name}" id="{$value.id}" value="{$value.value|escape:'html':'UTF-8'}"
{if $fields_value[$input.name] == $value.value}checked="checked"{/if}
{if isset($input.disabled) && $input.disabled}disabled="disabled"{/if} />
<label class="t" for="{$value.id}">
{if isset($input.is_bool) && $input.is_bool == true}
{if $value.value == 1}
<img src="../img/admin/enabled.gif" alt="{$value.label}" title="{$value.label}" />
{else}
<img src="../img/admin/disabled.gif" alt="{$value.label}" title="{$value.label}" />
{/if}
{else}
{$value.label}
{/if}
</label>
{if isset($input.br) && $input.br}<br />{/if}
{if isset($value.p) && $value.p}<p>{$value.p}</p>{/if}
{/foreach}
{else}
{$smarty.block.parent}
{/if}
{/block}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2016 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 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 http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
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
/*
* 2007-2016 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 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 http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
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,250 @@
<tbody>
{if count($list)}
{foreach $list AS $index => $tr}
<tr{if $position_identifier} id="tr_{$position_group_identifier}_{$tr.$identifier}_{if isset($tr.position['position'])}{$tr.position['position']}{else}0{/if}"{/if} class="{if isset($tr.class)}{$tr.class}{/if} {if $tr@iteration is odd by 1}odd{/if}"{if isset($tr.color) && $color_on_bg} style="background-color: {$tr.color}"{/if} >
{if $bulk_actions && $has_bulk_actions}
<td class="row-selector text-center">
{if isset($list_skip_actions.delete)}
{if !in_array($tr.$identifier, $list_skip_actions.delete)}
<input type="checkbox" name="{$list_id}Box[]" value="{$tr.$identifier}"{if isset($checked_boxes) && is_array($checked_boxes) && in_array({$tr.$identifier}, $checked_boxes)} checked="checked"{/if} class="noborder"/>
{/if}
{else}
<input type="checkbox" name="{$list_id}Box[]" value="{$tr.$identifier}"{if isset($checked_boxes) && is_array($checked_boxes) && in_array({$tr.$identifier}, $checked_boxes)} checked="checked"{/if} class="noborder"/>
{/if}
</td>
{/if}
{foreach $fields_display AS $key => $params}
{block name="open_td"}
<td
{if isset($params.position)}
id="td_{if !empty($position_group_identifier)}{$position_group_identifier}{else}0{/if}_{$tr.$identifier}{if $smarty.capture.tr_count > 1}_{($smarty.capture.tr_count - 1)|intval}{/if}"
{/if}
class="{strip}{if !$no_link}pointer{/if}
{if isset($params.position) && $order_by == 'position' && $order_way != 'DESC'} dragHandle{/if}
{if isset($params.class)} {$params.class}{/if}
{if isset($params.align)} {$params.align}{/if}{/strip}"
{if (!isset($params.position) && !$no_link && !isset($params.remove_onclick))}
onclick="document.location = '{$current_index|escape:'html':'UTF-8'}&amp;{$identifier|escape:'html':'UTF-8'}={$tr.$identifier|escape:'html':'UTF-8'}{if $view}&amp;view{else}&amp;update{/if}{$table|escape:'html':'UTF-8'}{if $page > 1}&amp;page={$page|intval}{/if}&amp;token={$token|escape:'html':'UTF-8'}'">
{else}
>
{/if}
{/block}
{block name="td_content"}
{if isset($params.prefix)}{$params.prefix}{/if}
{if isset($params.badge_success) && $params.badge_success && isset($tr.badge_success) && $tr.badge_success == $params.badge_success}<span class="badge badge-success">{/if}
{if isset($params.badge_warning) && $params.badge_warning && isset($tr.badge_warning) && $tr.badge_warning == $params.badge_warning}<span class="badge badge-warning">{/if}
{if isset($params.badge_danger) && $params.badge_danger && isset($tr.badge_danger) && $tr.badge_danger == $params.badge_danger}<span class="badge badge-danger">{/if}
{if isset($params.color) && isset($tr[$params.color])}
<span class="label color_field" style="background-color:{$tr[$params.color]};color:{if Tools::getBrightness($tr[$params.color]) < 128}white{else}#383838{/if}">
{/if}
{if isset($tr.$key)}
{if isset($params.active)}
{$tr.$key}
{elseif isset($params.callback)}
{if isset($params.maxlength) && Tools::strlen($tr.$key) > $params.maxlength}
<span title="{$tr.$key}">{$tr.$key|truncate:$params.maxlength:'...'}</span>
{else}
{$tr.$key}
{/if}
{elseif isset($params.activeVisu)}
{if $tr.$key}
<i class="icon-check-ok"></i>
{l s='Enabled' d='Admin.Global'}
{else}
<i class="icon-remove"></i>
{l s='Disabled' d='Admin.Global'}
{/if}
{elseif isset($params.position)}
{if !$filters_has_value && $order_by == 'position' && $order_way != 'DESC'}
<div class="dragGroup">
<div class="positions">
{$tr.$key.position + 1}
</div>
</div>
{else}
{$tr.$key.position + 1}
{/if}
{elseif isset($params.image)}
{$tr.$key}
{elseif isset($params.icon)}
{if is_array($tr[$key])}
{if isset($tr[$key]['class'])}
<i class="{$tr[$key]['class']}"></i>
{else}
<img src="../img/admin/{$tr[$key]['src']}" alt="{$tr[$key]['alt']}" title="{$tr[$key]['alt']}"/>
{/if}
{/if}
{elseif isset($params.type) && $params.type == 'price'}
{displayPrice price=$tr.$key}
{elseif isset($params.float)}
{$tr.$key}
{elseif isset($params.type) && $params.type == 'date'}
{dateFormat date=$tr.$key full=0}
{elseif isset($params.type) && $params.type == 'datetime'}
{dateFormat date=$tr.$key full=1}
{elseif isset($params.type) && $params.type == 'decimal'}
{$tr.$key|string_format:"%.2f"}
{elseif isset($params.type) && $params.type == 'percent'}
{$tr.$key} {l s='%'}
{elseif isset($params.type) && $params.type == 'bool'}
{if $tr.$key == 1}
{l s='Yes' d='Admin.Global'}
{elseif $tr.$key == 0 && $tr.$key != ''}
{l s='No' d='Admin.Global'}
{/if}
{* If type is 'editable', an input is created *}
{elseif isset($params.type) && $params.type == 'editable' && isset($tr.id)}
<input type="text" name="{$key}_{$tr.id}" value="{$tr.$key|escape:'html':'UTF-8'}" class="{$key}"/>
{elseif $key == 'color'}
{if !is_array($tr.$key)}
<div style="background-color: {$tr.$key};" class="attributes-color-container"></div>
{else}
{*TEXTURE*}
<img src="{$tr.$key.texture}" alt="{$tr.name}" class="attributes-color-container"/>
{/if}
{elseif isset($params.maxlength) && Tools::strlen($tr.$key) > $params.maxlength}
<span title="{$tr.$key|escape:'html':'UTF-8'}">{$tr.$key|truncate:$params.maxlength:'...'|escape:'html':'UTF-8'}</span>
{else}
{$tr.$key|escape:'html':'UTF-8'}
{/if}
{else}
{block name="default_field"}--{/block}
{/if}
{if isset($params.suffix)}{$params.suffix}{/if}
{if isset($params.color) && isset($tr.color)}
</span>
{/if}
{if isset($params.badge_danger) && $params.badge_danger && isset($tr.badge_danger) && $tr.badge_danger == $params.badge_danger}</span>{/if}
{if isset($params.badge_warning) && $params.badge_warning && isset($tr.badge_warning) && $tr.badge_warning == $params.badge_warning}</span>{/if}
{if isset($params.badge_success) && $params.badge_success && isset($tr.badge_success) && $tr.badge_success == $params.badge_success}</span>{/if}
{/block}
{block name="close_td"}
</td>
{/block}
{/foreach}
{if $multishop_active && $shop_link_type}
<td title="{$tr.shop_name}">
{if isset($tr.shop_short_name)}
{$tr.shop_short_name}
{else}
{$tr.shop_name}
{/if}
</td>
{/if}
{if $has_actions}
<td class="text-right">
{assign var='compiled_actions' value=array()}
{foreach $actions AS $key => $action}
{if isset($tr.$action)}
{if $key == 0}
{assign var='action' value=$action}
{/if}
{if $action == 'delete' && $actions|@count > 2}
{$compiled_actions[] = 'divider'}
{/if}
{$compiled_actions[] = $tr.$action}
{/if}
{/foreach}
{if $compiled_actions|count > 0}
{if $compiled_actions|count > 1}<div class="btn-group-action">{/if}
<div class="btn-group pull-right">
{$compiled_actions[0]}
{if $compiled_actions|count > 1}
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="icon-caret-down"></i>&nbsp;
</button>
<ul class="dropdown-menu">
{foreach $compiled_actions AS $key => $action}
{if $key != 0}
<li{if $action == 'divider' && $compiled_actions|count > 3} class="divider"{/if}>
{if $action != 'divider'}{$action}{/if}
</li>
{/if}
{/foreach}
</ul>
{/if}
</div>
{if $compiled_actions|count > 1}</div>{/if}
{/if}
{if isset(Module::getInstanceByName('reviewsreply')->active)}
{if Module::getInstanceByName('reviewsreply')->active == true && $identifier == 'id_product_comment'}
<div class="pull-right">
<a onclick="$(this).closest('tr').next('tr').show();" class="btn btn-small btn-default"><i class="icon-pencil"></i> {l s='Reply'}</a>
</div>
{/if}
{/if}
</td>
{/if}
</tr>
{if isset(Module::getInstanceByName('reviewsreply')->active)}
{if Module::getInstanceByName('reviewsreply')->active == true && $identifier == 'id_product_comment'}
<tr style="display:none;">
<td colspan="8" class="center" style="padding:8px">
{assign var='reply' value=rreply::getByIdProductCommentAll($tr.id_product_comment)}
<form method="post">
<input type="hidden" name="action" value="addreply"/>
<input type="hidden" name="id_product_comment" value="{$tr.id_product_comment}"/>
{if isset($reply.0)}
{if isset($reply.0->body)}
<input type="hidden" name="id_rreply" value="{$reply.0->id_rreply}"/>
{/if}
{/if}
<textarea name="body" style="height:100px; margin-bottom:20px;" class="col-lg-12">{if isset($reply.0)}{if isset($reply.0->body)}{$reply.0->body}{/if}{/if}</textarea>
<div class="col-lg-12">
<button class="btn btn-large btn-success">
<i class="icon-save"></i> {if isset($reply.0)}{l s='Save reply'}{else}{l s='Add reply'}{/if}
</button>
</div>
</form>
</td>
</tr>
{/if}
{/if}
{/foreach}
{else}
<tr>
<td class="list-empty" colspan="{count($fields_display)+1}">
<div class="list-empty-msg">
<i class="icon-warning-sign list-empty-icon"></i>
{l s='No records found'}
</div>
</td>
</tr>
{/if}
</tbody>

View File

@@ -0,0 +1,63 @@
{**
* 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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
{assign var='icon' value=$icon|default:'check_circle'}
{assign var='modal_message' value=$modal_message|default:''}
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
const alertModal = $('#{$modal_id}');
alertModal.on('hidden.bs.modal', function () {
alertModal.modal('hide');
});
});
</script>
<div id="{$modal_id}" class="modal fade product-comment-modal" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h2>
<i class="material-icons {$icon}">{$icon}</i>
{$modal_title}
</h2>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12 col-sm-12" id="{$modal_id}-message">
{$modal_message}
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12 post-comment-buttons">
<button type="button" class="btn btn-comment btn-comment-huge" data-dismiss="modal" aria-label="{l s='OK' d='Modules.Productcomments.Shop'}">
{l s='OK' d='Modules.Productcomments.Shop'}
</button>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,31 @@
{**
* 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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
{if $nb_comments != 0}
<div class="comments-note">
<span>{l s='Grade' d='Modules.Productcomments.Shop'}</span>
<div class="grade-stars" data-grade="{$grade}"></div>
</div>
{/if}

View File

@@ -0,0 +1,74 @@
{**
* 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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
{assign var='icon' value=$icon|default:'check_circle'}
{assign var='modal_message' value=$modal_message|default:''}
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
const confirmModal = $('#{$modal_id}');
confirmModal.on('hidden.bs.modal', function () {
confirmModal.modal('hide');
confirmModal.trigger('modal:confirm', false);
});
$('.confirm-button', confirmModal).click(function() {
confirmModal.trigger('modal:confirm', true);
});
$('.refuse-button', confirmModal).click(function() {
confirmModal.trigger('modal:confirm', false);
});
});
</script>
<div id="{$modal_id}" class="modal fade product-comment-modal" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h2>
<i class="material-icons {$icon}">{$icon}</i>
{$modal_title}
</h2>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12 col-sm-12" id="{$modal_id}-message">
{$modal_message}
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12 post-comment-buttons">
<button type="button" class="btn btn-comment-inverse btn-comment-huge refuse-button" data-dismiss="modal" aria-label="{l s='No' d='Modules.Productcomments.Shop'}">
{l s='No' d='Modules.Productcomments.Shop'}
</button>
<button type="button" class="btn btn-comment btn-comment-huge confirm-button" data-dismiss="modal" aria-label="{l s='Yes' d='Modules.Productcomments.Shop'}">
{l s='Yes' d='Modules.Productcomments.Shop'}
</button>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,35 @@
{**
* 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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
<div id="empty-product-comment" class="product-comment-list-item">
{if $post_allowed}
<button class="btn btn-comment btn-comment-big post-product-comment">
<i class="material-icons shopping-cart">edit</i>
{l s='Be the first to write your review' d='Modules.Productcomments.Shop'}
</button>
{else}
{l s='No customer reviews for the moment.' d='Modules.Productcomments.Shop'}
{/if}
</div>

View File

@@ -0,0 +1,34 @@
<?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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-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,154 @@
{**
* 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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
<script type="text/javascript">
var productCommentPostErrorMessage = '{l s='Sorry, your review cannot be posted.' d='Modules.Productcomments.Shop' js=1}';
</script>
<div id="post-product-comment-modal" class="modal fade product-comment-modal" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h2>{l s='Write your review' d='Modules.Productcomments.Shop'}</h2>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form id="post-product-comment-form" action="{$post_comment_url nofilter}" method="POST">
<div class="row">
<div class="col-md-2 col-sm-2">
{if isset($product) && $product}
{block name='product_flags'}
<ul class="product-flags">
{foreach from=$product.flags item=flag}
<li class="product-flag {$flag.type}">{$flag.label}</li>
{/foreach}
</ul>
{/block}
{block name='product_cover'}
<div class="product-cover">
{if $product.cover}
<img class="js-qv-product-cover" src="{$product.cover.bySize.medium_default.url}" alt="{$product.cover.legend}" title="{$product.cover.legend}" style="width:100%;" itemprop="image">
{else}
<img src="{$urls.no_picture_image.bySize.large_default.url nofilter}" style="width:100%;">
{/if}
</div>
{/block}
{/if}
</div>
<div class="col-md-4 col-sm-4">
<h3>{$product.name}</h3>
{block name='product_description_short'}
<div itemprop="description">{$product.description_short nofilter}</div>
{/block}
</div>
<div class="col-md-6 col-sm-6">
{if $criterions|@count > 0}
<ul id="criterions_list">
{foreach from=$criterions item='criterion'}
<li>
<div class="criterion-rating">
<label>{$criterion.name|escape:'html':'UTF-8'}:</label>
<div
class="grade-stars"
data-grade="3"
data-input="criterion[{$criterion.id_product_comment_criterion}]">
</div>
</div>
</li>
{/foreach}
</ul>
{/if}
</div>
</div>
<div class="row">
{if !$logged}
<div class="col-md-8 col-sm-8">
<label class="form-label" for="comment_title">{l s='Title' d='Modules.Productcomments.Shop'}<sup class="required">*</sup></label>
<input name="comment_title" type="text" value=""/>
</div>
<div class="col-md-4 col-sm-4">
<label class="form-label" for="customer_name">{l s='Your name' d='Modules.Productcomments.Shop'}<sup class="required">*</sup></label>
<input name="customer_name" type="text" value=""/>
</div>
{else}
<div class="col-md-12 col-sm-12">
<label class="form-label" for="comment_title">{l s='Title' d='Modules.Productcomments.Shop'}<sup class="required">*</sup></label>
<input name="comment_title" type="text" value=""/>
</div>
{/if}
</div>
<div class="row">
<div class="col-md-12 col-sm-12">
<label class="form-label" for="comment_content">{l s='Review' d='Modules.Productcomments.Shop'}<sup class="required">*</sup></label>
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12">
<textarea name="comment_content"></textarea>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<p class="required"><sup>*</sup> {l s='Required fields' d='Modules.Productcomments.Shop'}</p>
</div>
<div class="col-md-6 col-sm-6 post-comment-buttons">
<button type="button" class="btn btn-comment-inverse btn-comment-big" data-dismiss="modal" aria-label="{l s='Cancel' d='Modules.Productcomments.Shop'}">
{l s='Cancel' d='Modules.Productcomments.Shop'}
</button>
<button type="submit" class="btn btn-comment btn-comment-big">
{l s='Send' d='Modules.Productcomments.Shop'}
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{* Comment posted modal *}
{if $moderation_active}
{assign var='comment_posted_message' value={l s='Your comment has been submitted and will be available once approved by a moderator.' d='Modules.Productcomments.Shop'}}
{else}
{assign var='comment_posted_message' value={l s='Your comment has been added!' d='Modules.Productcomments.Shop'}}
{/if}
{include file='module:productcomments/views/templates/hook/alert-modal.tpl'
modal_id='product-comment-posted-modal'
modal_title={l s='Review sent' d='Modules.Productcomments.Shop'}
modal_message=$comment_posted_message
}
{* Comment post error modal *}
{include file='module:productcomments/views/templates/hook/alert-modal.tpl'
modal_id='product-comment-post-error'
modal_title={l s='Your review cannot be sent' d='Modules.Productcomments.Shop'}
icon='error'
}

View File

@@ -0,0 +1,39 @@
{**
* 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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
{if $nb_comments != 0}
<script type="text/javascript">
const $ = jQuery;
$('#product-quickview-{$product.id}').insertAfter($('.quickview #product-description-short'));
$('#product-quickview-{$product.id} .grade-stars').rating({ grade: {$average_grade} });
$('#product-quickview-{$product.id} .comments-nb').html('({$nb_comments})');
</script>
<div id="product-quickview-{$product.id}" class="product-quickview-review">
<div class="grade-stars"></div>
<div class="comments-nb"></div>
</div>
</div>
{/if}

View File

@@ -0,0 +1,41 @@
{**
* 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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
{if $nb_comments != 0 || $post_allowed}
<div class="product-comments-additional-info">
{include file='module:productcomments/views/templates/hook/average-grade-stars.tpl' grade=$average_grade}
<a class="nb-comments noeffect goreviews" href="#tabsection"><span itemprop="reviewCount">{$nb_comments}</span> {if isset($nb_comments) && $nb_comments == 1}{l s='Review'}{else}{l s='Reviews'}{/if}</a>
{* Rich snippet rating*}
<div itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating" itemscope>
<meta itemprop="reviewCount" content="{$nb_comments}" />
<meta itemprop="ratingValue" content="{$average_grade}" />
</div>
</div>
{/if}

View File

@@ -0,0 +1,56 @@
{**
* 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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
<div class="product-comment-list-item row" data-product-comment-id="@COMMENT_ID@" data-product-id="@PRODUCT_ID@">
<div class="col-md-2 col-sm-2 comment-infos">
<div class="grade-stars"></div>
<div class="comment-author">
{l s='%1$s' sprintf=['@CUSTOMER_NAME@'] d='Modules.Productcomments.Shop'}
</div>
<div class="comment-date">
@COMMENT_DATE@
</div>
</div>
<div class="col-md-10 col-sm-10 comment-content">
<h4>@COMMENT_TITLE@</h4>
<p>@COMMENT_COMMENT@</p>
<div class="comment-buttons btn-group">
{if $usefulness_enabled}
<a class="useful-review">
<i class="material-icons thumb_up">thumb_up</i>
<span class="useful-review-value">@COMMENT_USEFUL_ADVICES@</span>
</a>
<a class="not-useful-review">
<i class="material-icons thumb_down">thumb_down</i>
<span class="not-useful-review-value">@COMMENT_NOT_USEFUL_ADVICES@</span>
</a>
{/if}
<a class="report-abuse" title="{l s='Report abuse' d='Modules.Productcomments.Shop'}">
<i class="material-icons outlined_flag">flag</i>
</a>
</div>
</div>
</div>

View File

@@ -0,0 +1,96 @@
{**
* 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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
<script type="text/javascript">
var productCommentUpdatePostErrorMessage = '{l|escape:'javascript' s='Sorry, your review appreciation cannot be sent.' d='Modules.Productcomments.Shop'}';
var productCommentAbuseReportErrorMessage = '{l|escape:'javascript' s='Sorry, your abuse report cannot be sent.' d='Modules.Productcomments.Shop'}';
</script>
<div class="reviews-list-title">
<h3>{l s='Product Comments' d='Modules.Productcomments.Shop'}</h3>
</div>
{if $nb_comments != 0}
<div class="row">
<div class="col-md-12 col-sm-12" id="product-comments-list-header">
<div class="comments-nb">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-message-square"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
{l s='Comments' d='Modules.Productcomments.Shop'} ({$nb_comments})
</div>
{include file='module:productcomments/views/templates/hook/average-grade-stars.tpl' grade=$average_grade}
</div>
</div>
{/if}
{include file='module:productcomments/views/templates/hook/product-comment-item-prototype.tpl' assign="comment_prototype"}
{include file='module:productcomments/views/templates/hook/empty-product-comment.tpl'}
<div class="row">
<div class="col-md-12 col-sm-12"
id="product-comments-list"
data-list-comments-url="{$list_comments_url nofilter}"
data-update-comment-usefulness-url="{$update_comment_usefulness_url nofilter}"
data-report-comment-url="{$report_comment_url nofilter}"
data-comment-item-prototype="{$comment_prototype|escape:'html_attr'}">
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12" id="product-comments-list-footer">
<div id="product-comments-list-pagination"></div>
{if $post_allowed && $nb_comments != 0}
<button class="btn btn-comment btn-comment-big post-product-comment">
<i class="material-icons shopping-cart">edit</i>
{l s='Write your review' d='Modules.Productcomments.Shop'}
</button>
{/if}
</div>
</div>
{* Appreciation post error modal *}
{include file='module:productcomments/views/templates/hook/alert-modal.tpl'
modal_id='update-comment-usefulness-post-error'
modal_title={l s='Your review appreciation cannot be sent' d='Modules.Productcomments.Shop'}
icon='error'
}
{* Confirm report modal *}
{include file='module:productcomments/views/templates/hook/confirm-modal.tpl'
modal_id='report-comment-confirmation'
modal_title={l s='Report comment' d='Modules.Productcomments.Shop'}
modal_message={l s='Are you sure that you want to report this comment?' d='Modules.Productcomments.Shop'}
icon='feedback'
}
{* Report comment posted modal *}
{include file='module:productcomments/views/templates/hook/alert-modal.tpl'
modal_id='report-comment-posted'
modal_title={l s='Report sent' d='Modules.Productcomments.Shop'}
modal_message={l s='Your report has been submitted and will be considered by a moderator.' d='Modules.Productcomments.Shop'}
}
{* Report abuse error modal *}
{include file='module:productcomments/views/templates/hook/alert-modal.tpl'
modal_id='report-comment-post-error'
modal_title={l s='Your report cannot be sent' d='Modules.Productcomments.Shop'}
icon='error'
}

View File

@@ -0,0 +1,41 @@
{**
* 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 Academic Free License 3.0 (AFL-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/AFL-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/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*}
{* Javascript is used to display each product grade, this allows every rating to be udpated as soon as they change *}
{if $nb_comments != 0}
<div class="product-list-reviews" data-id="{$product.id}" data-url="{$product_comment_grade_url nofilter}">
<div class="grade-stars small-stars"></div>
<div class="comments-nb"></div>
</div>
{* Rich snippet rating is displayed via php/smarty meaning it will be cached (for example on homepage) *}
<div itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating" itemscope>
<meta itemprop="reviewCount" content="{$nb_comments}" />
<meta itemprop="ratingValue" content="{$average_grade}" />
</div>
{/if}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2016 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 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 http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
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;