Jump to content

$selected_payment_option in payment.tpl never populated


Mercader Virtual

Recommended Posts

Hi,

I have a couple of payment options available. During checkout, after selecting a payment option, e.g. "Stripe", enter data and continue with checkout process, if an error happens, I would expect Prestashop to populate the variable $selected_payment_option used in payment.tpl, so that after reloading page, the option is already selected and the payment module error is visible.

For some reason, that expected behavior doesn't happen, so every time there's a payment error user has to re-select the payment option.

In CheckoutPaymentStep.php, there is this code:
 

if (isset($requestParams['select_payment_option'])) { $this->selected_payment_option = $requestParams['select_payment_option']; }

But that condition is never met because "select_payment_option" element is never populated.

I wonder when this handler is invoked, since the payment form is submitted directly to the module's validation.php controller.

Any idea? Thanks.

Edited by Mercader Virtual (see edit history)
Link to comment
Share on other sites

  • 2 months later...
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...