{"sessionId":"506c3f41368b4400867391fab75854d6","tntId":"506c3f41368b4400867391fab75854d6.34_0","offers":[{"responseTokens":{"experience.id":"2","activity.name":"[ALL] PLP: Savings Story Tile Content/UI Relaunch","activity.id":"213167","experience.name":"Save up to %","profile.marketingCloudVisitorId":"62735539235894471943583065315508990421","profile.activeActivities":"209283,213167","activity.decisioningMethod":"server-side"},"html":"<script>\nfunction plpSaveUpToThree(method) {\n  if (window.jQuery && jQuery().initialize) {\n    method();\n  } else {\n    setTimeout(function () { plpSaveUpToThree(method) }, 50);\n  }\n}\n\nplpSaveUpToThree(function () {\n  // Remove Clearance if present.\n  $.initialize('.productTile', function(index){\n    var priceData = $(this).find('#priceObj').attr('data-price');\n    var formattedPriceData;\n    console.log(\"TEST\" + $(this).find('.product-tile-savings-story-percentage:not(.d-none)').length);\n    if (priceData && $(this).find('.product-tile-savings-story-percentage:not(.d-none)').length < 1 && ($(this).find('.product-tile-merch-cut-price .sales.text-sale').length > 0 || $(this).find('.product-tile-final-price.text-sale:not(.d-none)').length > 0)) {\n        formattedPriceData = jQuery.parseJSON(priceData);\n        if (formattedPriceData.savingAmount){\n            //console.log(\"HIT!\");\n            savingsString = \"\";\n            savingsPercentage = formattedPriceData.savingPercentage;\n            if (savingsPercentage == \"54%\") {\n              savingsPercentage = \"55%\";\n            }\n\n            if ($(this).find('.price-from-text').length > 0){\n                savingsString = `Save up to `+savingsPercentage;\n            } else {\n                savingsString = `Save `+savingsPercentage;\n            }\n            $(this).find('.grid-top-section').append($(`<span class=\"product-tile-spm d-block small text-sale\">`+savingsString+`</span>`));\n        }\n        //console.log($(this));\n       // console.log(formattedPriceData);\n    }\n  });\n});\n</script>"}]}