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
<script defer> | |
function swymCallbackFn(swat) { | |
// your API calls go here | |
getEntireProducts(swat, function(fullProductDataArray) { | |
console.log("Full Product Data >>>", fullProductDataArray); | |
}); | |
} | |
function getEntireProducts(swat, callback) { | |
var __wishlistedProducts = []; |
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
<script> | |
function swymCallbackFn() { | |
// your API calls go here | |
//over ride the swym cart api to support custom slider cart | |
var replayAddToCartOriginalFn = _swat.replayAddToCart; | |
window._swat.replayAddToCart = function() { | |
//save the successCallback | |
var successCallbackFn = arguments[2]; | |
arguments[2] = function(data) { | |
if (successCallbackFn && updateThirdPartyCartFn) { |
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(){ | |
var startListening = function(){ | |
window._swat.evtLayer.addEventListener(SwymTracker.JSEvents.addedToWishlist, function(e){ | |
var evtData = e.detail.d; | |
/* Sample data format that gets passed | |
evtData format - | |
{ | |
et: 4 for wishlist, | |
dt: // product title |