<?php echo $header; ?>
<div class="container">
  <ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>
  <div class="row"><?php echo $column_left; ?>
    <?php if ($column_left && $column_right) { ?>
    <?php $class = 'col-sm-6'; ?>
    <?php } elseif ($column_left || $column_right) { ?>
    <?php $class = 'col-sm-9'; ?>
    <?php } else { ?>
    <?php $class = 'col-sm-12'; ?>
    <?php } ?>
    <div id="content" class="<?php echo $class; ?> "><?php echo $content_top; ?>
      <h1 class="text-center"><?php echo $heading_title; ?></h1>
      <p class="text-center">
      <h1><b style="color:red;"><?php if(isset($text_order_id) AND $text_order_id){ echo '#' . $text_order_id; } ?></b></h1>
      </p>
      <?php echo $text_message; ?>
      <div class="buttons">
        <div class="pull-right"><a href="<?php echo $continue; ?>" class="btn btn-primary"><?php echo $button_continue; ?></a></div>
      </div>
      <?php echo $content_bottom; ?></div>
    <?php echo $column_right; ?></div>
</div>

<?php if(isset($order_id) and 1==2){ ?>

<script>
  $.ajax({
    url: 'index.php?route=tool/logo/order_save&order_id=<?=$order_id;?>',
    dataType: 'json',
    type: 'POST',
    data: {order_id : '<?=$order_id;?>'},
    success: function(json){
    }
  });
</script>

<?php } ?>

<?php
if($CretioOneTag_status && isset($order_detail))
{
?>

<!-- Criteo Sales Tag -->
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
  window.criteo_q = window.criteo_q || [];
  var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
  window.criteo_q.push(
          {event: "setAccount", account: '<?php echo $CretioOneTag_id ?>'}, // You should never update this line
          {event: "setEmail", email: ""}, // Can be an empty string
          {event: "setSiteType", type: deviceType},
          {event: "trackTransaction", id: <?php echo $order_detail[0]['order_id'] ?>, item: [
          <?php
          foreach ($order_detail as $detail) {
          ?>
          {id: "<?php echo $detail['product_id'] ?>", price: <?php echo str_replace(',','.',$detail['price']) ?>, quantity: <?php echo $detail['quantity'] ?>},
          <?php
          }
                  ?>
  //add a line for each additional line in the basket
  ]}
  );
</script>
<!-- END Criteo Sales Tag -->
<?php
}
?>
<?php echo $footer; ?>