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,6 @@
drwxr-xr-x 5 30094 users 6 Oct 6 10:16 .
drwxr-xr-x 4 30094 users 9 Oct 6 10:16 ..
drwxr-xr-x 2 30094 users 4 Oct 6 10:16 css
-rw-r--r-- 1 30094 users 0 Sep 8 12:24 index.php
drwxr-xr-x 2 30094 users 4 Oct 6 10:16 js
drwxr-xr-x 4 30094 users 5 Oct 6 10:16 templates

View File

@@ -0,0 +1,4 @@
drwxr-xr-x 2 30094 users 4 Oct 6 10:16 .
drwxr-xr-x 5 30094 users 6 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 0 Sep 8 12:24 index.php
-rw-r--r-- 1 30094 users 652 Sep 8 12:24 style.css

View File

@@ -0,0 +1,32 @@
.bootstrap.panel{
width:100%;
float:left;
}
.form_config .control-label{
text-align:right;
margin-top:4px;
}
.form_config .panel-footer{
display: block;
float: left;
width: 100%;
margin: 0 !important;
background:none !important;
border:0;
}
#content.bootstrap .form_config .ba_title_selection{
margin: 0px 0 15px !important;
width: 100% ;
float: left;
padding: 0;
}
.ba_title_selection{
margin: 0px 0 15px !important;
width: 100%;
float: left;
padding: 0;
}
#wrapperViewCodeAdword,#wrapperViewCodeFacebook{
display:none;
}
.bootstrap .alert.alert-danger:before{top:23px;}

View File

@@ -0,0 +1,4 @@
drwxr-xr-x 2 30094 users 4 Oct 6 10:16 .
drwxr-xr-x 5 30094 users 6 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 4751 Sep 8 12:24 admin.js
-rw-r--r-- 1 30094 users 0 Sep 8 12:24 index.php

View File

@@ -0,0 +1,87 @@
/**
* 2007-2020 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@buy-addons.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 Buy-addons <contact@buy-addons.com>
* @copyright 2007-2020 Buy-addons
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
jQuery(document).ready(function(){
jQuery('#btnTestYourCodeAdword').click(function(){
console.log('aaaaa');
var idAdword = jQuery('#idAdword').val();
var LabelAdword = jQuery('#LabelAdword').val();
var languageDefault = jQuery('#languageDefault').val();
var currencyDefault = jQuery('#currencyDefault').val();
var codeAword = encodeHtmlEntity('<!-- Google Code for code1 Conversion Page -->')+'<br />';
codeAword+=encodeHtmlEntity('<script type="text/javascript">')+'<br />';
codeAword+=encodeHtmlEntity('/* <![CDATA[ */')+'<br />';
codeAword+='var google_conversion_id = '+idAdword+';<br />';
codeAword+='var google_conversion_language = "'+languageDefault+'";<br />';
codeAword+='var google_conversion_format = "3";<br />';
codeAword+='var google_conversion_color = "ffffff";<br />';
codeAword+='var google_conversion_label = "'+LabelAdword+'";<br />';
codeAword+='var google_conversion_value = 1.00;<br/>';
codeAword+='var google_conversion_currency = "'+currencyDefault+'";<br />';
codeAword+='var google_remarketing_only = false;<br />';
codeAword+='/* ]]> */<br/>';
codeAword+=encodeHtmlEntity('</script>')+'<br />';
codeAword+=encodeHtmlEntity('<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">');
codeAword+=encodeHtmlEntity('</script>')+'<br />';
codeAword+=encodeHtmlEntity('<noscript>')+'<br />';
codeAword+=encodeHtmlEntity('<div style="display:inline;">')+'<br />';
codeAword+=encodeHtmlEntity('<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/'+idAdword+'/?value=1.00&amp;currency_code='+currencyDefault+'&amp;label='+LabelAdword+'&amp;guid=ON&amp;script=0"/>')+'<br />';
codeAword+=encodeHtmlEntity('</div>')+'<br />';
codeAword+=encodeHtmlEntity('</noscript>');
jQuery('#wrapperViewCodeAdword').show();
jQuery('#viewCodeAdword').html(codeAword);
});
jQuery('#btnTestYourCodeFacebook').click(function(){
var idFacebook = jQuery('#facebookId').val();
var codeFacebook = encodeHtmlEntity("<!-- Facebook Pixel Code -->")+"<br/>";
codeFacebook += encodeHtmlEntity("<script>")+"<br/>";
codeFacebook += encodeHtmlEntity(" !function(f,b,e,v,n,t,s)")+"<br/>";
codeFacebook += encodeHtmlEntity(" {if(f.fbq)return;n=f.fbq=function(){n.callMethod?")+"<br/>";
codeFacebook += encodeHtmlEntity(" n.callMethod.apply(n,arguments):n.queue.push(arguments)};")+"<br/>";
codeFacebook += encodeHtmlEntity(" if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';")+"<br/>";
codeFacebook += encodeHtmlEntity(" n.queue=[];t=b.createElement(e);t.async=!0;")+"<br/>";
codeFacebook += encodeHtmlEntity(" t.src=v;s=b.getElementsByTagName(e)[0];")+"<br/>";
codeFacebook += encodeHtmlEntity(" s.parentNode.insertBefore(t,s)}(window, document,'script',")+"<br/>";
codeFacebook += encodeHtmlEntity(" 'https://connect.facebook.net/en_US/fbevents.js');")+"<br/>";
codeFacebook += encodeHtmlEntity(" fbq('init', '"+idFacebook+"');")+"<br/>";
codeFacebook += encodeHtmlEntity(" fbq('track', 'PageView');")+"<br/>";
codeFacebook += encodeHtmlEntity("</script>")+"<br/>";
codeFacebook += encodeHtmlEntity('<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id='+idFacebook+'&ev=PageView&noscript=1"/></noscript>')+"<br/>";
codeFacebook += encodeHtmlEntity('<!-- End Facebook Pixel Code -->');
jQuery('#wrapperViewCodeFacebook').show();
jQuery('#viewCodeFacebook').html(codeFacebook);
});
});
var encodeHtmlEntity = function(str) {
var buf = [];
for (var i=str.length-1;i>=0;i--) {
buf.unshift(['&#', str[i].charCodeAt(), ';'].join(''));
}
return buf.join('');
};

