Created
April 7, 2023 03:13
-
-
Save cave2006/4f030db4709c3e7cd9bcf3a338c94df3 to your computer and use it in GitHub Desktop.
[DOC] Отключение стандартных скриптов JS для отображения
This file contains hidden or 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> | |
document.addEventListener('onRadicalMartDisplayAfterSetConfig', function (event) { | |
console.log(event.detail) | |
window.RadicalMartDisplay.cart.notification_addShow = false; // Отключаем стандартное поведение | |
}); | |
document.addEventListener('onRadicalMartCartAfterAddProduct', function(event) { | |
if (!event.detail.error) { | |
alert('PRODUCT ADD'); // Делаем свое | |
} | |
}); | |
</script> | |
Все функции | |
window.RadicalMartDisplay = { | |
cart: { | |
addButtonsLock: true, | |
discountHide: true, | |
badgeHide: true, | |
badgeTooltip: true, | |
moduleHide: true, | |
moduleShow: true, | |
pageErrors: true, | |
pageReload: true, | |
notification_addShow: true, | |
errorsShow: true, | |
}, | |
checkout: { | |
submitButtonsLock: true, | |
discountHide: true, | |
checkErrorsShow: true, | |
globalLoadingShow: true, | |
shippingLoadingShow: true, | |
paymentLoadingShow: true, | |
loginShow: true, | |
errorsShow: true, | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment