first commit

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

View File

@@ -0,0 +1,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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,451 @@
/** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
.codwfeeplus_testoutput{
display: block;
font-size: 1em;
color: #000;
white-space: normal;
}
.codwfeeplus_testoutput p, .codwfeeplus_testoutput ul{
margin: 0;
}
.codwfeeplus_parameters, .codwfeeplus_fee_calc, .codwfeeplus_cond_passed, .codwfeeplus_cond_failed, .codwfeeplus_cond_warning{
margin: 1em 0;
}
.codwfeeplus_parameters, .codwfeeplus_fee_calc{
display: block;
background-color: #e5e5ff;
padding: 0 0 0 4em;
min-height: 3.8em;
}
.codwfeeplus_parameters ul,.codwfeeplus_parameters ul ul, .codwfeeplus_fee_calc ul{
list-style: none;
}
.codwfeeplus_parameters ul li:before, .codwfeeplus_fee_calc ul li:before{
content: "";
margin: 0 0.7em 0 -1.4em;
font-family: FontAwesome;
font-weight:900;
}
.codwfeeplus_parameters ul ul li:before, .codwfeeplus_fee_calc ul ul li:before{
content: "";
margin: 0 0.7em 0 -1.4em;
font-family: FontAwesome;
}
.codwfeeplus_parameters:before, .codwfeeplus_fee_calc:before{
content: "";
margin: -0.15em 0 0 -1em;
font-family: FontAwesome;
font-size: 3.5em;
float: left;
color: #b8b8e8;
}
.codwfeeplus_output_alert{
color: red;
}
.codwfeeplus_cond_passed p, .codwfeeplus_cond_failed p, .codwfeeplus_cond_warning p{
font-style: italic;
}
.codwfeeplus_cond_passed{
display: block;
background-color: #e5ffe5;
padding: 0 0 0 4em;
min-height: 3.8em;
}
.codwfeeplus_cond_passed:before{
content: "";
margin: -0.15em 0 0 -1em;
font-family: FontAwesome;
font-size: 3.5em;
float: left;
color: #b8e8b8;
}
.codwfeeplus_cond_failed{
display: block;
background-color: #ffe5e5;
padding: 0 0 0 4em;
min-height: 3.8em;
}
.codwfeeplus_cond_failed:before{
content: "";
margin: -0.15em 0 0 -1em;
font-family: FontAwesome;
font-size: 3.5em;
float: left;
color: #e8b8b8;
}
.codwfeeplus_cond_warning{
display: block;
background-color: #ffffe5;
padding: 0 0 0 4em;
min-height: 3.5em;
}
.codwfeeplus_cond_warning:before{
content: "";
margin: -0.15em 0 0 -1em;
font-family: FontAwesome;
font-size: 3.5em;
float: left;
color: #e8e8b8;
}
.codwfeeplus_result{
display: block;
}
@media(max-width: 991px){
.codwfeeplus_result .codwfeeplus_cond_passed:before,
.codwfeeplus_result .codwfeeplus_cond_failed:before,
.codwfeeplus_result .codwfeeplus_cond_warning:before,
.codwfeeplus_result .codwfeeplus_parameters:before,
.codwfeeplus_result .codwfeeplus_fee_calc:before {
margin: 0.35em 0 0 -1em;
}
.codwfeeplus_cond_passed:before,
.codwfeeplus_cond_failed:before,
.codwfeeplus_cond_warning:before,
.codwfeeplus_parameters:before,
.codwfeeplus_fee_calc:before {
margin: -0.15em 0 0 -1em;
}
.codwfeeplus_result{
margin-left: -53%;
}
}
.codwfeeplus_cond_passed .codwfeeplus_cond_check_steps{
background-color: #d4ffd4;
}
.codwfeeplus_cond_failed .codwfeeplus_cond_check_steps{
background-color: #ffd4d4;
}
.codwfeeplus_cond_warning .codwfeeplus_cond_check_steps{
background-color: #ffffd4;
}
.codwfeeplus_cond_success {
list-style: none;
color: #00a000;
}
li.codwfeeplus_cond_success:before{
content: "";
margin: 0 0.7em 0 -1.4em;
font-family: FontAwesome;
}
.codwfeeplus_cond_error{
list-style: none;
color: #a00000;
}
li.codwfeeplus_cond_error:before{
content: "";
margin: 0 0.7em 0 -1.4em;
font-family: FontAwesome;
}
li.codwfeeplus_cond_neutral{
list-style: none;
color: #7d7d00;
}
li.codwfeeplus_cond_neutral:before{
content: "";
margin: 0 0.7em 0 -1.4em;
font-family: FontAwesome;
}
.codwfeeplus_fee_calc_steps {
background-color: #d4ffd4;
}
.codwfeeplus_fee_calc_steps ul{
list-style: none;
}
.codwfeeplus_fee_calc_steps ul li:before{
content: "";
margin: 0 0.7em 0 -1.4em;
font-family: FontAwesome;
font-weight:900;
}
.codwfeeplus_bold_price {
font-weight: bold;
color: #5a5a5a;
}
.codwfeeplus_bold_txt {
font-weight: bold;
color: #5a5a5a;
}
.codwfeeplus_cond_success .codwfeeplus_bold_txt {
font-weight: bold;
color: #00a000;
}
.codwfeeplus_cond_success .codwfeeplus_bold_price {
font-weight: bold;
color: #00a000;
}
.codwfeeplus_cond_error .codwfeeplus_bold_txt {
font-weight: bold;
color: #a00000;
}
.codwfeeplus_cond_error .codwfeeplus_bold_price {
font-weight: bold;
color: #a00000;
}
.codwfeeplus_help_title{
font-weight: bold;
font-size: 1.2em;
margin-top: 2em;
border-top: 1px solid #a9b8bd;
padding-top: 1.5em;
}
.codwfeeplus_help_body{
font-weight: normal;
font-size: 1em;
}
.codwfeeplus_productstatus{
display: inline-block;
border: solid 1px #c7d6db;
padding: 5px;
}
.codwfeeplus_productstatus p{
margin: 0;
padding: 0;
}
.codwfeeplus_productstatus_false {
background-color: #ffebeb;
padding: 5px;
}
.codwfeeplus_productstatus_true {
background-color: #ebffeb;
padding: 5px;
}
hr.codwfeeplus_form_hr{
border-top: 1px solid #c7d6db;
margin: 0;
}
.codwfeeplus_update_title_success{
color: #007b00;
}
.codwfeeplus_update_title_current{
color: #3b3bfb;
}
.codwfeeplus_update_title_error{
color: #c70000;
}
.codwfeeplus_update{
}
.codwfeeplus_update_out_current{
color: #3b3bfb;
margin: 0 0 1em 0;
}
.codwfeeplus_update_out_success{
color: #007b00;
margin: 0 0 1em 0;
}
.codwfeeplus_update_out_error{
color: #c70000;
margin: 0 0 1em 0;
}
.codwfeeplus_update_form{
margin: 0 0 1em 0;
}
.codwfeeplus_update_form button{
height: 3em;
width: 20em;
}
.codwfeeplus_condlist_mark{
color: #ff0000;
margin-left: 5px;
font-size: 14px;
line-height: 12px;
}
.codwfeeplus_condlist_tooltip{
text-decoration: none;
color: #3586AE;
background-color: #edf7fb;
border: inset 1px #22b1f7;
padding: 0 5px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.codwfeeplus_conditions tbody td.codwfeeplus_nowrap{
white-space: nowrap;
}
.codwfeeplus_condlist_orderstate{
padding: 5px;
display: inline-block;
}
.codwfeeplus_condlist_orderstate_header{
padding: 5px;
display: block;
}
p.codwfeeplus_nogroup_error{
font-size: 1.2em;
color: #a70000;
}
.codwfeeplus_logo_preview{
border: 1px solid #c7d6db;
float: left;
padding: 5px;
}
.bootstrap .prestashop-switch.codwfeeplus-switch-light {
height: auto;
display: flex;
align-items: center;
}
.bootstrap .prestashop-switch.codwfeeplus-switch-light + p {
clear: left;
}
.bootstrap .prestashop-switch.switch-light.codwfeeplus-switch-light input:checked~a {
border: 1px solid #279cbb;
background-color: #2eacce;
-webkit-box-shadow: #279cbb 0 -1px 0 inset;
box-shadow: inset 0 -1px 0 #279cbb;
}
.bootstrap .prestashop-switch.switch-light.codwfeeplus-switch-light input:last-of-type:checked~a {
border: 1px solid #a97f4d;
background-color: #d4a061;
-webkit-box-shadow: #a97f4d 0 -1px 0 inset;
box-shadow: inset 0 -1px 0 #a97f4d;
}
.bootstrap .prestashop-switch.switch-light.codwfeeplus-switch-light label {
padding: 5px;
line-height: 2em;
}
.bootstrap td.codwfeeplus_list_cell_hidden, .bootstrap th.codwfeeplus_list_cell_hidden {
display: none;
}
.codwfeeplus_list_notavail i {
color: #b77025;
text-shadow: -2px 3px 4px #bbb785;
}
.bootstrap #table-codwfeeplus_cond thead>tr>th{
border-bottom: 1px solid #a0d0eb;
}
.bootstrap .table tbody>tr.codwfeeplus_condlist_type_fee>td {
background-color: #deeefd;
border-bottom: 1px solid #a0d0eb;
}
.bootstrap .table tbody>tr.codwfeeplus_condlist_type_fee:hover>td {
background-color: #c9e1f7;
}
.bootstrap .table tbody>tr.codwfeeplus_condlist_type_paymethod>td {
background-color: #fff8ab;
}
.bootstrap .table tbody>tr.codwfeeplus_condlist_type_paymethod:hover>td {
background-color: #f1e775;
}
select.codwfeeplus_admin_select {
display: inline-block
}
.codwfeeplus_btn_container{
vertical-align: top;
display: inline-block;
}
.codwfeeplus_btn_selectall{
}
.codwfeeplus_btn_selectnone{
}
.codwfeeplus_sublist_row {
display: block;
width: 100%;
margin: 3px 0;
background-color: #bad9f7;
}
.codwfeeplus_condlist_type_paymethod .codwfeeplus_sublist_row {
background-color: #e8e1a5;
}
.codwfeeplus_sublist_title{
display: inline-block;
width: 40%;
font-weight: bold;
font-style: italic;
text-align: right;
}
.codwfeeplus_sublist_value{
display: inline-block;
width: 50%;
text-align: left;
}
.codwfeeplus_sublist_divider{
width: 10%;
display: inline-block;
}
.codwfeeplus_col_id{
width: 5%;
}
.codwfeeplus_col_desc{
width: 10%;
}
.codwfeeplus_col_integration{
width: 5%;
}
.codwfeeplus_col_tax{
width: 5%;
}
.codwfeeplus_col_orderstate{
width: 10%;
}
.codwfeeplus_col_templates{
width: 20%;
}
.codwfeeplus_col_feecalc{
width: 20%;
}
.codwfeeplus_col_cond{
width: 15%;
}
.codwfeeplus_col_active{
width: 5%;
}

View File

@@ -0,0 +1,58 @@
/** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
p.payment_module a.codwfeeplus_payment {
background: url(../img/codwfeeplus.png) 15px 12px no-repeat #fbfbfb;
display: block;
border: 1px solid #d6d4d4;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
font-size: 17px;
line-height: 23px;
color: #333;
font-weight: bold;
padding: 33px 40px 34px 99px;
letter-spacing: -1px;
position: relative;
}
p.payment_module a.codwfeeplus_payment span.price {
font-size: 17px;
}
p.payment_module a.codwfeeplus_payment:after {
display: block;
content: "\f054";
position: absolute;
right: 15px;
margin-top: -11px;
top: 50%;
font-family: "FontAwesome";
font-size: 25px;
height: 22px;
width: 14px;
color: #777;
}
p.payment_module a.codwfeeplus_payment:hover {
background-color: #f6f6f6;
}

View File

@@ -0,0 +1,25 @@
/** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
#codwfeeplus_fee {
font-weight: bold;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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,211 @@
/** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
$(document).ready(function () {
function jqSelector(str)
{
return str.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
}
function codwfeeplus_prod_details_hide() {
$('div.codwfeeplus_product_details input').css('background-color', '#ffebeb');
}
function codwfeeplus_prod_details_show() {
$('div.codwfeeplus_product_details input').css('background-color', '#ebffeb');
}
if ($('#CODWFEEPLUS_INTEGRATION_WAY').val() == 1) {
codwfeeplus_prod_details_hide();
} else {
codwfeeplus_prod_details_show();
}
$('#CODWFEEPLUS_INTEGRATION_WAY').change(function () {
if ($('#CODWFEEPLUS_INTEGRATION_WAY').val() == 1) {
codwfeeplus_prod_details_hide();
} else {
codwfeeplus_prod_details_show();
}
});
function codwfeeplus_cond_feetype_select(a) {
switch (a) {
case '0':
$('#CODWFEEPLUS_FEE').css('background-color', '#ffebeb');
$('#CODWFEEPLUS_PERCENTAGE').css('background-color', '#ffebeb');
$('#CODWFEEPLUS_MIN').css('background-color', '#ffebeb');
$('#CODWFEEPLUS_MAX').css('background-color', '#ffebeb');
break;
case '1':
$('#CODWFEEPLUS_FEE').css('background-color', '#ebffeb');
$('#CODWFEEPLUS_PERCENTAGE').css('background-color', '#ffebeb');
$('#CODWFEEPLUS_MIN').css('background-color', '#ffebeb');
$('#CODWFEEPLUS_MAX').css('background-color', '#ffebeb');
break;
case '2':
$('#CODWFEEPLUS_FEE').css('background-color', '#ffebeb');
$('#CODWFEEPLUS_PERCENTAGE').css('background-color', '#ebffeb');
$('#CODWFEEPLUS_MIN').css('background-color', '#ebffeb');
$('#CODWFEEPLUS_MAX').css('background-color', '#ebffeb');
break;
case '3':
$('#CODWFEEPLUS_FEE').css('background-color', '#ebffeb');
$('#CODWFEEPLUS_PERCENTAGE').css('background-color', '#ebffeb');
$('#CODWFEEPLUS_MIN').css('background-color', '#ebffeb');
$('#CODWFEEPLUS_MAX').css('background-color', '#ebffeb');
break;
default:
$('#CODWFEEPLUS_FEE').css('background-color', '#ebffeb');
$('#CODWFEEPLUS_PERCENTAGE').css('background-color', '#ebffeb');
$('#CODWFEEPLUS_MIN').css('background-color', '#ebffeb');
$('#CODWFEEPLUS_MAX').css('background-color', '#ebffeb');
break;
}
}
codwfeeplus_cond_feetype_select($('#CODWFEEPLUS_FEETYPE').val());
$('#CODWFEEPLUS_FEETYPE').change(function () {
codwfeeplus_cond_feetype_select($('#CODWFEEPLUS_FEETYPE').val());
});
// if ($('#CODWFEEPLUS_INTEGRATION').val() == 1) {
// $('#CODWFEEPLUS_TAXRULE').css('background-color', '#ebffeb');
// } else {
// $('#CODWFEEPLUS_TAXRULE').css('background-color', '#ffebeb');
// }
//
// $('#CODWFEEPLUS_INTEGRATION').change(function () {
// if ($('#CODWFEEPLUS_INTEGRATION').val() == 1) {
// $('#CODWFEEPLUS_TAXRULE').css('background-color', '#ebffeb');
// } else {
// $('#CODWFEEPLUS_TAXRULE').css('background-color', '#ffebeb');
// }
// });
$("a#page-header-desc-codwfeeplus_conditions-reset_product").click(function (e) {
e.stopPropagation();
e.preventDefault();
var href = this.href;
var input = '<input type="hidden" name="submitCODwFeePlus_reset_product" value="1" />';
$("body").append('<form action="' + href + '" method="post" id="codwfeeplus_poster">' + input + '</form>');
$("#codwfeeplus_poster").submit();
});
$("a.action-copy-to-shop").click(function (e) {
e.stopPropagation();
e.preventDefault();
var href = this.href;
var parts = href.split('?');
var url = parts[0] + '?';
var params = parts[1].split('&');
var pp, inputs = '';
for (var i = 0, n = params.length; i < n; i++) {
pp = params[i].split('=');
if (pp[0] == 'submitCODwFeePlusActionCopyToShop' || pp[0] == 'CODwFeePlusActionCopyToShop_shopId' || pp[0] == 'CODwFeePlusActionCopyToShop_condId') {
inputs += '<input type="hidden" name="' + pp[0] + '" value="' + pp[1] + '" />';
} else {
if (i > 0) {
url += '&';
}
url += pp[0] + '=' + pp[1];
}
}
$("body").append('<form action="' + url + '" method="post" id="codwfeeplus_poster">' + inputs + '</form>');
$("#codwfeeplus_poster").submit();
});
$("a.action-duplicate-cond").click(function (e) {
e.stopPropagation();
e.preventDefault();
var href = this.href;
var parts = href.split('?');
var url = parts[0] + '?';
var params = parts[1].split('&');
var pp, inputs = '';
for (var i = 0, n = params.length; i < n; i++) {
pp = params[i].split('=');
if (pp[0] == 'submitCODwFeePlusActionDuplicatecond' || pp[0] == 'CODwFeePlusActionDuplicatecond_condId') {
inputs += '<input type="hidden" name="' + pp[0] + '" value="' + pp[1] + '" />';
} else {
if (i > 0) {
url += '&';
}
url += pp[0] + '=' + pp[1];
}
}
$("body").append('<form action="' + url + '" method="post" id="codwfeeplus_poster">' + inputs + '</form>');
$("#codwfeeplus_poster").submit();
});
$("a.action-export-cond").click(function (e) {
e.stopPropagation();
e.preventDefault();
var href = this.href;
var parts = href.split('?');
var url = parts[0] + '?';
var params = parts[1].split('&');
var pp, inputs = '';
for (var i = 0, n = params.length; i < n; i++) {
pp = params[i].split('=');
if (pp[0] == 'submitCODwFeePlusActionExportcond' || pp[0] == 'CODwFeePlusActionExportcond_condId') {
inputs += '<input type="hidden" name="' + pp[0] + '" value="' + pp[1] + '" />';
} else {
if (i > 0) {
url += '&';
}
url += pp[0] + '=' + pp[1];
}
}
$("body").append('<form action="' + url + '" method="post" id="codwfeeplus_poster">' + inputs + '</form>');
$("#codwfeeplus_poster").submit();
});
$(".codwfeeplus_btn_selectall").click(function (e) {
var id = $(this).data("rel");
$("#" + jqSelector(id)+" option").prop('selected', true);
});
$(".codwfeeplus_btn_selectnone").click(function (e) {
var id = $(this).data("rel");
$("#" + jqSelector(id)+" option").prop('selected', false);
});
});
$(window).load(function () {
if ($("#codwfeeplus_test_result_panel").length) {
var page_head_height = $("#content div.bootstrap div.page-head").height();
var infos_height = $('#header_infos').height();
var offset = $("#codwfeeplus_test_result_panel").offset().top;
$('html, body').animate({
scrollTop: offset - page_head_height - infos_height
}, 1000);
}
});

View File

@@ -0,0 +1,33 @@
/** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
$(document).ready(function () {
if (codwfeeplus_is17) {
if ($('body#cart').length) {
$('a[data-link-action="delete-from-cart"][data-id-product="' + codwfeeplus_codproductid + '"]').trigger("click");
}
} else {
if ($('body#order-opc').length || $('body#order').length) {
$('a.cart_quantity_delete[id^="' + codwfeeplus_codproductid + '_"]').trigger("click");
}
}
});

View File

@@ -0,0 +1,70 @@
/** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
$(document).ready(function () {
function replace_cart_summary(cod_active) {
if (!$("#codwfeeplus_payment_infos").length) {
return;
}
var cart_summary = $("#js-checkout-summary");
var cart_table = $("#order-items");
var _url = $("#codwfeeplus_payment_infos").attr("data-ajaxurl");
var datas = {cod_active: cod_active ? 1 : 0};
$.ajax({
type: 'POST',
url: _url,
data: datas,
success: function (data) {
if (typeof data !== "undefined") {
if (cart_summary.length) {
cart_summary.replaceWith(data.preview);
}
if (cart_table.length) {
cart_table.replaceWith(data.table_preview);
}
}
},
error: function (data) {
}
})
}
$('input[data-module-name="codwfeeplus"]').on("change", null, function () {
replace_cart_summary(true);
});
// $('input[type=radio][name=payment-option]').each(function (index, value) {
// var lang = $(this).attr('data-lang');
// label_arr[lang] = $(this).attr('value');
// });
//
$('input[type=radio][name=payment-option]').on("change", null, function () {
if ($('input[data-module-name="codwfeeplus"]').length) {
if ($(this).attr('data-module-name') != 'codwfeeplus') {
replace_cart_summary(false);
}
}
});
// $('input[type="radio"]').on('deselect', function () {
// alert("DEselected");
// });
});

View File

@@ -0,0 +1,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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,27 @@
{** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*}
{foreach $buttons AS $button}
<a href="{$button.href|escape:'html':'UTF-8'}" title="{$button.action|escape:'html':'UTF-8'}" class="{$button.class}">
<i class="{$button.icon}"></i> {$button.action|escape:'html':'UTF-8'}
</a>
{/foreach}

View File

@@ -0,0 +1,25 @@
{** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*}
<a href="{$href|escape:'html':'UTF-8'}" title="{$action|escape:'html':'UTF-8'}" class="{$class}">
<i class="{$icon}"></i> {$action|escape:'html':'UTF-8'}
</a>

View File

@@ -0,0 +1,217 @@
{** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*}
{capture name='tr_count'}{counter name='tr_count'}{/capture}
{$cols = 0}
<tbody>
{if count($list)}
{foreach $list AS $index => $tr}
{$cols = 0}
<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}
{$cols = $cols +1}
<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' mod='codwfeeplus'}
{else}
<i class="icon-remove"></i> {l s='Disabled' mod='codwfeeplus'}
{/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'}
{if isset($tr.id_currency)}
{displayPrice price=$tr.$key currency=$tr.id_currency}
{else}
{displayPrice price=$tr.$key}
{/if}
{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='%' mod='codwfeeplus'}
{* 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>
{elseif isset($params.html)}
{$tr.$key}
{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 $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}
{$cols = $cols + 1}
<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}
</td>
{/if}
</tr>
{if isset($tr.id_codwfeeplus_trans) && isset($tr.codwfeeplus_result)}
<tr>
<td colspan="{count($fields_display)+$cols}">
<div class="codwfeeplus_result" id="codwfeeplus_result_{$tr.id_codwfeeplus_trans}" style="display: none;">
{$tr.codwfeeplus_result}
</div>
<td>
</tr>
{/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' mod='codwfeeplus'}
</div>
</td>
</tr>
{/if}
</tbody>

View File

@@ -0,0 +1,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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,90 @@
{** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*}
{if $help_ajax == true}
<link rel="stylesheet" type="text/css" href="{$css_file}" />
{/if}
{if $help_ajax == false}
<div class="bootstrap" id="codwfeeplushelpblock">
<div class="panel">
<div class="panel-heading" onclick="$('#codwfeeplus_help_panel').slideToggle();">
<i class="icon-question"></i>
{$help_title|escape:'htmlall':'UTF-8'} <span style="text-transform: none;font-style: italic;">({$help_sub|escape:'htmlall':'UTF-8'})</span>
{if $update.res == 'update'}
&nbsp;<span class="codwfeeplus_update_title_success">ΒΡΕΘΗΚΕ ΜΙΑ ΕΝΗΜΕΡΩΣΗ!</span>
{elseif $update.res == 'current'}
&nbsp;<span class="codwfeeplus_update_title_current">ΔΕΝ ΒΡΕΘΗΚΕ ΕΝΗΜΕΡΩΣΗ!</span>
{elseif $update.res == 'error'}
&nbsp;<span class="codwfeeplus_update_title_error">ΣΦΑΛΜΑ ΚΑΤΑ ΤΟΝ ΕΛΕΓΧΟ ΕΝΗΜΕΡΩΣΗΣ!</span>
{/if}
</div>
{/if}
<div id="codwfeeplus_help_panel"{if $help_ajax == false && $hide == true} style="display: none;"{/if}>
<div class="codwfeeplus_update">
{if $update.res != '' && $update.res != 'error'}
{if $update.res =='current'}
<div class="codwfeeplus_update_out_current">
<p>Το πρόσθετο είναι ενημερωμένο στην τελευταία έκδοση.</p>
</div>
{elseif $update.res=='update'}
<div class="codwfeeplus_update_out_success">
<p>Μια νέα ενημέρωση είναι διαθέσιμη: <a href="{$update.download_link}">{$update.download_link}</a> </p>
</div>
{/if}
{elseif $update.res == 'error'}
<div class="codwfeeplus_update_out_error">
<p>Σφάλμα κατά τον έλεγχο για ενημέρωση: {$update.out}</p>
</div>
{/if}
<div class="codwfeeplus_update_form">
<form action="{$href}" method="post">
<button type="submit" name="codwfeeplus_check_update">
<i class="icon-refresh"></i>
Έλεγχος για ενημέρωση
</button>
</form>
</div>
</div>
<div class="codwfeeplus_help_title">
<p>{$module_name|escape:'htmlall':'UTF-8'} - v{$module_version|escape:'htmlall':'UTF-8'}</p>
</div>
<div class="codwfeeplus_help_body">
<p>Αυτή το πρόσθετο σάς επιτρέπει να χρησιμοποιήσετε τη μέθοδο πληρωμής με αντικαταβολή (COD), προσθέτοντας μια χρέωση όταν πληρούνται οι κατάλληλες προϋποθέσεις.</p>
<p>&copy;2018 Σάκης Γκιόκας. Αυτό το πρόσθετο είναι εντελώς δωρεάν, με άδεια χρήσης <a href="https://opensource.org/licenses/GPL-3.0" target="_blank">GNU General Public License version 3</a>.</p>
<p>Περισσότερες πληροφορίες: <a href="{$update.info_link}" target="_blank">{$update.info_link}</a></p>
<p>Github repository: <a href="{$update.github_link}" target="_blank">{$update.github_link}</a></p>
</div>
<div class="codwfeeplus_donate_body">
<p>Αυτό το πρόσθετο είναι εντελώς δωρεάν και μπορείτε να το χρησιμοποιήσετε χωρίς κανένα περιορισμό, όπως περιγράφεται στην άδεια χρήσης του. Στην περίπτωση πάντως που θέλετε να με κεράσετε μια μπύρα, μπορείτε να χρησιμοποιήσετε το παρακάτω κουμπί.</p>
<div class="codwfeeplus_donate_form">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="94VTWMDKGAFX4">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
</form>
</div>
</div>
</div>
{if $help_ajax == false}
</div>
</div>
{/if}

View File

@@ -0,0 +1,90 @@
{** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*}
{if $help_ajax == true}
<link rel="stylesheet" type="text/css" href="{$css_file}" />
{/if}
{if $help_ajax == false}
<div class="bootstrap" id="codwfeeplushelpblock">
<div class="panel">
<div class="panel-heading" onclick="$('#codwfeeplus_help_panel').slideToggle();">
<i class="icon-question"></i>
{$help_title|escape:'htmlall':'UTF-8'} <span style="text-transform: none;font-style: italic;">({$help_sub|escape:'htmlall':'UTF-8'})</span>
{if $update.res == 'update'}
&nbsp;<span class="codwfeeplus_update_title_success">A NEW UPDATE IS FOUND!</span>
{elseif $update.res == 'current'}
&nbsp;<span class="codwfeeplus_update_title_current">NO UPDATE FOUND!</span>
{elseif $update.res == 'error'}
&nbsp;<span class="codwfeeplus_update_title_error">ERROR DURING UPDATE CHECK!</span>
{/if}
</div>
{/if}
<div id="codwfeeplus_help_panel"{if $help_ajax == false && $hide == true} style="display: none;"{/if}>
<div class="codwfeeplus_update">
{if $update.res != '' && $update.res != 'error'}
{if $update.res =='current'}
<div class="codwfeeplus_update_out_current">
<p>The module version is current.</p>
</div>
{elseif $update.res=='update'}
<div class="codwfeeplus_update_out_success">
<p>A new update is available: <a href="{$update.download_link}">{$update.download_link}</a> </p>
</div>
{/if}
{elseif $update.res == 'error'}
<div class="codwfeeplus_update_out_error">
<p>Error during update check: {$update.out}</p>
</div>
{/if}
<div class="codwfeeplus_update_form">
<form action="{$href}" method="post">
<button type="submit" name="codwfeeplus_check_update">
<i class="icon-refresh"></i>
Update check
</button>
</form>
</div>
</div>
<div class="codwfeeplus_help_title">
<p>{$module_name|escape:'htmlall':'UTF-8'} - v{$module_version|escape:'htmlall':'UTF-8'}</p>
</div>
<div class="codwfeeplus_help_body">
<p>This module allows you to use the Cash On Delivery (COD) payment method, adding a fee when the appropriate conditions are met.</p>
<p>&copy;2018 Sakis Gkiokas. This module is completely free under the <a href="https://opensource.org/licenses/GPL-3.0" target="_blank">GNU General Public License version 3</a>.</p>
<p>More Details: <a href="{$update.info_link}" target="_blank">{$update.info_link}</a></p>
<p>Github repository: <a href="{$update.github_link}" target="_blank">{$update.github_link}</a></p>
</div>
<div class="codwfeeplus_donate_body">
<p>This is a completely free module that you can use without any limitations, as described in it's license. In the case though, you want to buy me a beer, you can use the button below.</p>
<div class="codwfeeplus_donate_form">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="94VTWMDKGAFX4">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
</form>
</div>
</div>
</div>
{if $help_ajax == false}
</div>
</div>
{/if}

View File

@@ -0,0 +1,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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,81 @@
{** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*}
{capture name=path}
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Go back to the Checkout' mod='codwfeeplus'}">{l s='Checkout' mod='codwfeeplus'}</a><span class="navigation-pipe">{$navigationPipe}</span>{l s='Cash on delivery (COD) payment' mod='codwfeeplus'}
{/capture}
<h1 class="page-heading">
{l s='Order summary' mod='codwfeeplus'}
</h1>
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
<form action="{$link->getModuleLink('codwfeeplus', 'validation', [], true)|escape:'html'}" method="post">
<input type="hidden" name="confirm" value="1" />
<div class="box">
<h3 class="page-subheading">
{l s='Cash on delivery (COD) payment' mod='codwfeeplus'}
</h3>
<div id="codwfeeplus_val_image" style="float:left; margin: 0px 15px 0 0px;">
<img src="{$this_path}views/img/codwfeeplus.png" alt="{l s='Cash on delivery (COD) payment' mod='codwfeeplus'}"/>
</div>
<div id="codwfeeplus_val_text" style="display: inline-block;">
<p>
<strong class="dark">
{l s='You have chosen the Cash on Delivery method.' mod='codwfeeplus'}
</strong>
</p>
<p>
{l s='The total amount of your order is' mod='codwfeeplus'}
<span id="amount" class="price">{convertPrice price=$total}</span>
{if $use_taxes == 1}
{l s='(tax incl.)' mod='codwfeeplus'}
{/if}
</p>
<div class="breakdown">
<ul style="list-style: disc; padding: 0 0 0 2em;">
<li>{l s='Products\' value: ' mod='codwfeeplus'} <span id="products_value" class="price">{convertPrice price=$product_value}</span></li>
{if $wrappingfee !=0}
<li>{l s='Wrapping fee: ' mod='codwfeeplus'} <span id="wrapping_fee" class="price">{convertPrice price=$wrappingfee}</span></li>
{/if}
<li>{l s='Shipping fee: ' mod='codwfeeplus'} <span id="shipping_fee" class="price">{convertPrice price=$carrierfee}</span></li>
<li>{l s='COD fee: ' mod='codwfeeplus'} <span id="cod_fee" class="price">{convertPrice price=$codfee}</span></li>
</ul>
</div>
<p>
{l s='Please confirm your order by clicking \'I confirm my order\'' mod='codwfeeplus'}.
</p>
</div>
</div>
<p class="cart_navigation clearfix" id="cart_navigation">
<a class="button-exclusive btn btn-default" href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}">
<i class="icon-chevron-left"></i>{l s='Other payment methods' mod='codwfeeplus'}
</a>
<button class="button btn btn-default button-medium" type="submit" name="btnSubmit">
<span>{l s='I confirm my order' mod='codwfeeplus'}<i class="icon-chevron-right right"></i></span>
</button>
</p>
</form>

View File

@@ -0,0 +1,28 @@
{** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*}
<p>{l s='Your order on %s is complete.' sprintf=$shop_name mod='codwfeeplus'}
<br /><br />
{l s='You have chosen the cash on delivery method.' mod='codwfeeplus'}
<br /><br /><span class="bold">{l s='Your order will be sent very soon.' mod='codwfeeplus'}</span>
<br /><br />{l s='For any questions or for further information, please contact our' mod='codwfeeplus'} <a href="{$link->getPageLink('contact-form', true)|escape:'html'}">{l s='customer support' mod='codwfeeplus'}</a>.
</p>

View File

@@ -0,0 +1,28 @@
{** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*}
<p>{l s='Your order on %s is complete.' sprintf=[$shop_name] mod='codwfeeplus'}
<br /><br />
{l s='You have chosen the cash on delivery method.' mod='codwfeeplus'}
<br /><br /><span class="bold">{l s='Your order will be sent very soon.' mod='codwfeeplus'}</span>
<br /><br />{l s='For any questions or for further information, please contact our' mod='codwfeeplus'} <a href="{$link->getPageLink('contact', true)|escape:'html'}">{l s='customer support' mod='codwfeeplus'}</a>.
</p>

View File

@@ -0,0 +1,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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,27 @@
{** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*}
<p class="payment_module">
<a class="codwfeeplus_payment" href="{$link->getModuleLink('codwfeeplus', 'validation', [], true)|escape:'html'}" title="{l s='Pay with cash on delivery (COD)' mod='codwfeeplus'}" rel="nofollow">
{l s='Pay with cash on delivery (COD)' mod='codwfeeplus'}{if $fee >0 }:&nbsp;<span id="codwfeeplus_fee" class="price">+{convertPrice price=$fee}</span>{/if}&nbsp;<span>({l s='You pay for the merchandise upon delivery' mod='codwfeeplus'})</span>
</a>
</p>

View File

@@ -0,0 +1,26 @@
{** Copyright 2018 Sakis Gkiokas
*
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*}
<p id="codwfeeplus_payment_infos" data-ajaxurl="{$ajax_link}">
{l s='Pay with cash on delivery (COD)' mod='codwfeeplus'}
{if $fee >0 }:&nbsp;<span id="codwfeeplus_fee" class="price">+{$fee_formatted}</span>{/if}
&nbsp;<span>({l s='You pay for the merchandise upon delivery' mod='codwfeeplus'})</span>
</p>

View File

@@ -0,0 +1,30 @@
<?php
/** Copyright 2018 Sakis Gkiokas
* This file is part of codwfeeplus module for Prestashop.
*
* Codwfeeplus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Codwfeeplus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For any recommendations and/or suggestions please contact me
* at sakgiok@gmail.com
*
* @author Sakis Gkiokas <sakgiok@gmail.com>
* @copyright 2018 Sakis Gkiokas
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3
*/
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;