Subida del módulo y tema de PrestaShop

This commit is contained in:
Kaloyan
2026-04-09 18:31:51 +02:00
parent 12c253296f
commit 16b3ff9424
39262 changed files with 7418797 additions and 0 deletions

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,677 @@
/**
* 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)
*/
/**
* Product comments CSS
*/
.product-comment-modal .material-icons[data-icon]:before,
.product-comment-list-item .material-icons[data-icon]:before,
.product-comments-additional-info .material-icons[data-icon]:before,
#product-comments-list-header .material-icons[data-icon]:before,
#product-comments-list-footer .material-icons[data-icon]:before {
content: attr(data-icon);
}
.btn-comment,
.btn-comment-inverse {
height: 36px;
border-radius: 2px;
background-color: #6b868f;
color: #ffffff;
font-size: 14px;
box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.2);
padding: 8px;
}
.btn-comment .material-icons,
.btn-comment-inverse .material-icons {
font-size: 20px;
margin-right: 7px;
}
.btn-comment:hover {
background-color: #3c4d52;
}
.btn-comment-inverse {
background-color: #ffffff;
color: #363a41;
border: 1px solid #979797;
}
.btn-comment-inverse:hover {
background-color: #6b868f;
border: 1px solid #6b868f;
color: #ffffff;
}
.btn-comment-big {
padding: 13px 16px;
height: 45px;
}
.btn-comment-huge {
padding: 13px 28px;
height: 45px;
}
.link-comment {
color: #232323;
}
.link-comment:hover,
.link-comment:active {
text-decoration: underline;
color: #232323;
}
/**
* Additional product infos
*/
.product-comments-additional-info {
margin: 20px 0;
font-weight: 300;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
font-size: 14px;
}
.product-comments-additional-info .link-comment.post-product-comment {
border-left: 1px solid #979797;
padding-left: 12px;
margin-left: 12px;
}
.product-comments-additional-info .comments-note {
margin-right: 30px;
margin-bottom: 20px;
}
/**
* Post comment modal
*/
.product-comment-modal .modal-header {
border: none;
padding: 30px 30px 15px;
}
.product-comment-modal .modal-body {
padding: 15px 30px 30px;
}
.product-comment-modal .modal-header .h2 {
float: left;
font-size: 20px;
}
.product-comment-modal .modal-dialog {
width: calc(100% - 30px);
max-width: 774px;
}
.product-comment-modal .modal-dialog .h3 {
font-size: 14px;
}
.product-comment-modal .modal-dialog .product-flag {
display: none;
}
.product-comment-modal .modal-dialog .product-cover,
.product-comment-modal .modal-dialog .product-cover img {
width: 99px;
height: 99px;
}
.product-comment-modal label.form-label {
font-size: 16px;
margin: 10px 0;
}
.product-comment-modal input {
width: 100%;
height: 44px;
border: 1px solid #bfbfbf;
padding: 0 10px;
}
.product-comment-modal textarea {
width: 100%;
min-height: 80px;
border: 1px solid #bfbfbf;
margin-bottom: 10px;
padding: 10px 10px;
}
.product-comment-modal .btn-comment,
.product-comment-modal .btn-comment-inverse {
font-size: 16px;
line-height: 16px;
font-weight: bold;
}
.product-comment-modal .required {
font-size: 12px;
margin-left: 5px;
}
.product-comment-modal .post-comment-buttons {
display: flex;
flex-direction: row;
justify-content: flex-end;
}
.product-comment-modal .post-comment-buttons .btn-comment {
margin-left: 15px;
}
#product-comment-posted-modal .post-comment-buttons,
#product-comment-post-error .post-comment-buttons,
#update-comment-usefulness-post-error .post-comment-buttons {
margin-top: 30px;
}
.product-comment-modal .modal-header .material-icons {
color: #40a85f;
font-size: 30px;
line-height: 25px;
}
.product-comment-modal .modal-header .material-icons.error {
color: #a94442;
}
.product-comment-modal .modal-header .material-icons.feedback {
color: #f39d72;
}
/**
* Star component
*/
.star-content {
margin: 0 0 0 5px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
}
.star-content div.star,
.star-content div.star-on,
.star-content div.star-hover {
display: block;
width: 20px;
height: 20px;
background: url(../img/stars.png) no-repeat 0 0 transparent;
flex: auto;
margin-left: 3px;
}
.star-content div.star-on,
.star-content div.star-hover {
background-position: -24px 0;
}
.small-stars .star-content div.star,
.small-stars .star-content div.star-on,
.small-stars .star-content div.star-hover {
background: url(../img/small_stars.png) no-repeat 0 0 transparent;
width: 16px;
height: 16px;
margin-left: 2px;
}
.small-stars .star-content div.star-on,
.small-stars .star-content div.star-hover {
background-position: -19px 0;
}
.star-content div.star-hover {
cursor: pointer;
}
.grade-stars {
position: relative;
height: 20px;
min-width: 120px;
display: inline-block;
}
.grade-stars.small-stars {
min-width: 100px;
}
.grade-stars .star-content {
position: absolute;
top: 3px;
left: 0;
}
.criterion-rating .grade-stars .star-content {
top: 0;
}
#post-product-comment-modal .star-content div.star a {
display: block;
position: absolute;
text-indent: -5000px;
}
#post-product-comment-modal .criterion-rating {
display: flex;
flex-direction: row;
justify-content: flex-end;
}
#post-product-comment-modal .criterion-rating label {
color: #363a41;
font-size: 14px;
font-weight: bold;
}
#ratingNotChosen {
font-size: smaller;
color: #ab4746;
text-align: right;
}
#post-product-comment-form input.error,
#post-product-comment-form textarea.error {
background-color: #f2dede;
border: solid 1px #ebcccc;
}
#post-product-comment-form input.valid,
#post-product-comment-form textarea.valid {
border: solid 1px #d0e9c6;
}
/**
* Product comments list
*/
#product-comments-list-header {
padding: 20px 15px;
color: #232323;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
}
#product-comments-list-header .comments-nb {
padding-left: 0;
padding-top: 3px;
}
#product-comments-list-header .comments-nb .material-icons {
margin-right: 3px;
}
#product-comments-list .btn-comment {
margin: 0 auto;
display: block;
}
.product-comment-list-item {
padding: 26px 0;
margin: 0 0 20px;
background-color: #ffffff;
text-align: left;
}
#empty-product-comment {
text-align: center;
}
.product-comment-list-item .grade-stars .star-content {
margin: 0 0 10px;
}
.product-comment-list-item .comment-infos {
height: 19px;
color: #6b868f;
font-size: 14px;
letter-spacing: -0.28px;
line-height: 19px;
min-height: 100px;
}
.product-comment-list-item .comment-infos .grade-stars {
margin-bottom: 20px;
}
.product-comment-list-item .comment-content .h4 {
height: 22px;
color: #363a41;
font-size: 16px;
font-weight: 600;
letter-spacing: -0.32px;
line-height: 22px;
}
.product-comment-list-item .comment-content p {
color: #363a42;
font-size: 14px;
letter-spacing: -0.28px;
line-height: 19px;
word-break: break-word;
white-space: pre-wrap;
}
.product-comment-list-item .comment-content .comment-buttons a {
color: #6b868f;
font-size: 14px;
letter-spacing: -0.28px;
line-height: 19px;
margin-right: 8px;
}
.product-comment-list-item .comment-content .comment-buttons a .material-icons {
font-size: 18px;
cursor: pointer;
}
/*
** Quickview style
*/
.product-quickview-review {
display: flex;
flex-direction: row;
}
.product-quickview-review .grade-stars .star-content {
margin: 0 0 0 0;
top: 0;
}
/*
** Product list override
*/
#products .thumbnail-container.has-reviews:hover .highlighted-informations,
#products .thumbnail-container.has-reviews:focus .highlighted-informations,
.featured-products
.thumbnail-container.has-reviews:hover
.highlighted-informations,
.featured-products
.thumbnail-container.has-reviews:focus
.highlighted-informations,
.product-accessories
.thumbnail-container.has-reviews:hover
.highlighted-informations,
.featured-products
.thumbnail-container.has-reviews:focus
.highlighted-informations,
.product-miniature
.thumbnail-container.has-reviews:hover
.highlighted-informations,
.product-miniature
.thumbnail-container.has-reviews:focus
.highlighted-informations {
height: 4.5rem;
}
#products
.thumbnail-container.has-reviews:hover
.highlighted-informations
.variant-links,
#products
.thumbnail-container.has-reviews:focus
.highlighted-informations
.variant-links,
.featured-products
.thumbnail-container.has-reviews:hover
.highlighted-informations
.variant-links,
.featured-products
.thumbnail-container.has-reviews:focus
.highlighted-informations
.variant-links,
.product-accessories
.thumbnail-container.has-reviews:hover
.highlighted-informations
.variant-links,
.featured-products
.thumbnail-container.has-reviews:focus
.highlighted-informations
.variant-links,
.product-miniature
.thumbnail-container.has-reviews:hover
.highlighted-informations
.variant-links,
.product-miniature
.thumbnail-container.has-reviews:focus
.highlighted-informations
.variant-links {
min-height: 3.7rem;
}
#products
.thumbnail-container.has-reviews:hover
.highlighted-informations.no-variants,
#products
.thumbnail-container.has-reviews:focus
.highlighted-informations.no-variants,
.featured-products
.thumbnail-container.has-reviews:hover
.highlighted-informations.no-variants,
.featured-products
.thumbnail-container.has-reviews:focus
.highlighted-informations.no-variants,
.product-accessories
.thumbnail-container.has-reviews:hover
.highlighted-informations.no-variants,
.featured-products
.thumbnail-container.has-reviews:focus
.highlighted-informations.no-variants,
.product-miniature
.thumbnail-container.has-reviews:hover
.highlighted-informations.no-variants,
.product-miniature
.thumbnail-container.has-reviews:focus
.highlighted-informations.no-variants {
height: 4.125rem;
}
#products
.product-miniature
.thumbnail-container.has-reviews
.discount-amount.online-only,
#products
.product-miniature
.thumbnail-container.has-reviews
.discount-percentage.online-only,
#products
.product-miniature
.thumbnail-container.has-reviews
.on-sale.online-only,
#products
.product-miniature
.thumbnail-container.has-reviews
.online-only.online-only,
#products .product-miniature .thumbnail-container.has-reviews .pack.online-only,
#products
.product-miniature
.thumbnail-container.has-reviews
.product-flags
.new.online-only,
.featured-products
.product-miniature
.thumbnail-container.has-reviews
.discount-amount.online-only,
.featured-products
.product-miniature
.thumbnail-container.has-reviews
.discount-percentage.online-only,
.featured-products
.product-miniature
.thumbnail-container.has-reviews
.on-sale.online-only,
.featured-products
.product-miniature
.thumbnail-container.has-reviews
.online-only.online-only,
.featured-products
.product-miniature
.thumbnail-container.has-reviews
.pack.online-only,
.featured-products
.product-miniature
.thumbnail-container.has-reviews
.product-flags
.new.online-only,
.product-accessories
.product-miniature
.thumbnail-container.has-reviews
.discount-amount.online-only,
.product-accessories
.product-miniature
.thumbnail-container.has-reviews
.discount-percentage.online-only,
.product-accessories
.product-miniature
.thumbnail-container.has-reviews
.on-sale.online-only,
.product-accessories
.product-miniature
.thumbnail-container.has-reviews
.online-only.online-only,
.product-accessories
.product-miniature
.thumbnail-container.has-reviews
.pack.online-only,
.product-accessories
.product-miniature
.thumbnail-container.has-reviews
.product-flags
.new.online-only {
top: 11.5rem;
}
.product-list-reviews {
position: absolute;
top: -26px;
left: 0;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
width: 100%;
background: rgba(255, 255, 255, 0.5);
padding: 4px 0;
visibility: hidden;
}
.product-list-reviews .grade-stars .star-content {
top: 1px;
}
.product-list-reviews .comments-nb {
margin-left: 5px;
font-size: 13px;
}
@media (min-width: 960px) {
#product-comments-list-footer {
position: relative;
min-height: 45px;
}
#product-comments-list-footer .post-product-comment {
margin: 0 auto;
display: block;
}
#product-comments-list-pagination {
position: absolute;
right: 0;
top: 5px;
}
}
@media (max-width: 960px) {
#product-comments-list-footer {
display: flex;
flex-direction: row-reverse;
flex-wrap: nowrap;
justify-content: space-between;
}
}
@media (max-width: 768px) {
#product-comments-list-footer {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
}
#product-comments-list-pagination {
margin-bottom: 10px;
}
}
#product-comments-list-pagination {
height: 32px;
}
#product-comments-list-pagination ul {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
}
#product-comments-list-pagination ul li span {
height: 32px;
width: 24px;
margin: 0 5px;
cursor: pointer;
display: block;
text-align: center;
font-size: 20px;
line-height: 32px;
color: #6b868f;
}
#product-comments-list-pagination ul li.active span,
#product-comments-list-pagination ul li span.next i,
#product-comments-list-pagination ul li span.prev i {
font-weight: bold;
}
#product-comments-list-pagination ul li.disabled span {
opacity: 0.3;
cursor: not-allowed;
}
#product-comments-list-pagination ul li.active span {
cursor: not-allowed;
}
#product-comments-list-pagination ul li.hidden {
display: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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,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,158 @@
/**
* 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)
*/
jQuery.fn.rating = function(generalOptions) {
const $ratings = $(this);
$ratings.each(function initRating() {
const $ratingComponent = $(this);
var options = generalOptions ? generalOptions : {};
if (!options.grade && $ratingComponent.data('grade')) {
options.grade = $ratingComponent.data('grade');
}
if (!options.min && $ratingComponent.data('min')) {
options.min = $ratingComponent.data('min');
}
if (!options.max && $ratingComponent.data('max')) {
options.max = $ratingComponent.data('max');
}
if (!options.input && $ratingComponent.data('input')) {
options.input = $ratingComponent.data('input');
}
var componentOptions = jQuery.extend({
grade: null,
input: null,
min: 1,
max: 5,
starWidth: 20
}, options);
const minValue = Math.min(componentOptions.min, componentOptions.max);
const maxValue = Math.max(componentOptions.min, componentOptions.max);
const ratingValue = Math.min(Math.max(minValue, componentOptions.grade), maxValue);
$ratingComponent.html('');
$ratingComponent.append('<div class="star-content star-empty clearfix"></div>');
$ratingComponent.append('<div class="star-content star-full clearfix"></div>');
const emptyStars = $('.star-empty', this);
const fullStars = $('.star-full', this);
const emptyStar = $('<div class="star"></div>');
const fullStar = $('<div class="star-on"></div>');
var ratingInput;
if (componentOptions.input) {
ratingInput = $('<input type="number" name="'+componentOptions.input+'" id="'+componentOptions.input+'" />');
ratingInput.val(ratingValue);
ratingInput.css('display', 'none');
ratingInput.on('change', displayInteractiveGrade);
$ratingComponent.append(ratingInput);
initInteractiveGrade();
} else {
displayGrade(ratingValue);
}
function initInteractiveGrade() {
emptyStars.html('');
fullStars.html('');
var newStar;
for (var i = minValue; i <= maxValue; ++i) {
newStar = emptyStar.clone();
newStar.data('grade', i);
newStar.on('mouseenter mouseleave', function overStar() {
var overIndex = $('.star', fullStars).index($(this));
$('.star', fullStars).each(function overStars() {
$(this).removeClass('star-on');
var starIndex = $('.star', fullStars).index($(this));
if (starIndex <= overIndex) {
$(this).addClass('star-hover');
} else {
$(this).removeClass('star-hover');
}
});
});
newStar.on('click', function selectGrade() {
var selectedGrade = $(this).data('grade');
ratingInput.val(selectedGrade);
ratingChosen = true;
});
fullStars.append(newStar);
}
fullStars.on('mouseenter', function(){}).on('mouseleave', displayInteractiveGrade);
displayInteractiveGrade();
}
function displayInteractiveGrade() {
$('.star', fullStars).each(function displayStar() {
var starValue = $(this).data('grade');
$(this).removeClass('star-hover');
if (starValue <= ratingInput.val()) {
$(this).addClass('star-on');
} else {
$(this).removeClass('star-on');
}
});
}
function displayGrade(grade) {
emptyStars.html('');
fullStars.html('');
var newStar;
for (var i = minValue; i <= maxValue; ++i) {
if (i <= Math.floor(grade)) {
newStar = emptyStar.clone();
newStar.css('visibility', 'hidden');
emptyStars.append(newStar);
fullStars.append(fullStar.clone());
} else if (i > Math.ceil(grade)) {
newStar = emptyStar.clone();
emptyStars.append(newStar.clone());
} else {
//This the partial star composed of
// - one invisible partial empty star
// - one visible partial empty star (remaining part)
// - one visible partial full star
var fullWidth = (grade - i + 1) * componentOptions.starWidth;
var emptyWidth = componentOptions.starWidth - fullWidth;
newStar = emptyStar.clone();
newStar.css('visibility', 'hidden');
newStar.css('width', fullWidth);
emptyStars.append(newStar);
newStar = emptyStar.clone();
newStar.css('width', emptyWidth);
newStar.css('background-position', '0px -'+fullWidth+'px');
newStar.css('background-position', '-'+fullWidth+'px 0px');
newStar.css('marginLeft', 0);
emptyStars.append(newStar);
fullStar.css('width', fullWidth);
fullStars.append(fullStar.clone());
}
}
}
});
}

