first commit

This commit is contained in:
2024-11-11 18:46:54 +01:00
commit a630d17338
25634 changed files with 4923715 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from SARL 202 ecommence
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL 202 ecommence is strictly forbidden.
* In order to obtain a license, please contact us: tech@202-ecommerce.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe 202 ecommence
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la SARL 202 ecommence est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter 202-ecommerce <tech@202-ecommerce.com>
* ...........................................................................
*
* @author 202-ecommerce <tech@202-ecommerce.com>
* @copyright Copyright (c) 202-ecommerce
* @license Commercial license
*/
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,51 @@
{*
* 2007-2020 PayPal
*
* 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 2007-2020 PayPal
* @author 202 ecommerce <tech@202-ecommerce.com>
* @copyright PayPal
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*
*}
{extends 'module:paypal/views/templates/shortcut/shortcut-layout.tpl'}
{block name='content'}
<style>
[data-container-express-checkout] {
margin: 10px 0;
display: flex;
justify-content: center;
}
.cart-grid-body [data-container-express-checkout] {
justify-content: flex-end;
}
</style>
<div data-container-express-checkout data-paypal-source-page="cart">
<form data-paypal-payment-form-cart class="paypal_payment_form" action="{$action_url|escape:'htmlall':'UTF-8'}" title="{l s='Pay with PayPal' mod='paypal'}" method="post" data-ajax="false">
<input type="hidden" name="express_checkout" value="{$PayPal_payment_type|escape:'htmlall':'UTF-8'}"/>
<input type="hidden" name="current_shop_url" data-paypal-url-page value="" />
<input type="hidden" id="source_page" name="source_page" value="cart">
</form>
<div paypal-button-container></div>
</div>
<div class="clearfix"></div>
{/block}

View File

@@ -0,0 +1,73 @@
{*
* 2007-2020 PayPal
*
* 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 2007-2020 PayPal
* @author 202 ecommerce <tech@202-ecommerce.com>
* @copyright PayPal
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*
*}
<!-- Start shortcut. Module Paypal -->
{block name='head'}
<script>
{foreach from=$JSvars key=varName item=varValue}
var {$varName} = {$varValue|json_encode nofilter};
{/foreach}
</script>
{/block}
{block name='content'}{/block}
{block name='js'}
{if isset($JSscripts) && is_array($JSscripts) && false === empty($JSscripts)}
{foreach from=$JSscripts key=keyScript item=JSscript}
<script>
var script = document.querySelector('script[data-key="{$keyScript}"]');
if (null == script) {
var newScript = document.createElement('script');
newScript.setAttribute('src', '{$JSscript nofilter}');
newScript.setAttribute('data-key', '{$keyScript}');
document.body.appendChild(newScript);
}
</script>
{/foreach}
{/if}
{/block}
{block name='init-button'}
<script>
function waitPaypalIsLoaded() {
if (typeof paypal === 'undefined' || typeof Shortcut === 'undefined') {
setTimeout(waitPaypalIsLoaded, 200);
return;
}
Shortcut.init();
Shortcut.initButton();
}
waitPaypalIsLoaded();
</script>
{/block}
<!-- End shortcut. Module Paypal -->

View File

@@ -0,0 +1,62 @@
{*
* 2007-2020 PayPal
*
* 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 2007-2020 PayPal
* @author 202 ecommerce <tech@202-ecommerce.com>
* @copyright PayPal
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*
*}
{extends file='./shortcut-layout.tpl'}
{block name='content'}
<div preview-button-container {if isset($shortcutID)} data-id="{$shortcutID}" {/if}></div>
{/block}
{block name='init-button'}
<script>
{literal}
// Wrap a logic in a function init() for to avoid the redefining the variables
function init () {
var btnStyle = {/literal}{$styleSetting|json_encode nofilter}{literal};
var selector = '[preview-button-container]{/literal}{if isset($shortcutID)}[data-id="{$shortcutID}"]{/if}{literal}';
function waitPaypalIsLoaded() {
if (typeof paypal === 'undefined') {
setTimeout(waitPaypalIsLoaded, 200);
return;
}
document.querySelector(selector).style.width = btnStyle['width'] + 'px';
paypal.Buttons({
fundingSource: paypal.FUNDING.PAYPAL,
style: btnStyle
}).render(document.querySelector(selector));
}
waitPaypalIsLoaded();
}
init();
{/literal}
</script>
{/block}

View File

@@ -0,0 +1,58 @@
{*
* 2007-2020 PayPal
*
* 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 2007-2020 PayPal
* @author 202 ecommerce <tech@202-ecommerce.com>
* @copyright PayPal
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*
*}
{extends 'module:paypal/views/templates/shortcut/shortcut-layout.tpl'}
{block name='content'}
<style>
.product-quantity {
flex-wrap: wrap;
}
.product-quantity [data-container-express-checkout] {
flex-basis: 100%;
}
</style>
<div data-container-express-checkout data-paypal-source-page="product" style="float:right; margin: 10px 40px 0 0;">
<form data-paypal-payment-form-cart class="paypal_payment_form" action="{$action_url|escape:'htmlall':'UTF-8'}" title="{l s='Pay with PayPal' mod='paypal'}" method="post" data-ajax="false">
<input
type="hidden"
name="id_product"
data-paypal-id-product
value="{$paypalIdProduct|escape:'htmlall':'UTF-8'}"
/>
<input type="hidden" name="quantity" data-paypal-qty value=""/>
<input type="hidden" name="combination" data-paypal-combination value="" />
<input type="hidden" data-paypal-id-product-attribute value="{$es_cs_product_attribute|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="express_checkout" value="{$PayPal_payment_type|escape:'htmlall':'UTF-8'}"/>
<input type="hidden" name="current_shop_url" data-paypal-url-page value="" />
<input type="hidden" id="source_page" name="source_page" value="product">
</form>
<div paypal-button-container></div>
</div>
<div class="clearfix"></div>
{/block}

View File

@@ -0,0 +1,43 @@
{*
* 2007-2020 PayPal
*
* 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 2007-2020 PayPal
* @author 202 ecommerce <tech@202-ecommerce.com>
* @copyright PayPal
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*
*}
{extends 'module:paypal/views/templates/shortcut/shortcut-cart.tpl'}
{block name='content'}
<div paypal-shortcut-signup style="display: flex;">
{$smarty.block.parent}
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
var shortcut = document.querySelector('[paypal-shortcut-signup]');
var signupForm = document.querySelector('#checkout-personal-information-step .content');
signupForm.insertBefore(shortcut, signupForm.childNodes[0]);
});
</script>
{/block}