first commit
28
modules/ps_facebook/views/css/admin/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
10
modules/ps_facebook/views/css/admin/menu.css
Normal file
@@ -0,0 +1,10 @@
|
||||
/* Add this specific material icon for the backoffice legacy theme */
|
||||
#subtab-Marketing:not(.link-active):not(.-active) .material-icons.mi-campaign{
|
||||
-webkit-mask: url('../../img/campaign-24px.svg') no-repeat 50% 50%;
|
||||
mask-image: url('../../img/campaign-24px.svg') no-repeat 50% 50%;
|
||||
-webkit-mask-size: 19px;
|
||||
mask-size: 19px;
|
||||
background-color: white;
|
||||
background-size: cover;
|
||||
width: 19px;
|
||||
}
|
||||
28
modules/ps_facebook/views/css/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
BIN
modules/ps_facebook/views/img/Oval.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
modules/ps_facebook/views/img/ad_account_illustration.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
modules/ps_facebook/views/img/boost_your_sales_illustration.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
1
modules/ps_facebook/views/img/campaign-24px.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 11v2h4v-2h-4zm-2 6.61c.96.71 2.21 1.65 3.2 2.39.4-.53.8-1.07 1.2-1.6-.99-.74-2.24-1.68-3.2-2.4-.4.54-.8 1.08-1.2 1.61zM20.4 5.6c-.4-.53-.8-1.07-1.2-1.6-.99.74-2.24 1.68-3.2 2.4.4.53.8 1.07 1.2 1.6.96-.72 2.21-1.65 3.2-2.4zM4 9c-1.1 0-2 .9-2 2v2c0 1.1.9 2 2 2h1v4h2v-4h1l5 3V6L8 9H4zm11.5 3c0-1.33-.58-2.53-1.5-3.35v6.69c.92-.81 1.5-2.01 1.5-3.34z"/></svg>
|
||||
|
After Width: | Height: | Size: 488 B |
BIN
modules/ps_facebook/views/img/category_matching_illustration.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
20
modules/ps_facebook/views/img/facebook_logo.svg
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="44px" height="44px" viewBox="0 0 44 44" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Group 3</title>
|
||||
<defs>
|
||||
<polygon id="path-1" points="0.002578125 0.00171875 44 0.00171875 44 43.7327344 0.002578125 43.7327344"></polygon>
|
||||
</defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Configuration---PS-Account" transform="translate(-245.000000, -706.000000)">
|
||||
<g id="fbe" transform="translate(225.000000, 641.000000)">
|
||||
<g id="Group-3" transform="translate(20.000000, 65.000000)">
|
||||
<mask id="mask-2" fill="white">
|
||||
<use xlink:href="#path-1"></use>
|
||||
</mask>
|
||||
<g id="Clip-2"></g>
|
||||
<path d="M44,22 C44,9.84972656 34.1502734,0 22,0 C9.84972656,0 0,9.84972656 0,22 C0,32.9808359 8.04508203,42.0823047 18.5625,43.7327344 L18.5625,28.359375 L12.9765625,28.359375 L12.9765625,22 L18.5625,22 L18.5625,17.153125 C18.5625,11.639375 21.8469453,8.59375 26.8722266,8.59375 C29.279207,8.59375 31.796875,9.0234375 31.796875,9.0234375 L31.796875,14.4375 L29.0227266,14.4375 C26.2897852,14.4375 25.4375,16.1333477 25.4375,17.8731523 L25.4375,22 L31.5390625,22 L30.5636719,28.359375 L25.4375,28.359375 L25.4375,43.7327344 C35.954918,42.0823047 44,32.9808359 44,22" id="Fill-1" fill="#1877F2" mask="url(#mask-2)"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
20
modules/ps_facebook/views/img/facebook_white_logo.svg
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="44px" height="44px" viewBox="0 0 44 44" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Group 3</title>
|
||||
<defs>
|
||||
<polygon id="path-1" points="0.002578125 0.00171875 44 0.00171875 44 43.7327344 0.002578125 43.7327344"></polygon>
|
||||
</defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Configuration---PS-Account" transform="translate(-245.000000, -706.000000)">
|
||||
<g id="fbe" transform="translate(225.000000, 641.000000)">
|
||||
<g id="Group-3" transform="translate(20.000000, 65.000000)">
|
||||
<mask id="mask-2" fill="white">
|
||||
<use xlink:href="#path-1"></use>
|
||||
</mask>
|
||||
<g id="Clip-2"></g>
|
||||
<path d="M44,22 C44,9.84972656 34.1502734,0 22,0 C9.84972656,0 0,9.84972656 0,22 C0,32.9808359 8.04508203,42.0823047 18.5625,43.7327344 L18.5625,28.359375 L12.9765625,28.359375 L12.9765625,22 L18.5625,22 L18.5625,17.153125 C18.5625,11.639375 21.8469453,8.59375 26.8722266,8.59375 C29.279207,8.59375 31.796875,9.0234375 31.796875,9.0234375 L31.796875,14.4375 L29.0227266,14.4375 C26.2897852,14.4375 25.4375,16.1333477 25.4375,17.8731523 L25.4375,22 L31.5390625,22 L30.5636719,28.359375 L25.4375,28.359375 L25.4375,43.7327344 C35.954918,42.0823047 44,32.9808359 44,22" id="Fill-1" fill="#ffffff" mask="url(#mask-2)"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
BIN
modules/ps_facebook/views/img/ig_shopping.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
modules/ps_facebook/views/img/ig_shopping_disabled.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
modules/ps_facebook/views/img/illustration.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
modules/ps_facebook/views/img/illustration2.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
modules/ps_facebook/views/img/illustration_header.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
28
modules/ps_facebook/views/img/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
BIN
modules/ps_facebook/views/img/logo-wordmark.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
modules/ps_facebook/views/img/logo.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
modules/ps_facebook/views/img/logo_highres.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
modules/ps_facebook/views/img/manage_business_illustration.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
modules/ps_facebook/views/img/messenger_chat.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
modules/ps_facebook/views/img/messenger_chat_disabled.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
modules/ps_facebook/views/img/page_shop.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
modules/ps_facebook/views/img/reach_people_illustration.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 24 KiB |
28
modules/ps_facebook/views/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
20
modules/ps_facebook/views/js/app.js
Normal file
121
modules/ps_facebook/views/js/chunk-vendors.js
Normal file
48
modules/ps_facebook/views/js/front/conversion-api.js
Normal file
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
prestashop.on('updateProduct', function (params) {
|
||||
if (params.eventType === 'updatedProductCombination') {
|
||||
var productId = $('input[name="id_product"]').val();
|
||||
var $productAttributes = $(params.event.handleObj.selector);
|
||||
var attributes = [];
|
||||
$productAttributes.each(function (key, attribute) {
|
||||
if ($(attribute).is("input") && !$(attribute).is(':checked')) {
|
||||
return;
|
||||
}
|
||||
attributes.push($(attribute).val());
|
||||
})
|
||||
ajaxProductCombinationChange(productId, attributes);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function ajaxProductCombinationChange(productId, attributes) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: prestashopFacebookAjaxController,
|
||||
data: {
|
||||
action: 'CustomizeProduct',
|
||||
ajax: true,
|
||||
id_product: productId,
|
||||
attribute_ids: attributes,
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
28
modules/ps_facebook/views/js/front/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
28
modules/ps_facebook/views/js/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
92
modules/ps_facebook/views/js/printpixel.js
Normal file
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
function ajaxGetProduct(id, attribute) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: pixel_fc,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'GetProduct',
|
||||
ajax: true,
|
||||
id_product: id,
|
||||
id_attribute: attribute,
|
||||
},
|
||||
success: function(data) {
|
||||
var iso_code = prestashop.currency.iso_code,
|
||||
amount = data.price_amount;
|
||||
|
||||
fbq('track', 'AddToCart', {value: amount, currency: iso_code});
|
||||
},
|
||||
error: function(err) {}
|
||||
});
|
||||
}
|
||||
|
||||
// support 1.6 version
|
||||
if (typeof(prestashop) == 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Track Add to cart
|
||||
prestashop.on('updateCart', function(params) {
|
||||
if (
|
||||
typeof(params) !== 'undefined'
|
||||
&& typeof(prestashop.cart) !== 'undefined'
|
||||
) {
|
||||
var iso_code = prestashop.currency.iso_code,
|
||||
products = prestashop.cart.products,
|
||||
my_id = params.reason.idProduct,
|
||||
my_attribute = params.reason.idProductAttribute,
|
||||
my_link = params.reason.linkAction;
|
||||
|
||||
if (my_link != 'delete-from-cart') {
|
||||
|
||||
// Keep ajax call
|
||||
// ajaxGetProduct(my_id, my_attribute);
|
||||
|
||||
// Find product
|
||||
var search_product = $.grep(products, function(e){
|
||||
return e.id_product == my_id && e.id_product_attribute == my_attribute;
|
||||
});
|
||||
|
||||
if (products.length != 0) {
|
||||
var amount = search_product[0].price_wt;
|
||||
fbq('track', 'AddToCart', { value: amount, currency: iso_code, content_ids: my_id, content_type: "product" });
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Track CustomizeProduct event for PS1.7
|
||||
prestashop.on('updatedProduct', function(params) {
|
||||
if (typeof(params) !== 'undefined') {
|
||||
fbq('track', 'CustomizeProduct');
|
||||
}
|
||||
})
|
||||
|
||||
//Track product added to a wishlist
|
||||
prestashop.on('wishlistEventBusInit', () => {
|
||||
window.WishlistEventBus.$on('addedToWishlist', (params) => {
|
||||
fbq('track', 'AddToWishlist', {id_produit: params.detail.idProduct, content_type: "product"});
|
||||
})
|
||||
})
|
||||
|
||||
});
|
||||
34
modules/ps_facebook/views/templates/admin/app.tpl
Normal file
@@ -0,0 +1,34 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*}
|
||||
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
|
||||
<link href="{$pathApp|escape:'htmlall':'UTF-8'}" rel=preload as=script>
|
||||
|
||||
<div id="psFacebookApp"></div>
|
||||
|
||||
<script src="{$chunkVendor|escape:'htmlall':'UTF-8'}"></script>
|
||||
<script src="{$pathApp|escape:'htmlall':'UTF-8'}"></script>
|
||||
|
||||
<style>
|
||||
/** Hide native multistore module activation panel, because of visual regressions on non-bootstrap content */
|
||||
#content.nobootstrap div.bootstrap.panel {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
28
modules/ps_facebook/views/templates/admin/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
30
modules/ps_facebook/views/templates/hook/fbTrack.tpl
Normal file
@@ -0,0 +1,30 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*}
|
||||
{if !empty($type)}
|
||||
{literal}
|
||||
<script>
|
||||
fbq(
|
||||
'{/literal}{$track|escape:'htmlall':'UTF-8'}{literal}',
|
||||
'{/literal}{$type|escape:'htmlall':'UTF-8'}{literal}',
|
||||
{/literal}{$content nofilter}{literal},
|
||||
{/literal}{$eventData nofilter}{literal}
|
||||
);
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
86
modules/ps_facebook/views/templates/hook/header.tpl
Normal file
@@ -0,0 +1,86 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*}
|
||||
|
||||
<!-- Facebook Pixel Code -->
|
||||
{literal}
|
||||
<script>
|
||||
!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.agent='plprestashop-download'; // n.agent to keep because of partnership
|
||||
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');
|
||||
|
||||
// Allow third-party modules to disable Pixel
|
||||
fbq('consent', !!window.doNotConsentToPixel ? 'revoke' : 'grant');
|
||||
{/literal}
|
||||
{strip}
|
||||
{if isset($userInfos)}
|
||||
{literal}
|
||||
fbq('init', '{/literal}{$id_pixel|escape:'htmlall':'UTF-8'}{literal}', {/literal}{$userInfos|@json_encode nofilter}{literal});
|
||||
{/literal}
|
||||
{else}
|
||||
{literal}
|
||||
fbq('init', '{/literal}{$id_pixel|escape:'htmlall':'UTF-8'}{literal}');
|
||||
{/literal}
|
||||
{/if}
|
||||
{/strip}
|
||||
{literal}
|
||||
fbq('track', 'PageView');
|
||||
var pixel_fc = {/literal}"{$pixel_fc|escape:'htmlall':'UTF-8'}"{literal};
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id={/literal}{$id_pixel|escape:'htmlall':'UTF-8'}{literal}&ev=PageView&noscript=1"/>
|
||||
</noscript>
|
||||
{/literal}
|
||||
<!-- End Facebook Pixel Code -->
|
||||
|
||||
<!-- Set Facebook Pixel Product Export -->
|
||||
{if isset($page) }
|
||||
{if $page.page_name == 'product'}
|
||||
<meta property="og:type" content="product">
|
||||
<meta property="og:url" content="{$urls.current_url}">
|
||||
<meta property="og:title" content="{$page.meta.title}">
|
||||
<meta property="og:site_name" content="{$shop.name}">
|
||||
<meta property="og:description" content="{$page.meta.description}">
|
||||
<meta property="og:image" content="{$product.cover.large.url}">
|
||||
{if $product.show_price}
|
||||
<meta property="product:pretax_price:amount" content="{$product.price_tax_exc}">
|
||||
<meta property="product:pretax_price:currency" content="{$currency.iso_code}">
|
||||
<meta property="product:price:amount" content="{$product.price_amount}">
|
||||
<meta property="product:price:currency" content="{$currency.iso_code}">
|
||||
{/if}
|
||||
{if isset($product.weight) && ($product.weight != 0)}
|
||||
<meta property="product:weight:value" content="{$product.weight}">
|
||||
<meta property="product:weight:units" content="{$product.weight_unit}">
|
||||
{/if}
|
||||
{if isset($product_manufacturer->id)}
|
||||
<meta property="product:brand" content="{$product_manufacturer->name}">
|
||||
{/if}
|
||||
<meta property="product:availability" content="{$product_availability}">
|
||||
<meta property="product:condition" content="{$product.embedded_attributes.condition}">
|
||||
<meta property="product:retailer_item_id" content="{$retailer_item_id}">
|
||||
<meta property="product:item_group_id" content="{$product.id_product}">
|
||||
<meta property="product:category" content="{$item_group_id}"/>
|
||||
{/if}
|
||||
{/if}
|
||||
<!-- END OF Set Facebook Pixel Product Export -->
|
||||
|
||||
{include file="./fbTrack.tpl"}
|
||||
28
modules/ps_facebook/views/templates/hook/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
41
modules/ps_facebook/views/templates/hook/messenger.tpl
Normal file
@@ -0,0 +1,41 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*}
|
||||
|
||||
<script>
|
||||
window.fbAsyncInit = function() {
|
||||
FB.init({
|
||||
appId : '{$ps_facebook_messenger_app_id}',
|
||||
autoLogAppEvents : true,
|
||||
xfbml : true,
|
||||
version : '{$ps_facebook_messenger_api_version}'
|
||||
});
|
||||
};
|
||||
|
||||
(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "https://connect.facebook.net/{$ps_facebook_messenger_locale}/sdk/xfbml.customerchat.js";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
</script>
|
||||
|
||||
<div class="fb-customerchat"
|
||||
page_id="{$ps_facebook_messenger_page_id}">
|
||||
</div>
|
||||
28
modules/ps_facebook/views/templates/index.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/AFL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||