Problem

When adding product to cart in Covet.pics popup, widget will not automatically refresh cart data. Although product will be added to cart, it won't show until page is reloaded or when user redirects to any other page on that site.

Solution

You can listen to Covet.pics widget "addToCart:covetPics" event and call your theme function to refresh cart details in background. Unfortunately there is no universal way to refresh cart, each theme will have different function (or maybe it won't have at all). You'll need to check with theme developer how to refresh cart via Javascript function. Once you know that you can listen to event like this:

<script type="text/javascript">
  // listen when item is added to cart
  document.addEventListener('addToCart:covetPics', function(e) {  		
    // here you can call your theme's "cart refresh" function      
  });
</script> 

Prestige Theme

You can add following code to custom.js file in your theme:

<script type="text/javascript">
  // listen when item is added to cart
  document.addEventListener('addToCart:covetPics', function(e) {  		
    // calling Prestige theme refresh cart function
    document.documentElement.dispatchEvent(new CustomEvent('cart:refresh', { bubbles: true }));    
  });
</script>