{% extends 'shop/_layouts/checkout' %} {% block content %}
No payment methods available.
{% endif %} {# ╔══════════════════════════════════════════════════╗ ║ ┌───────────────────────────────────────────┐ ║ ║ │ This form updates the order with the │ ║ ║ │ preferred payment source or gateway, as │ ║ ║ │well as allowing the selection of a payment│ ║ ║ │ currency if more than one is set up. │ ║ ║ └───────────────────────────────────────────┘ ║ ╚══════════════════════════════════════════════════╝ #} {% if availableGateways|length %} {% endif %} {% js %} // If the payment currency changes, submit the form immediately $('#paymentCurrency').change(function(){ $('form#paymentPreferenceForm').submit(); }); $('#paymentMethod').change(function(ev){ $select = $(ev.currentTarget); if ($select.val().length === 0) { return; } var parts = $select.val().split(':'); var name = 'gatewayId'; if (parts[0] === 'card') { name = 'paymentSourceId'; } $select.prop('disabled', 'disabled'); $('form#paymentPreferenceForm').append('').submit(); }); {% endjs %} {% if cart.gatewayId or cart.paymentSourceId %} {% endif %}