Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
<script>
    var sporder = {
        email: "{{customer.email}}",
        amount: "{{ order.total_price  | money_without_currency | replace: ',', '.'}}",
        idorder: "{{order.order_number}}",
        date: "{{order.created_at| date: '%Y-%m-%d %H:%M:%S'}}", // Y-m-d H:i:s
        state: "20", // 10:taken / 20:paid / 50:sent / 100:recieved
        name: "{{customer.last_name}}", //Si vous n'indiquez pas ce paramètre nous y insérerons le début de l'email
        firstname: "{{customer.first_name}}",
        address : "{{order.shipping_address.street}}",
        cp : "{{order.shipping_address.zip}}",
        city : "{{order.shipping_address.city}}",
        country : "{{order.shipping_address.country}}",
        action : "order"
       	};

    // Configuration du tracker SPREAD
    var spconfig = {
        public_key: "xxxxxxx",
        debug: false,
        set_cookie: true,
        track_order_enabled: true
    };

    // Procédure de chargement du tracker js SPREAD
    function loadSpreadTracker(){window.domLoadEventFired=!0;var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.charset="UTF-8",a.id="spread-tracker",a.src="//static-sb.com/js/sb-tracker.js",document.body.appendChild(a)}window.addEventListener?window.addEventListener("load",loadSpreadTracker,!1):window.attachEvent?window.attachEvent("onload",loadSpreadTracker):window.onload=loadSpreadTracker;
</script>

...