This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doc.find("#takeMeThere").click(function(){ | |
_targetWindow.nostojs(function(api){ | |
var cookie = api.internal.overlay.discountPopup.instance.readCookie(<POPUP_CAMPAIGN_ID>); | |
if (cookie && !cookie.coupon) { | |
api.internal.overlay.discountPopup.instance.writeCookie(<POPUP_CAMPAIGN_ID>, "coupon", <COUPON_CODE>); | |
api.internal.couponGiven(<POPUP_CAMPAIGN_ID>, <COUPON_CODE>); | |
api.customer({ | |
email: <EMAIL>, | |
newsletter: true, | |
source: 'discount-popup', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mycart, myitems, myprice, mytotal; | |
function numberWithCommas(x) { | |
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); | |
} | |
/* FIND THE UNCOMPILED, UNBABELED VERSION HERE ---> https://gist.github.com/jacopo-nosto/2e9f527b37a81b43b2b29b2beaff4247 */ | |
function miniCartBuilder(elem) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="nosto_element" id="frontpage-nosto-1"></div> | |
<script type="text/javascript"> | |
var myElement = _targetWindow.document.querySelector("#frontpage-nosto-1 .nosto_element"); | |
_targetWindow.document.onreadystatechange = function () { | |
if (_targetWindow.document.readyState === "complete") { | |
var checkURL = ['collections/cluster-chandelier-lights', | |
'collections/table-lamps', | |
'collections/vintage-retro-industrial-metal-bar-stools']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initMe(){ | |
if(typeof _targetWindow.jQuery.fn.slick !== 'undefined'){ | |
launchCarousel(); | |
}else{ | |
setTimeout(initMe, 300); | |
} | |
} | |
initMe(); | |
_targetWindow.jQuery("#$divId .nosto-carousel").on('init', function(slick){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## EMAIL LINK SETTINGS | |
#set( $mailsetting = { | |
"account" : $account, | |
"storeUrl" : $storeUrl, | |
"utm_source" : "nosto", | |
"utm_medium" : "email", | |
"utm_campaign" : "AbandonedCart", | |
"showInBrowserText" : $ASETUKSET.naytaSelaimessaTeksti, | |
"unsubscribeLinkText" : $unsubscribeLinkText |