| When user upload logo through edit cart popup window without giving any value for LOGO & OPTIONS the logo won’t get update |
Adding the event for the logo options and giving the functionality for it
'click [data-action="changeOption"]': 'logouploadquickview'
logouploadquickview: function (e) {
try {
$('#in-modal-upload-logo-button').css("display", "none");
if (e.currentTarget.name === 'custcol_ag_logooptionselectbox') {
if (e.currentTarget.value === '6') {
$('#in-modal-upload-logo-button').hide();
$('.custcol_ag_logolayout-controls-group').hide();
} else {
$('#in-modal-upload-logo-button').show();
$('.custcol_ag_logolayout-controls-group').show();
}
}
} catch (e) {
console.error('quickview',e);
}
},
if (currentID == 'custcol_ag_logooptionselectbox') {
if( value !== '6' && existingValue !== value && existingValue !== '') {
if ($('.custcol_ag_logooptionselectbox-controls-group>.error-model').length === 0) {
$('.custcol_ag_logooptionselectbox-controls-group').append('<div class="error-model"> Please Upload Logo To Display Your Logo Over Check</div>');
}
}else{
$('.custcol_ag_logooptionselectbox-controls-group>.error-model').remove();
}
}
Giving the css for validation message
.error-model{
color: $sc-color-error;
background-color: rgb(253, 240, 242);
border: 1px solid $atg-error-message-border-color;
width: 75%;
padding: 6px;
font-size: $sc-font-size-s;
border-radius: 6px;
}