]> _ Git - fluidbook-html5.git/commitdiff
wait #4046 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 5 Nov 2020 15:14:17 +0000 (16:14 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 5 Nov 2020 15:14:17 +0000 (16:14 +0100)
js/libs/fluidbook/fluidbook.cart.js

index 4e6fc68ef7977f8faa014fae9618f50321919230..4011afc069b88c806af25f9e68844424463a97dd 100644 (file)
@@ -26,13 +26,16 @@ FluidbookCart.prototype = {
                 qty = parseInt($(this).attr('data-cart-qty'));
             }
 
+            var ref = $(this).data('cart-ref');
+            $this.fluidbook.stats.track(15, $this.fluidbook.currentPage, ref);
+
             var tooltipStyle = '';
             try {
                 tooltipStyle = $this.instance.getTooltipStyle();
             } catch (e) {
 
             }
-            if ($this.instance.addToCart($(this).data('cart-ref'), qty)) {
+            if ($this.instance.addToCart(ref, qty)) {
                 $this.fluidbook.tooltip.displayTooltip($this.fluidbook.l10n.__("the item has been added to your cart"), tooltipStyle);
             }
             return false;