Show payment icons near your payment method at the checkout
var client_id = "custom-app-1003-1" // your app’s client_id
var image_link = "https://mitra-sezzle.free.nf/img/Color-BuyNowPayLater.png" // your image URL (must be https)
// function that adds an image
var CheckoutIconLoad = function () {
var icon = "<div class='icon_resizer' style='height:40px; overflow:hidden'> <img style='width:auto; height:100%; display:block;' src='"+image_link+"'></img> </div>";
document.querySelector("label.ec-radiogroup__item--app_id-"+client_id+" div.ec-radiogroup__info:empty").innerHTML = icon;
}
// call function on the page load
Ecwid.OnAPILoaded.add(function () {
Ecwid.OnPageLoaded.add(function (page) {
if (page.type == "CHECKOUT_PAYMENT_DETAILS") {
CheckoutIconLoad();
}
});
});Last updated
Was this helpful?
