Prestashop on delivery select hide/show payment method

I'm trying to figure out how to show/hide payment method on delivery method select.

I tryed couple solutions but it didn't worked for me.

One of them is this one:


       $('.delivery_option_radio').on('change', function() {

   function toggleFields() {
       if ($('#delivery_option_3_0').is(':checked')) {
       } else {
          alert("Not Selected");

Problem is that it works just 2 times. Example:

Page loads, alert box appears and shows: Selected, then I select other radio button it shows "Not Selected" and then it stops working.

Any solutions ? I found this tutorial here:

I read that it could be something with ajax.. that I have to reload my jQuery because delivery radio buttons uses ajax to calculate total price.



No need to another code development hassle. Use very good and free Ship to Pay module . Works with 1.6/1.5 and even with 1.4

How its works? You have ex. Cash on Delivery shipping/payment method. So in next Payment step Your customer will not see any Bankwire, PayPal, Pick Up in Store options just one Cash on Delivery COD method.

Next example. Customer want Pick up order directly in store. He choose Delivery option Pick up in Store and in Payment mehtods will not see Cash on Delivery payment method or PayPal/Bankwire options.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.