if(!in_array($tmpl, array('component', 'ajax', 'raw'))) {
$events = ($this->cart_type == 'cart') ? '["cart.updated","checkout.cart.updated"]' : '"wishlist.updated"';
?>
<script type="text/javascript">
window.Oby.registerAjax(<?php echo $events; ?>, function(params) {
var o = window.Oby, el = document.getElementById('hikashop_cart_<?php echo $module_id; ?>');
if(!el) return;
if(params && params.resp && (params.resp.ret === 0 || params.resp.module == <?php echo (int)$module_id; ?>)) return;
if(params && params.type && params.type != '<?php echo $this->cart_type; ?>') return;
if(params && params.cart_empty) return;
o.addClass(el, "hikashop_checkout_loading");
o.xRequest("<?php echo hikashop_completeLink('product&task=cart&module_id='.$module_id . '&module_type='.$this->cart_type.'&return_url='.urlencode(base64_encode(hikashop_currentURL('return_url'))), true, false, true); ?>", {update: el}, function(xhr){
o.removeClass(el, "hikashop_checkout_loading");
});
});
</script>
<?php
} elseif(!headers_sent()){
header('X-Robots-Tag: noindex');
}