STRING TEST

'event': 'byoLoaded' window.addEventListener('message', handleLoad, true); document.querySelector('iframe').contentWindow.postMessage({event:"enableCart",data:{}},"*") window.addEventListener('message', handleArticleList, true); data.data = { designid : "123456", // unique design id for the current shelf. Empty string if the design has not been saved name : "design", // the name of the design set by the user. Defaults to "design" items : [ // array with all the articles in the design ean : "7350038270467", // eancode for the item article : "SF20030-13-2", // article number for the item quantity : 1 ] } window.addEventListener('message', messageHandler, true); // use this if you are going to enable the cart button function messageHandler(event){ if(event.data.event == "byoLoaded") { handleLoad(event) } if(event.data.event == "cartUpdate") { addToCart(event) } if(event.data.event == "designUpdate") { handleCart(event) } } function handleLoad(event) { // enable the button in BYO document.querySelector('https://build-your-own.stringfurniture.com/lan=6&countrycode=FR&guid=sit_ODE0OTY5MTU1MTE').contentWindow.postMessage({event:"enableCart",data:{}},"*") } function addToCart(event) { let designid = event.data.data.designid let designname = event.data.data.name let cart = event.data.data.items // add your code for handling user did an add to cart click } function handleCart(event) { let designid = event.data.data.designid let designname = event.data.data.name let cart = event.data.data.items // add your code for handling article list changed in BYO }
Liquid error: Could not find asset snippets/swymSnippet.liquid