cartstack_updatecart

Description

If your shopping cart allows visitors to update their cart dynamically (eg: using AJAX functions/events), you can use the cartstack_updatecart function. 

Function Call
cartstack_updatecart(_cartstack_update);
Code Example 

In this example, we are assuming your system is calling the updateCartRealTime() function when a specific event has taken place.

<script data-siteid="XXXXXX" src="https://api.cartstack.com/js/customer-tracking/XXXXXXXXXX_222b5fb1025a6f580288f22cbd29c1bc.js" type="text/javascript"><br></script>
 
<script type="text/javascript">
function updateCartRealTime() {
 var _cartstack_update = [];
 _cartstack_update.push(['setCartTotal', '']);
 _cartstack_update.push(['removeCartItems', 1]);
 
 cartstack_updatecart(_cartstack_update);
 }

Still need help? Contact Us Contact Us