View File

@@ -0,0 +1,254 @@
/**
* 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)
*/
jQuery(document).ready(function () {
const $ = jQuery;
const commentsList = $('#product-comments-list');
const emptyProductComment = $('#empty-product-comment');
const commentsListUrl = commentsList.data('list-comments-url');
const updateCommentUsefulnessUrl = commentsList.data('update-comment-usefulness-url');
const reportCommentUrl = commentsList.data('report-comment-url');
const commentPrototype = commentsList.data('comment-item-prototype');
const pagesListId = '#product-comments-list-pagination';
const pageIdPrefix = '#pcl_page_';
const totalPages = commentsList.data('total-pages');
const prevCount = 0;
const nextCount = totalPages + 1;
const gapText = '&hellip;';
$('#product-comments-list .grade-stars').rating();
$('.product-comments-additional-info .grade-stars').rating();
prestashop.on('updatedProduct', function() {
$('.product-comments-additional-info .grade-stars').rating();
})
document.addEventListener('updateRating', function() {
$('#product-comments-list .grade-stars').rating();
$('.product-comments-additional-info .grade-stars').rating();
});
const updateCommentPostErrorModal = $('#update-comment-usefulness-post-error');
const confirmAbuseModal = $('#report-comment-confirmation');
const reportCommentPostErrorModal = $('#report-comment-post-error');
const reportCommentPostedModal = $('#report-comment-posted');
function showUpdatePostCommentErrorModal(errorMessage) {
$('#update-comment-usefulness-post-error-message').html(errorMessage);
updateCommentPostErrorModal.modal('show');
}
function showReportCommentErrorModal(errorMessage) {
$('#report-comment-post-error-message').html(errorMessage);
reportCommentPostErrorModal.modal('show');
}
async function fetchComments(page) {
let response = await fetch(commentsListUrl + "&page=" + page);
if (response.status === 200) {
let data = await response.text();
populateComments((JSON.parse(data)).comments);
}
}
$(pagesListId + ' li').on('click',
function() {
let oldCount = commentsList.data('current-page');
let newCount = $(this).index();
if (newCount === prevCount) { // click prev
newCount = oldCount - 1;
if (newCount <= 0) return;
}
if (newCount === nextCount) { // click next
newCount = oldCount + 1;
if (newCount >= nextCount) return;
}
$(`${pageIdPrefix}${oldCount} span`).removeClass('current');
$(`${pageIdPrefix}${oldCount}`).removeClass('active');
fetchComments(newCount); // fetch new page's comments
$(`${pageIdPrefix}${newCount}`).addClass('active');
$(`${pageIdPrefix}${newCount} span`).addClass('current');
$(`${pageIdPrefix}${newCount} span`).html(newCount);
commentsList.data('current-page', newCount);
if (newCount === 1) // disable prev
$(`${pageIdPrefix}${prevCount}`).addClass('disabled');
else
$(`${pageIdPrefix}${prevCount}`).removeClass('disabled');
if (newCount === totalPages) // disable next
$(`${pageIdPrefix}${nextCount}`).addClass('disabled');
else
$(`${pageIdPrefix}${nextCount}`).removeClass('disabled');
// long list with over 9 pages
if (9 <= totalPages) {
generateGap(newCount, prevCount);
generateGap(newCount, nextCount);
}
}
)
function generateGap(start, stop) {
if (start == stop)
return 0;
let step = (start < stop) ? +1 : -1;
let i = start + step;
if (4 < Math.abs(stop - start)) {
$(`${pageIdPrefix}${i}`).removeClass('hidden').removeClass('disabled');
$(`${pageIdPrefix}${i} span`).html(i);
i = i + step;
$(`${pageIdPrefix}${i}`).removeClass('hidden').removeClass('disabled');
$(`${pageIdPrefix}${i} span`).html(gapText);
i = i + step;
for (; i != stop - 2*step; i = i + step) {
$(`${pageIdPrefix}${i}`).addClass('hidden');
}
}
else {
for (; i != stop; i = i + step) {
$(`${pageIdPrefix}${i}`).removeClass('hidden').removeClass('disabled');
$(`${pageIdPrefix}${i} span`).html(i);
}
}
}
function populateComments(comments) {
commentsList.html('');
comments.forEach(addComment);
}
function addComment(comment) {
var commentTemplate = commentPrototype;
var customerName = comment.customer_name;
if (!customerName) {
customerName = comment.firstname+' '+comment.lastname;
}
commentTemplate = commentTemplate.replace(/@COMMENT_ID@/, comment.id_product_comment);
commentTemplate = commentTemplate.replace(/@PRODUCT_ID@/, comment.id_product);
commentTemplate = commentTemplate.replace(/@CUSTOMER_NAME@/, customerName);
commentTemplate = commentTemplate.replace(/@COMMENT_DATE@/, comment.date_add);
commentTemplate = commentTemplate.replace(/@COMMENT_TITLE@/, comment.title);
commentTemplate = commentTemplate.replace(/@COMMENT_COMMENT@/, comment.content);
commentTemplate = commentTemplate.replace(/@COMMENT_USEFUL_ADVICES@/, comment.usefulness);
commentTemplate = commentTemplate.replace(/@COMMENT_GRADE@/, comment.grade);
commentTemplate = commentTemplate.replace(/@COMMENT_NOT_USEFUL_ADVICES@/, (comment.total_usefulness - comment.usefulness));
commentTemplate = commentTemplate.replace(/@COMMENT_TOTAL_ADVICES@/, comment.total_usefulness);
const $comment = $(commentTemplate);
$('.grade-stars', $comment).rating({
grade: comment.grade
});
$('.useful-review', $comment).click(function() {
updateCommentUsefulness($comment, comment.id_product_comment, 1);
});
$('.not-useful-review', $comment).click(function() {
updateCommentUsefulness($comment, comment.id_product_comment, 0);
});
$('.report-abuse', $comment).click(function() {
confirmCommentAbuse(comment.id_product_comment);
});
commentsList.append($comment);
}
async function updateCommentUsefulness($comment, commentId, usefulness) {
try {
const response = await fetch(updateCommentUsefulnessUrl, {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: "id_product_comment=" + commentId + "&usefulness=" + usefulness,
});
if (response.status === 200) {
const jsonData = await response.json();
if (jsonData.success) {
$('.useful-review-value', $comment).html(jsonData.usefulness);
$('.not-useful-review-value', $comment).html(jsonData.total_usefulness - jsonData.usefulness);
} else {
const decodedErrorMessage = $("<div/>").html(jsonData.error).text();
showUpdatePostCommentErrorModal(decodedErrorMessage);
}
} else {
showUpdatePostCommentErrorModal(productCommentUpdatePostErrorMessage);
}
} catch (error) {
showUpdatePostCommentErrorModal(error);
}
}
function confirmCommentAbuse(commentId) {
confirmAbuseModal.modal('show');
confirmAbuseModal.one('modal:confirm', function(event, confirm) {
if (!confirm) {
return;
}
confirmCommentAbuseFetch(commentId);
})
}
async function confirmCommentAbuseFetch(commentId) {
try {
const response = await fetch(reportCommentUrl, {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: "id_product_comment=" + commentId,
});
if (response.status === 200) {
const jsonData = await response.json();
if (jsonData.success) {
reportCommentPostedModal.modal('show');
} else {
showReportCommentErrorModal(jsonData.error);
}
} else {
showReportCommentErrorModal(productCommentAbuseReportErrorMessage);
}
} catch (error) {
showReportCommentErrorModal(error);
}
}
if (totalPages <= 1)
$(pagesListId).hide();
if (totalPages > 0) {
emptyProductComment.hide();
$(`${pageIdPrefix}1`).trigger('click');
}
});

