We have a single page checkout with profile copying (from shipping to billing) is enabled and set by default. With two countries available in Shipping (AU and NZ), and NZ's 'State' field is not required.

We have three shipping rules - one is free shipping over $100, the others are rates for Australia and New Zealand based on the country selection in the shipping address form.

When the customer selects NZ as the country, the shipping rate correctly updates with AJAX. But if the user selects AU after this point, the form will not recalculate shipping (it appears that the AJAX does not even fire).

Note that 'My billing info is the same as my shipping info' is selected by default, so the billing info pane is hidden. If the user unchecks this option and then rechecks it, the shipping recalculation IS triggered.

I've found that I can recreate normal shipping recalculation in the AU - NZ - AU issue by removing the if statement in commerce_shipping.js that checks to see if there is an ajax throbber active in any customer profile pane. I'm not 100% sure what it was doing in the first place, but by removing it the js now checks to see if the required fields are filled (important) and the recalculation call fires every time the country is changed.

CommentFileSizeAuthor
#1 2054359-1.patch1.21 KBmeeli
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

meeli’s picture

Status: Active » Needs review
FileSize
1.21 KB

Here's a patch as described above.

googletorp’s picture

Assigned: Unassigned » rszrama

Ryan, can you look at this?

torgosPizza’s picture

Issue summary: View changes
Status: Needs review » Needs work

Just FYI this patch does not seem to work. After applying it to the current version of Commerce Shipping, no Ajax calls are fired when selecting an Addressbook address for shipping.