Skip to content

Instantly share code, notes, and snippets.

@cave2006
Created April 7, 2023 03:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cave2006/4f030db4709c3e7cd9bcf3a338c94df3 to your computer and use it in GitHub Desktop.
Save cave2006/4f030db4709c3e7cd9bcf3a338c94df3 to your computer and use it in GitHub Desktop.
[DOC] Отключение стандартных скриптов JS для отображения
Как заменить уведомления о добавление товара в корзину на свое.
<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