-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PSPAYPAL-799 - add missing vaultPayment input for smarty + add clickp…
…revention
- Loading branch information
1 parent
0c0e726
commit 7aa43ee
Showing
4 changed files
with
60 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
16 changes: 16 additions & 0 deletions
16
views/smarty/frontend/blocks/page/checkout/order__checkout_order_btn_submit_bottom.tpl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[{assign var="payment" value=$oView->getPayment()}] | ||
[{if "oscpaypal" == $payment->getId()}] | ||
<input type="hidden" name="vaultPayment" id="oscPayPalVaultPayment" value=""> | ||
[{capture name="oscpaypal_madClickPrevention"}] | ||
const submitButton = document.querySelector('#orderConfirmAgbBottom .submitButton'); | ||
const orderConfirmAgbBottom = document.getElementById('orderConfirmAgbBottom'); | ||
|
||
submitButton.addEventListener('click', function() { | ||
event.preventDefault(); | ||
this.disabled = true; | ||
orderConfirmAgbBottom.submit(); | ||
}); | ||
[{/capture}] | ||
[{oxscript add=$smarty.capture.oscpaypal_madClickPrevention}] | ||
[{/if}] | ||
[{$smarty.block.parent}] |