Skip to content

Commit

Permalink
fix passing installments selection with jQuery legacy version; redire…
Browse files Browse the repository at this point in the history
…ct to cart on cancel; version up
  • Loading branch information
netzkollektiv committed Oct 20, 2023
1 parent ad61493 commit 06b7155
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Frontend/NetzkollektivEasyCredit/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getLabel()

public function getVersion()
{
return '1.9.2';
return '1.9.3';
}

public function getInfo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ public function returnAction()
}

public function cancelAction() {
$this->_redirToPaymentSelection();
$this->redirect(array(
'controller'=>'checkout',
'action'=>'cart'
));
}

public function rejectAction() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jQuery(function($) {
$(easyCreditCheckout, "form.payment[action*='savePayment']").submit(function(e){
var form = $("form.payment[action*='savePayment']")
form.append('<input type="hidden" name="easycredit[submit]" value="1" />')
if (!e.detail) {
e.detail = e.originalEvent.detail;
}
if (e.detail && e.detail.numberOfInstallments) {
form.append('<input type="hidden" name="easycredit[number-of-installments]" value="'+ e.detail.numberOfInstallments +'" />')
}
Expand Down

0 comments on commit 06b7155

Please sign in to comment.