This commit is contained in:
2025-03-09 23:50:32 +01:00
parent 1e498b41c7
commit 67c05416ac
190 changed files with 8061 additions and 3363 deletions

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,46 @@
/* The Modal (background) */
.ehp-modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 10000; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content */
.ehp-modal-content {
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
vertical-align:top;
}
.ehp-modal header {
/* background-color: #0a7ad4;
color: #aaaaaa;*/
font-weight: bold;
}
/* The Close Button */
.ehp-close {
color: #aaaaaa;
float: right;
font-size: 32px;
font-weight: bold;
}
.ehp-close:hover,
.ehp-close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,137 @@
function jakKupicEhp() {
window.open('https://www.santanderconsumer.pl/raty-jak-kupic', 'jakKupic', 'width=710,height=500,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
return false;
}
function obliczRateEhp(nrSklepu, symUrl, qtySelector, basketSelector) {
let koszyk, ilo, qty, basket, scbQty, scbPrice;
scbQty = -1;
scbPrice = -1;
if ($("#scb_price") && typeof($("#scb_price")) == 'object') {
scbPrice = $("#scb_price").text();
}
if ($("#scb_quantity") && typeof($("#scb_quantity")) == 'object') {
scbQty = $("#scb_quantity").text();
}
if (scbQty > 0 && scbPrice > 0) {
qty = $(qtySelector);
basket = $(basketSelector);
if(qty.length == 1 && basket.length == 1) {
scbQty = qty.val();
scbPrice = basket.attr('content');
}
scbPrice = scbPrice * scbQty;
scbPrice = Math.round(scbPrice * 100, 2) / 100; //some stupid code just to solve strange js numeric results problem
if (scbPrice > 100) {
window.open(symUrl + 'numerSklepu/' + nrSklepu + '/wariantSklepu/1/typProduktu/0/wartoscTowarow/' + scbPrice);
} else {
alert("Kredytujemy zakupy w cenie powyżej 100zł");
}
} else {
alert('Wrong parameters for calculate');
}
}
function simulationEhp(displayModal, shopNumber, symUrl, quantity, price) {
let scbQty, scbPrice;
scbQty = -1;
scbPrice = -1;
if ($("#scb_price") && typeof($("#scb_price")) == 'object') {
scbPrice = $("#scb_price").text();
}
if ($("#scb_quantity") && typeof($("#scb_quantity")) == 'object') {
scbQty = $("#scb_quantity").text();
}
if (scbQty > 0 && scbPrice > 0) {
/**
* if quantity an price are ok then use it for simulation. Otherwise - use defaults(
* scbQty and scbPrice) set on server side as smarty value
*/
if(quantity >= scbQty) {
scbQty = quantity;
// scbPrice = price;
}
if(price > 0){
scbPrice = price;
}
eHpSimRequestPrepare(displayModal, shopNumber, symUrl, scbPrice, scbQty);
} else {
alert('Wrong parameters for calculate');
}
}
function eHpSimRequestPrepare(displayModal, shopNumber, symUrl, unitPrice, orderQuantity){
let modal = document.getElementById('simInputModal');
/**
* tu - dialog z edycją unitPrice i orderQuantity. Pokazywany w zależności od parametru w konfiguracji wtyczki.
*
*/
if(displayModal == 1){
$('#ehpModalPrice').val(unitPrice);
$('#ehpModalQuantity').val(orderQuantity);
//display modal
modal.style.display = "block";
} else {
orderPrice = ehpCalcOrderPrice(unitPrice, orderQuantity);
/*
Jeśli w konfiguracji określono że dialog nie ma być pokazywany - wywołanie ehpSimRequest będzie robione stąd a nie z onclick
*/
ehpSimRequest(shopNumber, symUrl, orderPrice);
}
}
function ehpSimRequest(shopNumber, symUrl, orderPrice){
let modal = document.getElementById('simInputModal');
modal.style.display = "none";
if(!isNaN(orderPrice)){
if (orderPrice <= 100) {
alert("Uwaga, niewielka wartość towarów. Bank może nie udzielić tak niskiego kredytu.");
}
window.open(symUrl + 'numerSklepu/' + shopNumber + '/wariantSklepu/1/typProduktu/0/wartoscTowarow/' + orderPrice);
} else {
alert("Pola cena i ilość muszą zawierać liczby.");
}
}
function ehpCalcOrderPrice(unitPrice, qty){
let op = NaN;
unitPrice = parseFloat(unitPrice);
qty = parseFloat(qty);
if(!isNaN(qty) && !isNaN(unitPrice)){
op = unitPrice * qty;
op = Math.round(op * 100, 2) / 100;
}
return op;
}
function santanderCreditValidateForm() {
if ($('#santanderAgreement').is(':checked')) {
$('#scbSubmitBtn').removeAttr('disabled');
} else {
$('#scbSubmitBtn').attr('disabled','disabled');
}
}
function ehpStateRefresh() {
$('#busy').css('visibility','visible');
$('#refreshBtn').prop('disabled', true);
$.ajax({
type: 'POST',
url: $('#refreshCommand').val()+'?id_order=' + $('#ehp_id_order').val(),
// data: 'id_order=' + $('#id_order').val(),
// dataType: 'json',
timeout: 30000
}).done(function(json) {
location.reload(true);
// alert('done');
}).fail(function(json){
alert("Błąd przy wywołaniu serwisu bankowego.");
});
};

View File

@@ -0,0 +1,143 @@
window.onload = function () {
(function () {
// will be executed after page loading
if (!isNaN(parseFloat($("#downpaymentEhp").text()))){
let downpayment = parseFloat($("#downpaymentEhp").text());
if(downpayment > 0) {
$('#downpaymentEhp').css('background-color','red');
$('#downpaymentEhp').css('color','white');
$('#downpaymentEhp').css('font-weight','bold');
}
}
$("#refreshBtn").click(function(){
$('#busy').css('visibility','visible');
$('#refreshBtn').prop('disabled', true);
$.ajax({
type: 'POST',
url: $('#refreshCommand').val()+'?id_order=' + $('#id_order').val(),
// data: 'id_order=' + $('#id_order').val(),
// dataType: 'json',
timeout: 30000
}).done(function(json) {
location.reload(true);
// alert('done');
}).fail(function(json){
alert("Błąd przy wywołaniu serwisu bankowego.");
});
});
$("#OrderMapBtn").click(function(){
alert($('#OrderMapCmd').val());
});
$("[name='SCB_EHP_defaultQUeries']").on('change', function(){
if(this.value == 1){
try {
$("[name='SANTANDERCREDIT_QTY_QUERY']")[0].value = $('#EHP_CURRENT_QTY_QUERY').val();
$("[name='SANTANDERCREDIT_PRICE_QUERY']")[0].value = $('#EHP_CURRENT_PRICE_QUERY').val();
} catch (error) {
}
} else {
try {
$("[name='SANTANDERCREDIT_QTY_QUERY']")[0].value = $('#EHP_DEF_QTY_QUERY').val();
$("[name='SANTANDERCREDIT_PRICE_QUERY']")[0].value = $('#EHP_DEF_PRICE_QUERY').val();
} catch (error) {
}
}
});
$("#SCB_EHP_defaultUrls").on('change', function(){
if(this.value == 1){
try {
$("[name='SANTANDERCREDIT_URL_SYMULATOR']")[0].value = $('#EHP_CURRENT_URL_SYMULATOR').val();
$("[name='SANTANDERCREDIT_URL_WNIOSEK']")[0].value = $('#EHP_CURRENT_URL_WNIOSEK').val();
$("[name='SANTANDERCREDIT_SVC_LOCATION']")[0].value = $('#EHP_CURRENT_SVC_LOCATION').val();
} catch (error) {
}
} else {
try {
$("[name='SANTANDERCREDIT_URL_SYMULATOR']")[0].value = $('#EHP_DEF_URL_SYMULATOR').val();
$("[name='SANTANDERCREDIT_URL_WNIOSEK']")[0].value = $('#EHP_DEF_URL_WNIOSEK').val();
$("[name='SANTANDERCREDIT_SVC_LOCATION']")[0].value = $('#EHP_DEF_SVC_LOCATION').val();
} catch (error) {
}
}
});
$('#configuration_form').on('submit', function(){
scbQueryEncode($('#EHP_CURRENT_QTY_QUERY'));
scbQueryEncode($('#EHP_CURRENT_PRICE_QUERY'));
scbQueryEncode($('#EHP_DEF_QTY_QUERY'));
scbQueryEncode($('#EHP_DEF_PRICE_QUERY'));
scbQueryEncode($('#SANTANDERCREDIT_QTY_QUERY'));
scbQueryEncode($('#SANTANDERCREDIT_PRICE_QUERY'));
});
function scbQueryEncode(jqObj){
let tmpVal = jqObj.val();
tmpVal = tmpVal.replaceAll(')', '_nawiasP_',tmpVal).replaceAll('(','_nawiasL_',tmpVal);
// tmpVal = window.btoa(tmpVal);
jqObj.val(tmpVal);
};
$('#pshPassButton').on('click',function pshPassChange(){
let currentPass = $('#SANTANDERCREDIT_PSH_PASS').val();
let modal = document.getElementById('pshPassModal');
$('#pshPass1').val(currentPass);
$('#pshPass2').val(currentPass);
modal.style.display = "block";
});
$('#pshPassSaveBtn').on('click',function pshPassSave(){
let modal = document.getElementById('pshPassModal');
let pass1 = $('#pshPass1').val();
let pass2 = $('#pshPass2').val();
if(pass1 == pass2){
modal.style.display = "none";
$('#SANTANDERCREDIT_PSH_PASS').val(pass1);
$('#configuration_form_submit_btn').click();
} else {
alert('Różne hasła w obu polach!');
}
});
$('#pshTestButton').on('click',function pshTestConn(){
let modal = document.getElementById('pshTestModal');
let msgText = "Test 1 - Łączność z serwisem: ";
$('#pshTestResult').text('Trwa weryfikacja połączenia...');
modal.style.display = "block";
$.ajax({
type: 'POST',
url: $('#pshIsActiveCommand').val(),
timeout: 30000
}).done(function(json) {
msgText = msgText + json;
msgText = msgText + ', Test 2 - Logowanie do usługi: ';
$.ajax({
type: 'POST',
url: $('#pshLoginChckCommand').val()+'?id_order=nosuchorder',
timeout: 30000
}).done(function(json) {
msgText = msgText + ' ' + json;
$('#pshTestResult').text(msgText);
}).fail(function(json){
msgText = msgText + " Błąd przy wywołaniu serwisu bankowego.";
$('#pshTestResult').text(msgText);
});
}).fail(function(json){
msgText = msgText + " Błąd przy wywołaniu serwisu bankowego.";
$('#pshTestResult').text(msgText);
});
});
})();
};

View File

@@ -0,0 +1,60 @@
function jakKupicEhp() {
window.open('https://www.santanderconsumer.pl/raty-jak-kupic', 'jakKupic', 'width=710,height=500,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
return false;
}
function obliczRateEhp(nrSklepu, symUrl, qtySelector, basketSelector) {
let koszyk, ilo, qty, basket, scbQty, scbPrice;
scbQty = -1;
scbPrice = -1;
if ($("#scb_price") && typeof($("#scb_price")) == 'object') {
scbPrice = $("#scb_price").text();
}
if ($("#scb_quantity") && typeof($("#scb_quantity")) == 'object') {
scbQty = $("#scb_quantity").text();
}
if (scbQty > 0 && scbPrice > 0) {
qty = $(qtySelector);
basket = $(basketSelector);
if(qty.length == 1 && basket.length == 1) {
scbQty = qty.val();
scbPrice = basket.attr('content');
}
scbPrice = scbPrice * scbQty;
scbPrice = Math.round(scbPrice * 100, 2) / 100; //some stupid code just to solve strange js numeric results problem
if (scbPrice > 100) {
window.open(symUrl + 'numerSklepu/' + nrSklepu + '/wariantSklepu/1/typProduktu/0/wartoscTowarow/' + scbPrice);
} else {
alert("Kredytujemy zakupy w cenie powyżej 100zł");
}
} else {
alert('Wrong parameters for calculate');
}
}
function santanderCreditValidateForm() {
if ($('#santanderAgreement').is(':checked')) {
$('#scbSubmitBtn').removeAttr('disabled');
} else {
$('#scbSubmitBtn').attr('disabled','disabled');
}
}
function ehpStateRefresh() {
$('#busy').css('visibility','visible');
$('#refreshBtn').prop('disabled', true);
$.ajax({
type: 'POST',
url: $('#refreshCommand').val()+'?id_order=' + $('#ehp_id_order').val(),
// data: 'id_order=' + $('#id_order').val(),
// dataType: 'json',
timeout: 30000
}).done(function(json) {
location.reload(true);
// alert('done');
}).fail(function(json){
alert("Błąd przy wywołaniu serwisu bankowego.");
});
};

View File

@@ -0,0 +1,136 @@
{
"applicationURL": "https://wniosek.eraty.pl/formularz/",
"jq_qtySelector": "#quantity_wanted",
"jq_priceSelector": "div.current-price > span[itemprop="price"],div.current-price > span.current-price-value",
"orderId": "13_odt_2023_11_26_16_34_22",
"shopId": "99995",
"shopName": "ps811b",
"shopMailAdress": "rklepacz@gmail.com",
"shopPhone": false,
"shopHttp": "http://localhost/presta/ps811b/",
"returnTrue": "http://localhost/presta/ps811b/module/santandercredit/santanderCreditReturn?status=true&orderId=",
"returnFalse": "http://localhost/presta/ps811b/module/santandercredit/santanderCreditReturn?status=false&orderId=",
"email": "alfa@beta.com",
"imie": "Jan",
"nazwisko": "Test",
"telKontakt": "",
"ulica": "ul. Legnicka 1",
"ulica2": "",
"miasto": "Wrocu0142aw",
"kodPocz": "54-216",
"shipping": 0,
"products": [
{
"id_product_attribute": 1,
"id_product": 1,
"cart_quantity": 26,
"id_shop": 1,
"id_customization": null,
"name": "Hummingbird printed t-shirt",
"is_virtual": 0,
"description_short": "<p>Regular fit, round neckline, short sleeves. Made of extra long staple pima cotton. </p><br /><p></p>",
"available_now": "",
"available_later": "",
"id_category_default": 4,
"id_supplier": 1,
"id_manufacturer": 1,
"manufacturer_name": "Studio Design",
"on_sale": 0,
"ecotax": "0.000000",
"additional_shipping_cost": "0.000000",
"available_for_order": 1,
"show_price": 1,
"price": 19.120000000000000994759830064140260219573974609375,
"active": 1,
"unity": "",
"unit_price": 0,
"quantity_available": 253,
"width": "0.000000",
"height": "0.000000",
"depth": "0.000000",
"out_of_stock": 2,
"weight": 0.299999999999999988897769753748434595763683319091796875,
"available_date": "0000-00-00",
"date_add": "2023-11-17 18:30:47",
"date_upd": "2023-11-17 18:30:47",
"quantity": 26,
"link_rewrite": "hummingbird-printed-t-shirt",
"category": "men",
"unique_id": "0000000001000000000170",
"id_address_delivery": 7,
"advanced_stock_management": 0,
"supplier_reference": "demo_1_46",
"customization_quantity": null,
"price_attribute": "0.000000",
"ecotax_attr": "0.000000",
"reference": "demo_1",
"weight_attribute": 0.299999999999999988897769753748434595763683319091796875,
"ean13": "",
"isbn": "",
"upc": "",
"mpn": "",
"minimal_quantity": 1,
"wholesale_price": "5.490000",
"id_image": "1-2",
"legend": "Hummingbird printed t-shirt",
"reduction_type": "percentage",
"is_gift": false,
"reduction": 5.879400000000000403588273911736905574798583984375,
"reduction_without_tax": 4.78000000000000024868995751603506505489349365234375,
"price_without_reduction": 29.39699999999999846522769075818359851837158203125,
"specific_prices": {
"id_specific_price": 1,
"id_specific_price_rule": 0,
"id_cart": 0,
"id_product": 1,
"id_shop": 0,
"id_shop_group": 0,
"id_currency": 0,
"id_country": 0,
"id_group": 0,
"id_customer": 0,
"id_product_attribute": 0,
"price": "-1.000000",
"from_quantity": 1,
"reduction": "0.200000",
"reduction_tax": 1,
"reduction_type": "percentage",
"from": "0000-00-00 00:00:00",
"to": "0000-00-00 00:00:00",
"score": 0
},
"unit_price_ratio": 0,
"unit_price_tax_excluded": 0,
"unit_price_tax_included": 0,
"stock_quantity": 253,
"price_without_reduction_without_tax": 23.89999999999999857891452847979962825775146484375,
"price_with_reduction": 23.5176000000000016143530956469476222991943359375,
"price_with_reduction_without_tax": 19.120000000000000994759830064140260219573974609375,
"total": 497.1200000000000045474735088646411895751953125,
"total_wt": 611.4600000000000363797880709171295166015625,
"price_wt": 23.5176000000000016143530956469476222991943359375,
"reduction_applies": true,
"quantity_discount_applies": true,
"allow_oosp": 0,
"features": [
{
"id_feature": 1,
"id_product": 1,
"id_feature_value": 4
},
{
"id_feature": 2,
"id_product": 1,
"id_feature_value": 8
}
],
"attributes": "Rozmiar: S - Kolor: Biau0142y",
"attributes_small": "S - Biau0142y",
"rate": 23,
"tax_name": "PTU PL 23%"
}
],
"totalOrder": 611.4600000000000363797880709171295166015625,
"ehpToken": "3121f0a09e529984670b5456036194ce_2023_11_26_16_34_25",
"modDir": "http://localhost/presta/ps811b/modules/santandercredit"
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,25 @@
{extends file='page.tpl'}
{block name="page_content"}
<p>
<span style="font-size: 16px; font-weight: bold;">Wystąpiły błędy przy realizacji płatności.</span>
<br /><br /><br />
<span style="font-size: 16px;">Numer wniosku kredytowego: <b>{$wniosekId}</b></span>.
<br /><br />
<span style="font-size: 16px;">Numer zamówienia w sklepie: <b>{$orderId}</b></span>.
<br/>
<hr/>
<p>
{$errors}
</p>
<hr/>
<br/>
W razie jakichkolwiek pytań prosimy o kontakt z <a href="{$base_dir}contact-form.php">Działem Obsługi Klienta</a>.
</p>
{/block}

View File

@@ -0,0 +1,45 @@
{extends file='page.tpl'}
{block name="page_content"}
{if $status == 'false'}
<p class="warning">
Zrezygnowałes z otrzymania kredytu ratalnego.
</p>
{else}
<p>
<span style="font-size: 16px; font-weight: bold;">Dziękujemy za złożenie wniosku w Santander Consumer Bank.</span>
<br /><br /><br />
<span style="font-size: 16px;">Numer wniosku kredytowego: <b>{$wniosekId}</b></span>.
<br /><br />
<span style="font-size: 16px;">Numer zamówienia w sklepie: <b>{$orderId}</b></span>.
<br /><br /><br />
<b>W przypadku pozytywnej wstępnej weryfikacji oczekuj na kontakt telefoniczny z konsultantem Santander.</b>
<br /><br />
Podczas rozmowy telefonicznej sporządzi razem z Toba umowę ratalna.
<br /><br />
<b>Przygotuj: dowód osobisty oraz drugi dokument tożsamosci.</b>
<br /><br />
Kiedy tylko otrzymamy informację o otrzymaniu płatności będziesz mógł śledzić stan swojego zamówienia w sekcji "Moje konto".
</p>
{/if}
{/block}

View File

@@ -0,0 +1,8 @@
{extends file='page.tpl'}
{block name="page_content"}
<h1>test</h1>
<p>
{$test}
</p>
{/block}

View File

@@ -0,0 +1,92 @@
<section id="ehp" class="box">
<h2>Płatność w systemie eRaty - status wniosku kredytowego</h2>
<div id="applicationNextTry" style="margin:auto;width:100%;text-align:center;">
<p>{$ehpMessage}</p>
<p><a href="{$userDoc}">Finansowanie zakupu kredytem ratalnym - instrukcja</a></p>
</div>
<div class="row" style="margin-bottom:10px;">
<div class="col-md-6 left-column" style="padding-bottom:2px;">
<input type="text" name="refreshCommand" id="refreshCommand" style="display:none;" value="{$refreshCommand}">
<input type="text" name="ehp_id_order" id="ehp_id_order" style="display:none;" value="{$id_order}">
<button id="refreshBtn" class="btn btn-primary" onclick="ehpStateRefresh();">Odśwież informację z Banku</button>
<img src="{$module_dir|escape:'html':'UTF-8'}views/img/busy.gif" id="busy" style="visibility:hidden;"/>
</div>
<div class="col-md-6 right-column" style="text-align:right;padding-bottom:2px;">
<form name="ehpCreditForm" id="ehpCreditForm" action="{$applicationURL}" method="post">
{assign var='nr' value='0'}
{foreach from=$products item=product}
{$nr = $nr + 1}
<input name="idTowaru{$nr}" readonly="readonly" type="hidden" value="{$product['product_id']}" />
<input name="nazwaTowaru{$nr}" readonly="readonly" type="hidden" value="{$product['product_name']}" />
<input name="wartoscTowaru{$nr}" readonly="readonly" type="hidden" value="{round($product['unit_price_tax_incl'], 2)}" />
<input name="liczbaSztukTowaru{$nr}" readonly="readonly" type="hidden" value="{$product['product_quantity']}" />
<input name="jednostkaTowaru{$nr}" readonly="readonly" type="hidden" value="szt" />
{/foreach}
{if $shipping gt 0}
{$nr = $nr + 1}
<input type="hidden" name="idTowaru{$nr}" readonly="readonly" value="KosztPrzesylki" />
<input type="hidden" name="nazwaTowaru{$nr}" readonly="readonly" value="Koszt przesyłki" />
<input type="hidden" name="wartoscTowaru{$nr}" readonly="readonly" value="{$shipping}" />
<input type="hidden" name="liczbaSztukTowaru{$nr}" readonly="readonly" value="1" />
<input type="hidden" name="jednostkaTowaru{$nr}" readonly="readonly" value="szt" />'
{/if}
<input type="hidden" name="liczbaSztukTowarow" value="{$nr}" />
<input type="hidden" name="typProduktu" value="0" />
<input type="hidden" name="wariantSklepu" value="1" />
<input type="hidden" name="nrZamowieniaSklep" value="{$orderId}" id="orderId"/>
<input type="hidden" name="wartoscTowarow" value="{$totalOrder}" />
<input type="hidden" name="pesel" value="" />
<input type="hidden" name="imie" value="{$imie}" />
<input type="hidden" name="nazwisko" value="{$nazwisko}" />
<input type="hidden" name="email" value="{$email}" />
<input type="hidden" name="telKontakt" value="{$telKontakt}" />
<input type="hidden" name="ulica" value="{$ulica}" />
<input type="hidden" name="nrDomu" value="{$ulica2}" />
<input type="hidden" name="nrMieszkania" value="" />
<input type="hidden" name="miasto" value="{$miasto}" />
<input type="hidden" name="kodPocz" value="{$kodPocz}" />
<input type="hidden" name="char" value="UTF" />
<input type="hidden" name="numerSklepu" value="{$shopId}" />
<input type="hidden" name="shopName" value="{$shopName}" />
<input type="hidden" name="shopHttp" value="{$shopHttp}" />
<input type="hidden" name="wniosekZapisany" value="{$returnTrue}" />
<input type="hidden" name="wniosekAnulowany" value="{$returnFalse}" />
<input type="hidden" name="shopMailAdress" value="{$shopMailAdress}" />
<input type="hidden" name="shopPhone" value="{$shopPhone}" />
<button type="submit" class="btn btn-primary" {$sendApplicationDisabled}>{$backToApp_sendApp}</button>
</form>
</div>
</div>
<div class="row">
<div class="col-md-4 left-column">
<p class="mb-1"><strong>POSApplicationNumber:</strong></p>
<p class="mb-1">{$application->ShopApplicationNumber}</p>
<p class="mb-1"><strong>Numer wniosku:</strong></p>
<p class="mb-1">{$application->ApplicationNumber}</p>
<p class="mb-1"><strong>Status wniosku:</strong></p>
<p class="mb-1">{$application->CreditState}</p>
<p class="mb-1"><strong>Data statusu:</strong></p>
<p class="mb-1">{$application->ChangeDate}</p>
</div>
<div class="col-md-4 right-column">
<p class="mb-1"><strong>Numer umowy:</strong></p>
<p class="mb-1">{$application->AgreementNumber}</p>
<p class="mb-1"><strong>Data umowy:</strong></p>
<p class="mb-1">{$application->AgreementDate}</p>
</div>
<div class="col-md-4 right-column">
<p class="mb-1"><strong>Wplata własna:</strong></p>
<p class="mb-1">{$application->Downpayment}</p>
<p class="mb-1"><strong>Cena całokwita:</strong></p>
<p class="mb-1">{$application->TotalPrice}</p>
<p class="mb-1"><strong>Numer Sklepu:</strong></p>
<p class="mb-1">{$application->ShopNumber}</p>
</div>
</div>
</section>

View File

@@ -0,0 +1,17 @@
<div class="mt-2">
<!-- Nav tabs -->
<ul class="nav nav nav-tabs d-print-none " role="tablist">
<li class="nav-item">
<a class="nav-link active show" href="#details" role="tab" data-toggle="tab">eHP - status wniosku kredytowego</a>
</li>
<li class="nav-item">
<a class="nav-link show" href="#ehplog" role="tab" data-toggle="tab">eHP log</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="details">{include file='./ehpDisplayDetails.tpl'}</div>
<div class="tab-pane" id="ehplog">{include file='./ehpDisplayLog.tpl'}</div>
</div>
</div>

View File

@@ -0,0 +1,42 @@
<div class="panel card" style="padding-left:10px;padding-right:10px;">
<div class="row">
<div class="col-xxl-4 text-xxl-left">
<input type="text" name="refreshCommand" id="refreshCommand" style="display:none;" value="{$refreshCommand}">
<input type="text" name="id_order" id="id_order" style="display:none;" value="{$id_order}">
<div style="padding-top:10px;padding-bottom:10px;"><button class="btn btn-primary" id="refreshBtn">Pobierz informacje z Banku</button></div>
<img src="{$module_dir|escape:'html':'UTF-8'}views/img/busy.gif" id="busy" style="visibility:hidden;"/>
</div>
<div class="col-xxl-4 text-xxl-left">&nbsp;</div>
<div class="col-xxl-4 text-xxl-left">
<div style="padding-top:10px;padding-bottom:10px;"><a href="{$instrukcja}">Instrukcja obsługi eHP</a></div>
</div>
</div>
<div class="row">
<div class="col-md-4 left-column">
<p class="mb-1"><strong>POSApplicationNumber:</strong></p>
<p class="mb-1">{$fullAppInfo->ShopApplicationNumber}</p>
<p class="mb-1"><strong>Numer wniosku:</strong></p>
<p class="mb-1">{$fullAppInfo->ApplicationNumber}</p>
<p class="mb-1"><strong>Status wniosku:</strong></p>
<p class="mb-1">{$fullAppInfo->CreditState}</p>
<p class="mb-1"><strong>Data statusu:</strong></p>
<p class="mb-1">{$fullAppInfo->ChangeDate}</p>
</div>
<div class="col-md-4 right-column">
<p class="mb-1"><strong>Numer umowy:</strong></p>
<p class="mb-1">{$fullAppInfo->AgreementNumber}</p>
<p class="mb-1"><strong>Data umowy:</strong></p>
<p class="mb-1">{$fullAppInfo->AgreementDate}</p>
</div>
<div class="col-md-4 right-column">
<p class="mb-1"><strong>Wplata własna:</strong></p>
<p class="mb-1" id="downpaymentEhp">{$fullAppInfo->Downpayment}</p>
<p class="mb-1"><strong>Cena całkowita:</strong></p>
<p class="mb-1">{$fullAppInfo->TotalPrice}</p>
<p class="mb-1"><strong>Numer Sklepu:</strong></p>
<p class="mb-1">{$fullAppInfo->ShopNumber}</p>
</div>
</div>
</div>

View File

@@ -0,0 +1,51 @@
<div class="panel">
<div class="row">
<div class="col-md-12 d-print-block left-column">
<div class="panel card mt-2" style="text-align:left;">
<div class="card-header">
<h3 class="card-header-title">Log komunikacji z systemem bankowym:</h3>
</div>
<div class="card-body" style="text-align:right;overflow: scroll; padding-right:6px;">
<table class="table" style="margin-right:6px; matgin-left:auto;">
<thead>
<tr>
<th class="table-head-date">request_date</th>
<th>success</th>
<th>shop_number</th>
<th>id_order</th>
<th>pos_app_number</th>
<th>application_number</th>
<th>application_status</th>
<th>app_status_chg_date</th>
<th>agreement_number</th>
<th>agreement_date</th>
<th>message</th>
<th>downpayment</th>
<th>total_price</th>
</tr>
</thead>
<tbody>
{foreach from=$log item=row}
<tr>
<td>{$row['request_date']}</td>
<td>{$row['success']}</td>
<td>{$row['shop_number']}</td>
<td>{$row['id_order']}</td>
<td>{$row['pos_app_number']}</td>
<td>{$row['application_number']}</td>
<td>{$row['application_status']}</td>
<td>{$row['app_status_chg_date']}</td>
<td>{$row['agreement_number']}</td>
<td>{$row['agreement_date']}</td>
<td><textarea cols="20" rows="3">{$row['message']}</textarea>
<td>{$row['downpayment']}</td>
<td>{$row['total_price']}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,106 @@
{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel">
<div class="row">
<div class="col-md-4 left-column"><img src="../modules/santandercredit/views/img/logo_254x83.png" style="float:left; margin-right:15px;"></div>
<div class="col-md-8 right-column" style="text-align:right;">
<a id="docDnldBtn" href="{$scbEhpDocUrl}">
<button class="btn ">Dokumentacja dla Klienta</button>
</a>
<a id="docDnldBtn" href="{$scbEhpSlsDocUrl}">
<button class="btn ">Dokumentacja dla Sprzedawcy</button>
</a>
<a id="docDnldBtn" href="{$scbEhpAdmDocUrl}">
<button class="btn ">Dokumentacja dla Administratora</button>
</a>
</div>
</div>
<form>
<input type="hidden" name="EHP_DEF_URL_SYMULATOR" id="EHP_DEF_URL_SYMULATOR" value="{$EHP_DEF_URL_SYMULATOR}" />
<input type="hidden" name="EHP_DEF_URL_WNIOSEK" id="EHP_DEF_URL_WNIOSEK" value="{$EHP_DEF_URL_WNIOSEK}" />
<input type="hidden" name="EHP_DEF_SVC_LOCATION" id="EHP_DEF_SVC_LOCATION" value="{$EHP_DEF_SVC_LOCATION}" />
<input type="hidden" name="EHP_DEF_QTY_QUERY" id="EHP_DEF_QTY_QUERY" value="{$EHP_DEF_QTY_QUERY}" />
<input type="hidden" name="EHP_DEF_PRICE_QUERY" id="EHP_DEF_PRICE_QUERY" value="{$EHP_DEF_PRICE_QUERY}" />
<input type="hidden" name="EHP_CURRENT_URL_SYMULATOR" id="EHP_CURRENT_URL_SYMULATOR" value="{$EHP_CURRENT_URL_SYMULATOR}" />
<input type="hidden" name="EHP_CURRENT_URL_WNIOSEK" id="EHP_CURRENT_URL_WNIOSEK" value="{$EHP_CURRENT_URL_WNIOSEK}" />
<input type="hidden" name="EHP_CURRENT_SVC_LOCATION" id="EHP_CURRENT_SVC_LOCATION" value="{$EHP_CURRENT_SVC_LOCATION}" />
<input type="hidden" name="EHP_CURRENT_QTY_QUERY" id="EHP_CURRENT_QTY_QUERY" value="{$EHP_CURRENT_QTY_QUERY}" />
<input type="hidden" name="EHP_CURRENT_PRICE_QUERY" id="EHP_CURRENT_PRICE_QUERY" value="{$EHP_CURRENT_PRICE_QUERY}" />
</form>
</div>
<!-- The Modal -->
<div id="pshPassModal" class="ehp-modal">
<!-- Modal content -->
<div class="ehp-modal-content">
<header style="vertical-align: top">
<div style="padding-bottom: 10px" class="ehp-close" onclick="document.getElementById('pshPassModal').style.display = 'none';">&times;</div>
<div style="padding-bottom:10px">Zmiana hasła do usługi ProposalServiceHybrid</div>
</header>
<div>
<div style="display:inline-block">
<div>Hasło</div>
<div><input type="password" value="" id="pshPass1"></div>
</div>
<div style="display:inline-block">
<div>Powtórz Hasło</div>
<div><input type="password" value="" id="pshPass2"></div>
</div>
<div style="display:inline-block">
<input type="button" class="btn" value="Anuluj" onclick="document.getElementById('pshPassModal').style.display = 'none';">
</div>
<div style="display:inline-block">
<input type="button" class="btn" value="Zapisz" id='pshPassSaveBtn'>
</div>
</div>
</div>
</div>
<!-- The Modal for PSH test-->
<div id="pshTestModal" class="ehp-modal">
<!-- Modal content -->
<div class="ehp-modal-content">
<header style="vertical-align: top">
<div style="padding-bottom: 10px" class="ehp-close" onclick="document.getElementById('pshTestModal').style.display = 'none';">&times;</div>
<div style="padding-bottom:10px">Test połączenia z usługą ProposalServiceHybrid</div>
</header>
<div>
<p id="pshTestResult">Trwa weryfikacja połączenia...</p>
<div style="display:inline-block">
<input type="button" class="btn" value="Zamknij" onclick="document.getElementById('pshTestModal').style.display = 'none';">
</div>
</div>
<input type="hidden" id="pshLoginChckCommand" value="{$pshLoginChckCommand}" />
<input type="hidden" id="pshIsActiveCommand" value="{$pshIsActiveCommand}" />
</div>
</div>

View File

@@ -0,0 +1,115 @@
{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel">
<div class="panel-heading">
<i class="icon-cogs"></i>
Uwaga:
</div>
<p id="qvalid_msg">
<span style="color:red; font-weight: bold;">Wykryto problem w parametrach QTY_QUERY i/lub PRICE_QUERY!
Zapoznaj się z dokumentacją i <a href="#" style="color:red;font-size:large">obejrzyj film instruktażowy</a></SPAN>
<br/>
<span style="color:red;">
Do czasu rozwiązania problemu zalecamy przywrócenie wartości domyślnych. Można też ustawić "Potwierdzaj dane do symulacji" na TAK.
</span>
</p>
<p style="text-align: center;">Konfigurację osadzania widgetu wywołującego symulator rat na stronie sklepu należy wykonywać bardzo ostrożnie. W szczególności chodzi o parametry QTY_QUERY oraz
PRICE_QUERY. W założeniu są to funkcje jQuery pozwalające na odczyt aktualnej wartości ceny jednostkowej oraz ilości towaru z aktualnie wyświetlanej strony
produktu. Jeśli są skonfigurowane poprawnie - mamy gwarancję że do symulatora wysłana zostanie kwota uwzględnijąca aktualnie ustawioną przez klienta ilość towaru.
Jeśli moduł stwierdzi że nie jest w stanie odnaleźć ceny i ilości na stronie - wyśle do symulatora kwotę wynikającą z ceny jednostkowej i minimalnej
ilości towaru określonej dla danego produktu w parametrach sklepu. Domyślnie, parametry QTY_QUERY i PRICE_QUERY są zgodne z defaultowym templatem PrestaShop.
Jeśli Twój template zachowuje zgodnosć z defaultowym - nie trzeba nic zmieniać. Wskazane jest by zmian tych parametrów dokonywała osoba znająca bibliotekę jQuery.
Jeśli nie jesteś w stanie poprawnie skonfigurować QTY_QUERY i PRICE_QUERY, możesz
użyć opcji "Potwierdzaj dane do symulacji". Zostanie wtedy wyświetlony dodatkowy dialog który pozwoli Klientowi ustawić właściwą ilość towaru.
Parametry te należy weryfikować po każdej zmianie szablonu wykorzystywanego w Sklepie. Jest to zadanie Webmastera/Administratora instancji PrestaShop.
Zanim zaczniesz modyfikować QTY_QUERY i PRICE_QUERY zapoznaj się z <a id="docDnldBtn" href="{$scbEhpAdmDocUrl}">dokumentacją.</a>
</p>
</div>
</div>
<script type="text/javascript">
{$quantityFn nofilter}
{$priceFn nofilter}
function testQueries(quantity, price) {
let pmessage = document.getElementById('qvalid_msg');
let qq = $('#EHP_CURRENT_QTY_QUERY').val();
let qp = $('#EHP_CURRENT_PRICE_QUERY').val();
let isOk = 1;
//start z dolara
if(!(qq.charAt(0) == '$')) {
isOk = isOk - 1;
};
if(!(qp.charAt(0) == '$')) {
isOk = isOk - 1;
};
//liczba nawiasow lewych == liczba nawiasow prawych
if(!(qq.split('(').length == qq.split(')').length)) {
isOk = isOk - 1;
};
if(!(qp.split('(').length == qp.split(')').length)) {
isOk = isOk - 1;
};
//parzysta ilość apostrofów
if((qq.split("'").length % 2) == 0) {
isOk = isOk - 1;
};
if((qp.split("'").length % 2) == 0) {
isOk = isOk - 1;
};
//parzysta ilość cudzysłowów
if((qq.split('"').length % 2) == 0) {
isOk = isOk - 1;
};
if((qp.split('"').length % 2) == 0) {
isOk = isOk - 1;
};
// max liczba średników = 1 i średnik na ostatnim miejscu
if(qq.indexOf(';') >= 0) {
if(!(qq.indexOf(';') == qq.lastIndexOf(';'))) {
isOk = isOk -1;
};
}
if(qp.indexOf(';') >= 0) {
if(!(qp.indexOf(';') == qp.lastIndexOf(';'))) {
isOk = isOk -1;
};
}
if(isOk == 1) {
pmessage.style.display = "none";
}
}
testQueries(ehpGetPquantity(), ehpGetPprice());
</script>

View File

@@ -0,0 +1,20 @@
<section>
<h3>{l s='Zakupy na raty z systemem eRaty Santander Consumer Bank' mod='santandercredit'}</h3>
<p>
Całkowita wartość Twojego zamówienia wynosi <span style="color: #ff0000;" class="bold">{$totalOrderC}</span>
</p>
<p>
Przed złożeniem wniosku możesz zapoznać się z procedurą udzielenia kredytu ratalnego oraz obliczyć raty.
</p>
<p>
<a href="https://www.santanderconsumer.pl/raty-jak-kupic" target="_blank">
<img src="{$imgDir}/jakKupicSmall.png" style="cursor: pointer; float: left;" title="Zapoznaj się z procedurą" alt="Zapoznaj się z procedurą" border="0" />
</a>
<!--default part href="https://wniosek.eraty.pl/symulator/oblicz/" (with backslash at the end)-->
<a href="{$symulatorURL}numerSklepu/{$shopId}/wariantSklepu/1/typProduktu/0/wartoscTowarow/{$totalOrder}/" target="_blank">
<img src="{$imgDir}/obliczRate.png" style="cursor: pointer; float: right;" title="Oblicz ratę" alt="Oblicz ratę" border="0" />
</a>
</p>
<div style="clear: both"></div>
</section>

View File

@@ -0,0 +1,59 @@
<h2 style="margin-left: auto; margin-right: auto; color:red; text-align: center;">{l s='Zakupy na raty z systemem eRaty Santander Consumer Bank' mod='santandercredit'}</h2>
<div style="margin-left: auto; margin-right: auto; margin-bottom: 3em; color:red; text-align: center;">Złóż wniosek o kredyt ratalny aby sfinalizowac płatność.</div>
<!--default action="https://wniosek.eraty.pl/formularz/" (with backslash at the end)-->
<form name="santanderCreditForm" id="santanderCreditForm" action="{$applicationURL}" method="post">
{assign var='nr' value='0'}
{foreach from=$products item=product}
{$nr = $nr + 1}
<input name="idTowaru{$nr}" readonly="readonly" type="hidden" value="{$product['id_product']}" />
<input name="nazwaTowaru{$nr}" readonly="readonly" type="hidden" value="{$product['name']}" />
<input name="wartoscTowaru{$nr}" readonly="readonly" type="hidden" value="{round($product['price_wt'], 2)}" />
<input name="liczbaSztukTowaru{$nr}" readonly="readonly" type="hidden" value="{$product['quantity']}" />
<input name="jednostkaTowaru{$nr}" readonly="readonly" type="hidden" value="szt" />
{/foreach}
{if $shipping gt 0}
{$nr = $nr + 1}
<input type="hidden" name="idTowaru{$nr}" readonly="readonly" value="KosztPrzesylki" />
<input type="hidden" name="nazwaTowaru{$nr}" readonly="readonly" value="Koszt przesyłki" />
<input type="hidden" name="wartoscTowaru{$nr}" readonly="readonly" value="{$shipping}" />
<input type="hidden" name="liczbaSztukTowaru{$nr}" readonly="readonly" value="1" />
<input type="hidden" name="jednostkaTowaru{$nr}" readonly="readonly" value="szt" />'
{/if}
<input type="hidden" name="liczbaSztukTowarow" value="{$nr}" />
<input type="hidden" name="typProduktu" value="0" />
<input type="hidden" name="wariantSklepu" value="1" />
<input type="hidden" name="nrZamowieniaSklep" value="{$orderId}" id="orderId"/>
<input type="hidden" name="wartoscTowarow" value="{$totalOrder}" />
<input type="hidden" name="action" value="getklientdet_si" />
<input type="hidden" name="pesel" value="" />
<input type="hidden" name="imie" value="{$imie}" />
<input type="hidden" name="nazwisko" value="{$nazwisko}" />
<input type="hidden" name="email" value="{$email}" />
<input type="hidden" name="telKontakt" value="{$telKontakt}" />
<input type="hidden" name="ulica" value="{$ulica}" />
<input type="hidden" name="nrDomu" value="{$ulica2}" />
<input type="hidden" name="nrMieszkania" value="" />
<input type="hidden" name="miasto" value="{$miasto}" />
<input type="hidden" name="kodPocz" value="{$kodPocz}" />
<input type="hidden" name="char" value="UTF" />
<input type="hidden" name="numerSklepu" value="{$shopId}" />
<input type="hidden" name="shopName" value="{$shopName}" />
<input type="hidden" name="shopHttp" value="{$shopHttp}" />
<input type="hidden" name="wniosekZapisany" value="{$returnTrue}" />
<input type="hidden" name="wniosekAnulowany" value="{$returnFalse}" />
<input type="hidden" name="shopMailAdress" value="{$shopMailAdress}" />
<input type="hidden" name="shopPhone" value="{$shopPhone}" />
<p style="text-align:center;">
<input type="submit" id="scbSubmitBtn" name="submit" value="{l s='Opłać zamówienie - złóż wniosek' mod='santandercredit'}" class="btn btn-primary center-block"/>
</p>
</form>

View File

@@ -0,0 +1,44 @@
<script type="text/javascript">
{$quantityFn nofilter}
{$priceFn nofilter}
</script>
<!-- The Modal -->
<div id="simInputModal" class="ehp-modal">
<!-- Modal content -->
<div class="ehp-modal-content">
<header style="vertical-align: top">
<div style="padding-bottom: 10px" class="ehp-close" onclick="document.getElementById('simInputModal').style.display = 'none';">&times;</div>
<div style="padding-bottom:10px">Dane wejściowe dla symulatora rat</div>
</header>
<div>
<div style="display:inline-block">
<div>cena jednostkowa</div>
<div><input type="number" value="1234" id="ehpModalPrice"></div>
</div>
<div style="display:inline-block">
<div>ilość jednostek</div>
<div><input type="number" value="1234" id="ehpModalQuantity"></div>
</div>
<div style="display:inline-block">
<input type="button" value="Oblicz ratę" onclick="ehpSimRequest('{$shopId}', '{$symulatorURL}', ehpCalcOrderPrice($('#ehpModalPrice').val(), $('#ehpModalQuantity').val()))">
</div>
</div>
</div>
</div>
<!--<div style="text-align:right;"> -->
<p id="eraty" class="buttons_bottom_block" >
<a onClick="simulationEhp({$displaySimInputModal},'{$shopId}', '{$symulatorURL}', ehpGetPquantity(), ehpGetPprice());" title="Kupuj na eRaty Santander Consumer Banku!" align="right" style="cursor: pointer;">
<img src="{$module_dir}views/img/obliczRate.png" alt="Oblicz ratę!"/>
</a>
<div style="position:absolute;visibility:hidden" id="scb_quantity">{$scb_quantity}</div>
<div style="position:absolute;visibility:hidden" id="scb_price">{$santanderCreditProductPrice}</div>
</p>
<!--</div>-->

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;