View File

@@ -0,0 +1,144 @@
/**
* 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)
*/
jQuery(document).ready(function () {
const $ = jQuery;
$('body').on('click', '.post-product-comment', function (event) {
event.preventDefault();
showPostCommentModal();
});
const postCommentModal = $('#post-product-comment-modal');
postCommentModal.on('hidden.bs.modal', function () {
postCommentModal.modal('hide');
clearPostCommentForm();
});
const commentPostedModal = $('#product-comment-posted-modal');
const commentPostErrorModal = $('#product-comment-post-error');
const criterionsList = $('#criterions_list');
criterionsList.append('<div id="ratingNotChosen">* ' + productCommentMandatoryMessage + '</div>');
const criterionsInfo = $('#ratingNotChosen');
function showPostCommentModal() {
commentPostedModal.modal('hide');
commentPostErrorModal.modal('hide');
postCommentModal.modal('show');
ratingChosen = false;
criterionsInfo.hide();
}
function showCommentPostedModal() {
postCommentModal.modal('hide');
commentPostErrorModal.modal('hide');
clearPostCommentForm();
commentPostedModal.modal('show');
}
function showPostErrorModal(errorMessage) {
postCommentModal.modal('hide');
commentPostedModal.modal('hide');
clearPostCommentForm();
$('#product-comment-post-error-message').html(errorMessage);
commentPostErrorModal.modal('show');
}
function clearPostCommentForm() {
$('#post-product-comment-form input[type="text"]').val('');
$('#post-product-comment-form input[type="text"]').removeClass('valid error');
$('#post-product-comment-form textarea').val('');
$('#post-product-comment-form textarea').removeClass('valid error');
$('#post-product-comment-form .criterion-rating input').val(3).trigger('change');
}
function initCommentModal() {
$('#post-product-comment-modal .grade-stars').rating();
$('body').on('click', '.post-product-comment', function (event) {
event.preventDefault();
showPostCommentModal();
});
$('#post-product-comment-form').on('submit', submitCommentForm);
}
function submitCommentForm(event) {
event.preventDefault();
var formData = $(this).serializeArray();
if (!validateFormData(formData)) {
return;
}
$.post($(this).attr('action'), $(this).serialize(), function(jsonData) {
if (jsonData) {
if (jsonData.success) {
clearPostCommentForm();
showCommentPostedModal();
} else {
if (jsonData.errors) {
var errorList = '<ul>';
for (var i = 0; i < jsonData.errors.length; ++i) {
errorList += '<li>' + jsonData.errors[i] + '</li>';
}
errorList += '</ul>';
showPostErrorModal(errorList);
} else {
const decodedErrorMessage = $("<div/>").html(jsonData.error).text();
showPostErrorModal(decodedErrorMessage);
}
}
} else {
showPostErrorModal(productCommentPostErrorMessage);
}
}).fail(function() {
showPostErrorModal(productCommentPostErrorMessage);
});
}
function validateFormData(formData) {
var isValid = true;
formData.forEach(function(formField) {
const fieldSelector = '#post-product-comment-form [name="'+formField.name+'"]';
if (!formField.value) {
$(fieldSelector).addClass('error');
$(fieldSelector).removeClass('valid');
isValid = false;
} else {
$(fieldSelector).removeClass('error');
$(fieldSelector).addClass('valid');
}
if (!ratingChosen) {
criterionsInfo.show();
isValid = false;
} else {
criterionsInfo.hide();
}
});
return isValid;
}
initCommentModal();
});

