foxy_io

Zupagrafika: Default to PayU first on Checkout

Mar 15th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {% if template_set == "PL" and context == "checkout" %}
  2. <script>
  3. FC.client.on("ready.done", function() {
  4.     // Default to PayU
  5.     FC.json.payment_method_type = 'payu_omnipay';
  6.     FC.Template('checkout').clearOutput();
  7.     FC.checkout.renderPaymentMethod()
  8. });
  9. FC.client.on("render.done", function() {
  10.     // Move PayU to the top of payments list
  11.     var stripe = $('.fc-container__grid--payment-method.fc-payment-method--stripe_connect').parent();
  12.     $('#fc-payment-method-payu_omnipay').parent().insertBefore(stripe);
  13. });
  14. </script>
  15. {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment