chexton
1/2/2013 - 5:00 AM

checkout codes

checkout codes

<!-- Add to end of viewItem.tpl.php -->
<script>
  _veroq.push(['track', 'Viewed product', {
    title: "<?php echo $this->_tpl_vars['myobj']->getFormField('item_title'); ?>", 
    url: "<?php echo $this->_tpl_vars['myobj']->getCurrentUrl();  ?>", 
    image_url: "<?php echo $this->_tpl_vars['displayItem_arr']['file_img_path']; ?>", 
    price: "<?php echo $this->_tpl_vars['myobj']->getFormField('item_price'); ?>"}]);
</script>

<!-- Add to line 15 of cartCheckout.tpl.php -->
<script>
  window.products = [];
</script>

<!-- Add to line 1338 of cartCheckout.tpl.php -->
<script>
  window.products.push({
    title: "<?php echo $this->_tpl_vars['non_item_arr'][$this->_sections['item']['index']]['item_title']; ?>", 
    url: "<?php echo $this->_tpl_vars['non_item_arr'][$this->_sections['item']['index']]['view_item_link']; ?>", 
    image_url: "<?php echo $this->_tpl_vars['non_item_arr'][$this->_sections['item']['index']]['item_img_src']; ?>", 
    price: "<?php echo $this->_tpl_vars['non_item_arr'][$this->_sections['item']['index']]['item_price_det']['amount']; ?>"}
  )
</script>

<!-- Add to the end of cartCheckout.tpl.php -->
<script>
  _veroq.push(['track', 'Begin checkout', {products: window.products}]);
</script>

<!-- Alter code on 523 in cartCheckout.php with this -->

$LANG['cart_checkout_transaction_processed_succ_msg']= str_replace('VAR_INVOICE_LINK', $invoice_list_link, $LANG['cart_checkout_transaction_processed_succ_msg']) . "<script>_veroq.push(['track', 'completed checkout']);</script>";