This is the best I've come up with after wrestling with it for a while.
$("input[@name*=copy_address]").change(function(){
triggerQuoteCallback = function(){
quoteCallback(products);
};
if (copy_box_checked == true){
$("input[@name*=billing_postal_code]").bind('change', triggerQuoteCallback);
$("select[@name*=billing_address_select]").bind('change', triggerQuoteCallback);
}
else{
$("input[@name*=billing_postal_code]").unbind('change', triggerQuoteCallback);
$("select[@name*=billing_address_select]").unbind('change', triggerQuoteCallback);
}
});This goes at the end of setQuoteCallbacks(products) in uc_quote.js. The problem with it is that the unbind() calls don't work with the version of jQuery that comes with Drupal 5. The real problem is that you can't really upgrade jQuery without breaking some of the JavaScript functionality of Drupal. There might be a way to do namespace tricks to have two different versions of jQuery, but that's way beyond the scope of Übercart.
Instead, I'm going to try to see if I can prevent the 10 bajillion calls to set_line_item() whenever the address is changed.



Joined: 08/07/2007