Hi,
Thanks for the hint GW.
I am not willing to modify core plugin code so have looked into cart.php as you suggested.
It was easy to understand how it works and i adjusted code bellow which works partially.
<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; ?>'),
btn = document.getElementById('btn-add-cart');
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;
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");
o.addClass(btn, "add_success");
});
});
</script>
The issue is that "add_success" class is also added after product is removed from cart because the event is for update... I am not sure how to fire it only after product is added to cart not removed, updated?
One more hint would be welcome.
Thanks again