Jump to content

Auto-rerfresh carrier list when choosing the country in opc


Recommended Posts

Hi everyone, 

 

In the one page guest checkout , I would like to refresh my carrier list as i'm choosing the delivery address.

 

I've started by editing the order-opc.js by adding this code :

 

$('#id_country').change(function(){
        $.ajax({
            url: orderOpcUrl + '?rand=' + new Date().getTime(),
            type: "post",
            data: {option: $(this).find("option:selected").val()} ,
success: function(jsonData){
alert('test'+jsonData.carrier_data);
//updateCarrierList(jsonData.carrier_data);        
}
        });
});

So now, the alert pops up when i change the country, but how do i refresh the carrier bloc?

 

Any ideas?

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

  • 2 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...