Merge pull request 'fix: change styling when checkout button is disabled' (#53) from apurvab/theme-elegance:main into main

Reviewed-on: brooksbingham/theme-elegance#53
bug-new
apurvab 2024-11-29 07:40:32 +00:00
commit 66afee84b2
2 changed files with 18 additions and 1 deletions

View File

@ -24,6 +24,10 @@ const CheckUpdateQuantityOperations = {
(errorMsg !== "" && !hasError) (errorMsg !== "" && !hasError)
) { ) {
$checkoutBtn.addClass("disabled"); $checkoutBtn.addClass("disabled");
$checkoutBtn.css({
'background-color': 'grey',
'color': 'white',
});
} }
if (errorMsg !== "") { if (errorMsg !== "") {
@ -46,6 +50,11 @@ const CheckUpdateQuantityOperations = {
isUpdateOperation = false; isUpdateOperation = false;
$(prestashop.themeSelectors.notifications.container).html(""); $(prestashop.themeSelectors.notifications.container).html("");
$checkoutBtn.removeClass("disabled"); $checkoutBtn.removeClass("disabled");
$checkoutBtn.css({
'background-color': '#172554',
'color': 'white',
});
} }
}, },
checkUpdateOperation: (resp) => { checkUpdateOperation: (resp) => {

File diff suppressed because one or more lines are too long