View File

@@ -0,0 +1,205 @@
/**
* 2007-2019 PrestaShop SA and Contributors
*
* 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-2019 PrestaShop SA and Contributors
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
$(document).ready(function() {
productListingComments.init();
productListingComments.load();
});
var productListingComments = (function () {
var data = {
productIDs: [],
commentsLoadingInProgress: false,
ajaxIDsLimit: 50,
ajaxUrl: ''
}
var DOMStrings = {
productListReviewsContainer: '.product-list-reviews',
productListReviewsNumberOfComments: '.comments-nb',
productListReviewsStarsContainer: '.grade-stars',
productContainer: '.js-product-miniature'
};
var DOMClasses = {
inProgress: 'reviews-loading',
reviewsLoaded: 'reviews-loaded',
hasReviews: 'has-reviews'
};
function setEvents() {
prestashop.on('updateProductList', function() {
addProductsIDs();
});
prestashop.on("updatedProduct", function () {
updateRatings();
});
}
function setAjaxUrl() {
if (data.ajaxUrl !== '')
return;
var url = $(DOMStrings.productListReviewsContainer).first().data('url');
data.ajaxUrl = url;
}
function getNewProductsReviewsElements() {
var $productListReviews = $(DOMStrings.productContainer)
.not('.' + DOMClasses.reviewsLoaded + ', .' + DOMClasses.inProgress)
.addClass(DOMClasses.inProgress)
.find(DOMStrings.productListReviewsContainer);
return $productListReviews;
}
function addProductsIDs() {
var $productsList = getNewProductsReviewsElements(),
seenIds = {};
$productsList.each(function () {
var id = $(this).data('id');
seenIds[id] = true;
});
var IDsArray = Object.keys(seenIds).filter(e => e !== 'undefined');
var prevDataIDs = data.productIDs.splice(0);
data.productIDs = prevDataIDs.concat(IDsArray);
if (!data.commentsLoadingInProgress) {
loadProductsData();
}
}
function loadProductsData() {
if (data.productIDs.length === 0)
return;
data.commentsLoadingInProgress = true;
var dataIDsCopy = data.productIDs.slice(0);
selectedProductIDs = dataIDsCopy.splice(0, data.ajaxIDsLimit);
$.get(data.ajaxUrl, { id_products: selectedProductIDs }, function (jsonData) {
if (jsonData) {
$.each(jsonData.products, function(i, elem) {
var productData = elem;
var $productsReviewsContainer = $('.product-list-reviews[data-id="' + productData.id_product + '"]');
$productsReviewsContainer.each(function () {
var $self = $(this);
if (productData.comments_nb > 0) {
$self.find(DOMStrings.productListReviewsStarsContainer).rating({ grade: productData.average_grade, starWidth: 16 });
$self.find(DOMStrings.productListReviewsNumberOfComments).text('(' + productData.comments_nb + ')');
$self.closest(DOMStrings.productContainer).addClass(DOMClasses.hasReviews);
$self.css('visibility', 'visible');
}
$self.closest(DOMStrings.productContainer).addClass(DOMClasses.reviewsLoaded);
$self.closest(DOMStrings.productContainer).removeClass(DOMClasses.inProgress);
});
data.productIDs.shift();
});
data.commentsLoadingInProgress = false;
if (data.productIDs.length > 0) {
loadProductsData();
}
}
});
}
function updateRatings() {
// Collect all product IDs that need to be updated
var productIDs = [];
var $productsList = $(DOMStrings.productContainer);
$productsList.each(function () {
var productID = $(this).find(DOMStrings.productListReviewsContainer).data("id");
if (productID) {
productIDs.push(productID);
}
});
if (productIDs.length > 0) {
$.get(
data.ajaxUrl,
{ id_products: productIDs },
function (jsonData) {
if (jsonData && jsonData.products.length > 0) {
// Create a map of product data
var productDataMap = {};
jsonData.products.forEach(function (product) {
productDataMap[product.id_product] = product;
});
// Update each product's ratings
$productsList.each(function () {
var $self = $(this);
var productID = $self.find(DOMStrings.productListReviewsContainer).data("id");
if (productDataMap[productID]) {
var productData = productDataMap[productID];
var $productReviewContainer = $self.find(DOMStrings.productListReviewsContainer);
if (productData.comments_nb > 0) {
$productReviewContainer
.find(DOMStrings.productListReviewsStarsContainer)
.rating({ grade: productData.average_grade, starWidth: 16 });
$productReviewContainer
.find(DOMStrings.productListReviewsNumberOfComments)
.text("(" + productData.comments_nb + ")");
$self.addClass(DOMClasses.hasReviews);
$productReviewContainer.css("visibility", "visible");
}
}
});
}
}
);
}
}
return {
load: function () {
addProductsIDs();
},
init: function () {
setAjaxUrl();
setEvents();
}
}
})();

View File

@@ -0,0 +1,70 @@
{**
* 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)
*}
{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' d='Modules.Productcomments.Admin'}</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,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,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,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,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,28 @@
{**
* 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)
*}
<a href="{$href}" class="btn btn-success" title="{$action}" >
<i class="icon-check"></i> {$action}
</a>

View File

@@ -0,0 +1,28 @@
{**
* 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)
*}
<a href="{$href}" class="" title="{$action}" >
<i class="icon-check"></i> {$action}
</a>

View File

@@ -0,0 +1,59 @@
{**
* 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)
*}
{$icon = $icon|default:'check_circle'}
{$modal_message = $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">
<p class="h2">
<i class="material-icons {$icon}" data-icon="{$icon}"></i>
{$modal_title}
</p>
</div>
<div class="modal-body">
<div id="{$modal_id}-message">
{$modal_message}
</div>
<div class="post-comment-buttons">
<button type="button" class="btn btn-comment btn-comment-huge" data-dismiss="modal">
{l s='OK' d='Modules.Productcomments.Shop'}
</button>
</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,70 @@
{**
* 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)
*}
{$icon = $icon|default:'check_circle'}
{$modal_message = $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">
<p class="h2">
<i class="material-icons {$icon}" data-icon="{$icon}"></i>
{$modal_title}
</p>
</div>
<div class="modal-body">
<div id="{$modal_id}-message">
{$modal_message}
</div>
<div class="post-comment-buttons">
<button type="button" class="btn btn-comment-inverse btn-comment-huge refuse-button" data-dismiss="modal">
{l s='No' d='Modules.Productcomments.Shop'}
</button>
<button type="button" class="btn btn-comment btn-comment-huge confirm-button" data-dismiss="modal">
{l s='Yes' d='Modules.Productcomments.Shop'}
</button>
</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 edit" data-icon="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,148 @@
{**
* 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}';
var productCommentMandatoryMessage = '{l s='Please choose a rating for your review.' d='Modules.Productcomments.Shop' js=1}';
var ratingChosen = false;
</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">
<p class="h2">{l s='Write your review' d='Modules.Productcomments.Shop'}</p>
<button type="button" class="close" data-dismiss="modal" aria-label="{l s='Close' d='Shop.Theme.Global'}">
<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-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-sm-4">
<p class="h3">{$product.name}</p>
{block name='product_description_short'}
<div itemprop="description">{$product.description_short nofilter}</div>
{/block}
</div>
<div class="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>
{if !$logged}
<div class="row">
<div class="col-sm-8">
<label class="form-label" for="comment_title">{l s='Title' d='Modules.Productcomments.Shop'}<sup class="required">*</sup></label>
<input id="comment_title" name="comment_title" type="text" value=""/>
</div>
<div class="col-sm-4">
<label class="form-label" for="customer_name">{l s='Your name' d='Modules.Productcomments.Shop'}<sup class="required">*</sup></label>
<input id="customer_name" name="customer_name" type="text" value=""/>
</div>
</div>
{else}
<label class="form-label" for="comment_title">{l s='Title' d='Modules.Productcomments.Shop'}<sup class="required">*</sup></label>
<input id="comment_title" name="comment_title" type="text" value=""/>
{/if}
<label class="form-label" for="comment_content">{l s='Review' d='Modules.Productcomments.Shop'}<sup class="required">*</sup></label>
<textarea id="comment_content" name="comment_content"></textarea>
{hook h='displayGDPRConsent' mod='psgdpr' id_module=$id_module}
<div class="row">
<div class="col-sm-6">
<p class="required"><sup>*</sup> {l s='Required fields' d='Modules.Productcomments.Shop'}</p>
</div>
<div class="col-sm-6 post-comment-buttons">
<button type="button" class="btn btn-comment-inverse btn-comment-big" data-dismiss="modal">
{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}
{$comment_posted_message = {l s='Your comment has been submitted and will be available once approved by a moderator.' d='Modules.Productcomments.Shop'}}
{else}
{$comment_posted_message = {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,45 @@
{**
* 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">
function renderQuickViewNote() {
$('#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})');
}
renderQuickViewNote();
prestashop.on('updatedProduct', function(){
renderQuickViewNote();
});
</script>
<div id="product-quickview-{$product.id}" class="product-quickview-review">
<div class="grade-stars"></div>
<div class="comments-nb"></div>
</div>
{/if}

View File

@@ -0,0 +1,51 @@
{**
* 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">
{if $nb_comments == 0}
{if $post_allowed}
<button class="btn btn-comment post-product-comment">
<i class="material-icons edit" data-icon="edit"></i>
{l s='Write your review' d='Modules.Productcomments.Shop'}
</button>
{/if}
{else}
{include file='module:productcomments/views/templates/hook/average-grade-stars.tpl' grade=$average_grade}
<div class="additional-links">
<a class="link-comment" href="#product-comments-list-header">
<i class="material-icons chat" data-icon="chat"></i>
{l s='Read user reviews' d='Modules.Productcomments.Shop'} ({$nb_comments})
</a>
{if $post_allowed}
<a class="link-comment post-product-comment" href="#product-comments-list-header">
<i class="material-icons edit" data-icon="edit"></i>
{l s='Write your review' d='Modules.Productcomments.Shop'}
</a>
{/if}
</div>
{/if}
</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-sm-3 comment-infos">
<div class="grade-stars" data-grade="@COMMENT_GRADE@"></div>
<div class="comment-date">
@COMMENT_DATE@
</div>
<div class="comment-author">
{l s='By %1$s' sprintf=['@CUSTOMER_NAME@'] d='Modules.Productcomments.Shop'}
</div>
</div>
<div class="col-sm-9 comment-content">
<p class="h4">@COMMENT_TITLE@</p>
<p>@COMMENT_COMMENT@</p>
<div class="comment-buttons btn-group">
{if $usefulness_enabled}
<a class="useful-review">
<i class="material-icons thumb_up" data-icon="thumb_up"></i>
<span class="useful-review-value">@COMMENT_USEFUL_ADVICES@</span>
</a>
<a class="not-useful-review">
<i class="material-icons thumb_down" data-icon="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 flag" data-icon="flag"></i>
</a>
</div>
</div>
</div>

View File

@@ -0,0 +1,99 @@
{**
* 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 id="product-comments-list-header">
<div class="comments-nb">
<i class="material-icons chat" data-icon="chat"></i>
{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>
{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 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'}"
data-current-page="1"
data-total-pages="{$list_total_pages}">
</div>
<div id="product-comments-list-footer">
<div id="product-comments-list-pagination">
{if $list_total_pages > 0}
<ul>
{assign var = "prevCount" value = 0}
<li id="pcl_page_{$prevCount}"><span class="prev"><i class="material-icons">chevron_left</i></span></li>
{for $pageCount = 1 to $list_total_pages}
<li id="pcl_page_{$pageCount}"><span>{$pageCount}</span></li>
{/for}
{assign var = "nextCount" value = $list_total_pages + 1}
<li id="pcl_page_{$nextCount}"><span class="next"><i class="material-icons">chevron_right</i></span></li>
</ul>
{/if}
</div>
{if $post_allowed && $nb_comments != 0}
<button class="btn btn-comment btn-comment-big post-product-comment">
<i class="material-icons edit" data-icon="edit"></i>
{l s='Write your review' d='Modules.Productcomments.Shop'}
</button>
{/if}
</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,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)
*}
{* Javascript is used to display each product grade, this allows every rating to be udpated as soon as they change *}
<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>

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;