(function() { function bindEvents() { if (typeof BOLD === "object" && BOLD.common && BOLD.common.eventEmitter) { BOLD.common.eventEmitter.addListener('BOLD_OPTIONS_total_changed', function(ev) { var klarnas = document.querySelectorAll('klarna-placement') if (klarnas.length) { for (var i in klarnas) { var v = klarnas[i] if (typeof v === 'object') { window.KlarnaOnsiteService = window.KlarnaOnsiteService || []; window.KlarnaOnsiteService.push({ eventName: 'refresh-placements', placementId: v.dataset.id }); window.KlarnaThemeGlobals.data_purchase_amount = ev.data.option_product.priceHandler.productPrice + ev.data.total; window.KOSMApp.updatePurchaseAmount(); } } } }); return true; } return false; } if (!bindEvents()) { var cycles = 0; var bold_inter = setInterval(function() { cycles++; (bindEvents() || cycles > 10) && clearInterval(bold_inter); }, 300); } })();
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article