Skip to content

Commit

Permalink
Make PayPal Checkout button in the PDP configurable (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-bystritsky authored Dec 11, 2023
1 parent 57c7836 commit c8f013b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions view/frontend/web/js/proceed-to-checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ define([
icon: config.loaderIcon
}
);
form.submit(() => {
location.href = config.checkoutUrl
});
if (form.validation('isValid')) {
loader.loader('show');
customerData.get('cart').subscribe(
() => {
location.href = config.checkoutUrl
}
);
form.submit();
} else {
$(element).attr('disabled', false);
Expand Down

0 comments on commit c8f013b

Please sign in to comment.