SwissUpLabs Logo

Infostrates Tnt

Open skin/frontend/default/default/js/tnt/tnt.js.

  1. Find the following lines:

    new Ajax.Request(url,{
        method:'post',
        parameters:{street:street,description:description,postcode:postcode,city:city,info_comp:info_comp}
    });
    

    Replace them with:

    new Ajax.Request(url, {
        method: 'post',
        onComplete: function(response) {
            document.fire('inforstrates:shippingMethodTntCompleted', response);
        },
        parameters:{street:street,description:description,postcode:postcode,city:city,info_comp:info_comp}
    });
    
  2. Find the following line:

    var radioGrp = document['forms']['co-shipping-method-form']['tnt_ville'];
    

    Replace it with:

    var radioGrp = $$('input[name="tnt_ville"]');
    
  3. Find the following lines:

    if(!radioValue && $("tnt_ville1").checked){
        var radioValue = $("tnt_ville1").value;
    }
    

    Replace them with:

    if(!radioValue && $("tnt_ville1") && $("tnt_ville1").checked){
        var radioValue = $("tnt_ville1").value;
    }
    

Save the file and disable js minification.

Edit this Page