View File

@@ -0,0 +1,5 @@
drwxr-xr-x 4 30094 users 5 Oct 6 10:16 .
drwxr-xr-x 5 30094 users 6 Oct 6 10:16 ..
drwxr-xr-x 2 30094 users 4 Oct 6 10:16 admin
drwxr-xr-x 2 30094 users 5 Oct 6 10:16 front
-rw-r--r-- 1 30094 users 0 Sep 8 12:24 index.php

View File

@@ -0,0 +1,4 @@
drwxr-xr-x 2 30094 users 4 Oct 6 10:16 .
drwxr-xr-x 4 30094 users 5 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 6758 Sep 8 12:24 baecommercetracking.tpl
-rw-r--r-- 1 30094 users 0 Sep 8 12:24 index.php

View File

@@ -0,0 +1,135 @@
{*
* 2007-2020 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@buy-addons.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 Buy-addons <contact@buy-addons.com>
* @copyright 2007-2020 Buy-addons
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{if $demoMode=="1"}
<div class="bootstrap ba_error">
<div class="module_error alert alert-danger">
{l s='You are use ' mod='baecommercetracking'}
<strong>{l s='Demo Mode' mod='baecommercetracking'}</strong>
{l s=', so some buttons, functions will be disabled because of security. ' mod='baecommercetracking'}<br />
{l s='You can use them in Live mode after you puchase our module. ' mod='baecommercetracking'}<br />
{l s='Thanks !' mod='baecommercetracking'}
</div>
</div>
{/if}
<div class="bootstrap form_config">
<form action="" method="POST">
<input type="hidden" value="{$languageDefault|escape:'htmlall':'UTF-8'}" id="languageDefault"/>
<input type="hidden" value="{$currencyDefault|escape:'htmlall':'UTF-8'}" id="currencyDefault"/>
<div style="width: 100%;float: left;" class="panel">
<h3 style="margin-top:-16px !important;" class="ba_title_selection"><i class="icon-bar-chart"></i> {l s='Google Analytics' mod='baecommercetracking'}</h3>
<div class="col-md-12">
<lable class="col-md-3 control-label">{l s='Tracking ID' mod='baecommercetracking'}: </lable>
<div class="col-md-5">
<input type="text" name="baIdAnalytics" value="{$baIdAnalytics|escape:'htmlall':'UTF-8'}">
</div>
</div>
<div class="panel-footer">
<button type="submit" value="1" name="baCancel" class="btn btn-default pull-left">
<i class="process-icon-cancel"></i> {l s='Cancel' mod='baecommercetracking'}
</button>
<button type="submit" value="1" name="baSave" class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save' mod='baecommercetracking'}
</button>
<button type="submit" name="baSaveAndStay" class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save and stay' mod='baecommercetracking'}
</button>
</div>
</div>
<div style="width: 100%;float: left;" class="panel">
<h3 class="ba_title_selection"><i class="icon-bar-chart"></i> {l s='Google Adwords Conversion Tracking' mod='baecommercetracking'}</h3>
<div class="col-md-12" style="margin-bottom: 7px;">
<lable class="col-md-3 control-label">{l s='Add your Google Conversion Tracking ID' mod='baecommercetracking'}: </lable>
<div class="col-md-5">
<input id="idAdword" type="text" name="baIdAdwords" value="{$baIdAdwords|escape:'htmlall':'UTF-8'}">
</div>
</div>
<div class="col-md-12" style="margin-bottom: 7px;">
<lable class="col-md-3 control-label">{l s='Add your Google Conversion Tracking Label' mod='baecommercetracking'}: </lable>
<div class="col-md-5">
<input id="LabelAdword" type="text" name="baIdAdwordsLabel" value="{$baIdAdwordsLabel|escape:'htmlall':'UTF-8'}">
</div>
</div>
<div class="col-md-12" style="margin-bottom: 7px;">
<lable class="col-md-3 control-label">{l s='Test your code' mod='baecommercetracking'}: </lable>
<div class="col-md-5">
<input type="button" value="{l s='Click Here' mod='baecommercetracking'}" class="btn btn-info" id="btnTestYourCodeAdword">
</div>
</div>
<div class="col-md-12" style="margin-bottom: 7px;" id="wrapperViewCodeAdword">
<lable class="col-md-3 control-label">{l s='View Code' mod='baecommercetracking'}: </lable>
<div class="col-md-5">
<pre id="viewCodeAdword">
</pre>
</div>
</div>
<div class="panel-footer">
<button type="submit" value="1" name="baAdwordsCancel" class="btn btn-default pull-left">
<i class="process-icon-cancel"></i> {l s='Cancel' mod='baecommercetracking'}
</button>
<button type="submit" value="1" name="baAdwordsSave" class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save' mod='baecommercetracking'}
</button>
<button type="submit" name="baAdwordsSaveAndStay" class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save and stay' mod='baecommercetracking'}
</button>
</div>
</div>
<div style="width: 100%;float: left;" class="panel">
<h3 class="ba_title_selection"><i class="icon-bar-chart"></i> {l s='Facebook Pixel' mod='baecommercetracking'}</h3>
<div class="col-md-12" style="margin-bottom: 7px;">
<lable class="col-md-3 control-label">{l s='Facebook ID' mod='baecommercetracking'}: </lable>
<div class="col-md-5">
<input id="facebookId" type="text" name="facebookId" value="{$facebookId|escape:'htmlall':'UTF-8'}">
</div>
</div>
<div class="col-md-12" style="margin-bottom: 7px;">
<lable class="col-md-3 control-label">{l s='Test your code' mod='baecommercetracking'}: </lable>
<div class="col-md-5">
<input type="button" value="{l s='Click Here' mod='baecommercetracking'}" class="btn btn-info" id="btnTestYourCodeFacebook">
</div>
</div>
<div class="col-md-12" style="margin-bottom: 7px;" id="wrapperViewCodeFacebook">
<lable class="col-md-3 control-label">{l s='View Code' mod='baecommercetracking'}: </lable>
<div class="col-md-5">
<pre id="viewCodeFacebook">
</pre>
</div>
</div>
<div class="panel-footer">
<button type="submit" value="1" name="baFacebookCancel" class="btn btn-default pull-left">
<i class="process-icon-cancel"></i> {l s='Cancel' mod='baecommercetracking'}
</button>
<button type="submit" value="1" name="baFacebookSave" class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save' mod='baecommercetracking'}
</button>
<button type="submit" name="baFacebookSaveAndStay" class="btn btn-default pull-right">
<i class="process-icon-save"></i> {l s='Save and stay' mod='baecommercetracking'}
</button>
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,5 @@
drwxr-xr-x 2 30094 users 5 Oct 6 10:16 .
drwxr-xr-x 4 30094 users 5 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 4903 Sep 8 12:24 blockecommercetracking.tpl
-rw-r--r-- 1 30094 users 2641 Sep 8 12:24 blockecommercetracking2.tpl
-rw-r--r-- 1 30094 users 0 Sep 8 12:24 index.php

View File

@@ -0,0 +1,108 @@
{*
* 2007-2020 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@buy-addons.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 Buy-addons <contact@buy-addons.com>
* @copyright 2007-2020 Buy-addons
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<script>
{literal}
(
function(i,s,o,g,r,a,m)
{
i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)
},
i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
}
)(window,document,'script','//www.google-analytics.com/analytics.js','ga');
{/literal}
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
'id': '{$idOrder|escape:'htmlall':'UTF-8'}',
'affiliation': '{$PS_SHOP_NAME|escape:'htmlall':'UTF-8'}',
'revenue': '{$order->total_paid_tax_incl|escape:'htmlall':'UTF-8'}',
'shipping': '{$order->total_shipping_tax_incl|escape:'htmlall':'UTF-8'}',
'tax': '{$totalTax|escape:'htmlall':'UTF-8'}',
'currency': '{$currency_iso_code|escape:'htmlall':'UTF-8'}' // local currency code.
});
{foreach $productList as $product}
{assign var="sku" value="EAN_"|cat:$product.product_ean13}
{if $product.product_upc != ""}
{assign var="sku" value="UPC_"|cat:$product.product_upc}
{elseif $product.product_reference != ""}
{assign var="sku" value="REFERENCE_"|cat:$product.product_reference}
{else}
{assign var="sku" value="PRODUCT_ID_"|cat:$product.product_id}
{/if}
ga('ecommerce:addItem', {
'id': '{$idOrder|escape:'htmlall':'UTF-8'}',
'name': '{$product.product_name|escape:'htmlall':'UTF-8'}, Reference: {$product.product_reference|escape:'htmlall':'UTF-8'}',
'sku': '{$sku|escape:'htmlall':'UTF-8'}',
'category': '{$product.category_name|escape:'htmlall':'UTF-8'}',
'price': '{$product.total_price_tax_incl|escape:'htmlall':'UTF-8'}',
'quantity': '{$product.product_quantity|escape:'htmlall':'UTF-8'}',
'currency': '{$currency_iso_code|escape:'htmlall':'UTF-8'}'
});
{/foreach}
ga('ecommerce:send');
ga('ecommerce:clear');
</script><br/>
<!-- Google Code for code1 Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = {$baIdAdwords|escape:'htmlall':'UTF-8'};
var google_conversion_language = "{$language_iso_code|escape:'htmlall':'UTF-8'}";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "{$baIdAdwordsLabel|escape:'htmlall':'UTF-8'}";
var google_conversion_value = {$order->total_paid_tax_incl|escape:'htmlall':'UTF-8'};
var google_conversion_currency = "{$currency_iso_code|escape:'htmlall':'UTF-8'}";
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/{$baIdAdwords|escape:'htmlall':'UTF-8'}/?value={$order->total_paid_tax_incl|escape:'htmlall':'UTF-8'}&amp;currency_code={$currency_iso_code|escape:'htmlall':'UTF-8'}&amp;label={$baIdAdwordsLabel|escape:'htmlall':'UTF-8'}&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
<!-- Facebook Pixel Code -->
<script>
{literal}
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
{/literal}
fbq('init', '{$facebookId|escape:"htmlall":"UTF-8"}');
fbq('track', 'Purchase');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id={$facebookId|escape:"htmlall":"UTF-8"}&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->

View File

@@ -0,0 +1,76 @@
{*
* 2007-2020 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@buy-addons.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 Buy-addons <contact@buy-addons.com>
* @copyright 2007-2020 Buy-addons
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<script>
{literal}
(
function(i,s,o,g,r,a,m)
{
i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)
},
i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
}
)(window,document,'script','//www.google-analytics.com/analytics.js','ga');
{/literal}
ga('create', '{$baIdAnalytics|escape:'htmlall':'UTF-8'}', 'auto');
ga('send', 'pageview');
</script>
<!-- Facebook Pixel Code -->
<script>
{literal}
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
{/literal}
fbq('init', '{$facebookId|escape:"htmlall":"UTF-8"}');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id={$facebookId|escape:"htmlall":"UTF-8"}&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
{if ($page_type == 'order' && $bastepoder == false) || ($page_type == 'cart')}
<script>
fbq('track', 'AddToCart');
</script>
{/if}
{if $page_type == 'search'}
<script>
fbq('track', 'Search');
</script>
{/if}
{if $page_type == 'orderconfirmation' || $page_type == 'order-confirmation'}
<script>
fbq('track', 'Purchase');
</script>
{/if}