Add custom stickers
Using our MJS API and Custom CSS, you can create custom stickers, that are based on any field from the product and look exactly how you want!
window.findifyApiRegistry = [{
hook: "*.item",
didMount: function(apiData) {
var node = apiData.node;
//test the property that you need to see if the sticker needs to be shown
if (node && apiData.data.CUSTOM_PROPERTY > 10) {
var div = document.createElement("div");
//specify your custom classes that you will use in Custom CSS
div.setAttribute("class", "YOUR_CUSTOM_CLASS");
div.innerHTML = "Test Sticker";
if (node.children && node.children.length > 0) {
node.children[0].appendChild(div);
} else {
node.appendChild(div);
}
}
}
}];
Updated over 4 years ago