100 lines
3.5 KiB
Smarty
100 lines
3.5 KiB
Smarty
{if $customer->pro == 1}
|
|
{assign var='customer_status' value='professionel'}
|
|
{else}
|
|
{assign var='customer_status' value='particulier'}
|
|
{/if}
|
|
|
|
<script>
|
|
(function (w, d, namespace, domain, progId, tagId, undefined) {
|
|
w[namespace] = w[namespace] || {}; var act = w[namespace], payload = [];
|
|
act.tags = act.tags || []; act.tags.push(tagId, payload);
|
|
var protocol = d.location.protocol;
|
|
|
|
// Start editable part
|
|
payload.push({
|
|
module: 'OrderTracking',
|
|
event: 'Sale',
|
|
net_price: {$order->total_paid_tax_excl - $order->total_shipping_tax_excl},
|
|
order_id: '{$order->id}',
|
|
rate_number: 1,
|
|
program_subid1: '{$customer_status}',
|
|
program_subid2: '{$order->payment}',
|
|
voucher_code: '{$ids_discount}'
|
|
});
|
|
// End editable part
|
|
|
|
if (act.get === undefined) {
|
|
var s = d.createElement('script');
|
|
s.type = 'text/javascript';
|
|
s.src = protocol + '//' + domain + '/' + 'affadvc.aspx?ns=' + namespace +
|
|
'&dm=' + domain + '&site=' + progId + '&tag=' + tagId;
|
|
s.async = false; // always keep false for standard tracking
|
|
(d.getElementsByTagName('body')[0] || d.getElementsByTagName('head')[0]).appendChild(s);
|
|
} else { act.get(w, d, progId, tagId); }
|
|
})(window, document,
|
|
// Start editable part
|
|
'aff_act_1.0', 'act.reussissonsensemble.fr', 15580, 'Ventes');
|
|
// End editable part
|
|
</script>
|
|
<noscript>
|
|
<img src="https://clic.reussissonsensemble.fr/TrackOrder.aspx?site=15580&event=sale&net_price={$order->total_paid_tax_excl - $order->total_shipping_tax_excl}&order_id={$order->id}&rate_number=1&program_subid1={$customer_status}&program_subid2={$order->payment}&voucher_code={$ids_discount}" />
|
|
</noscript>
|
|
|
|
{assign var=total_quantity value=0}
|
|
{foreach from=$order->getProducts() item=product}
|
|
{assign var=total_quantity value=$total_quantity + $product.quantity}
|
|
{/foreach}
|
|
|
|
<script>
|
|
(function (w, d, namespace, domain, progId, tagId, undefined) {
|
|
w[namespace] = w[namespace] || {}; var act = w[namespace], payload = []; act.tags = act.tags || []; act.tags.push(tagId, payload);
|
|
var protocol = d.location.protocol;
|
|
|
|
// Start editable part
|
|
payload.push({
|
|
module: 'Profiling',
|
|
event: 'Checkout',
|
|
order_id: '{$order->id}',
|
|
customer_gender: '{if $customer->id_gender == 0}Inconnu{elseif $customer->id_gender == 1}Homme{else}Femme{/if}',
|
|
customer_age_range: '',
|
|
customer_zip: '',
|
|
customer_country: '',
|
|
customer_age: {$customer->getAge()},
|
|
customer_status: '{$customer_status}',
|
|
order_total_gross_price: {$order->total_paid_real},
|
|
order_total_items: {$total_quantity},
|
|
currency: 'EUR',
|
|
tax: 19,
|
|
shipping_gross_price: {$order->total_shipping},
|
|
shipping_tax: 19,
|
|
shipping_type: '',
|
|
payment_type: '{$order->payment}',
|
|
products: [
|
|
{foreach from=$order->getProducts() item=product}
|
|
{
|
|
product_id: '{$product.id_product}',
|
|
product_name: '',
|
|
product_price: {$product.price},
|
|
product_quantity: {$product.quantity}
|
|
},
|
|
{/foreach}
|
|
],
|
|
voucher_code: '{$ids_discount}',
|
|
voucher_code_discount: {$order->total_discounts},
|
|
referer_url: '$reffer_url'
|
|
});
|
|
|
|
// End editable part
|
|
|
|
if (act.get === undefined) {
|
|
var s = d.createElement('script');
|
|
s.type = 'text/javascript';
|
|
s.src = protocol + '//' + domain + '/' + 'affadvc.aspx?ns=' + namespace + '&dm=' + domain + '&site=' + progId + '&tag=' + tagId;
|
|
s.async = false;
|
|
(d.getElementsByTagName('body')[0] || d.getElementsByTagName('head')[0]).appendChild(s);
|
|
}else { act.get(w, d, progId, tagId); }
|
|
})(window, document,
|
|
// Start editable part
|
|
'aff_act_1.0', 'act.reussissonsensemble.fr', 15580, 'TAG-ID-1');
|
|
// End editable part
|
|
</script> |