See https://drupal.org/node/1982560

If the 'continue' button on the checkout form is pressed while shipping is being calculated an ajax error is thrown, and the calculation results are unpredictable.

The continue button should be disabled while this ajax operation is happening.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sinn’s picture

Status: Active » Needs review
FileSize
1.85 KB

I had similar issue: if we change address field and then right away press Continue, address isn't copied. If we click Continue right away after changing form item 2 ajax started at the same time.

Patch attached.

stefank’s picture

@sinn Thanks,

That works for me, as the ajax callback was just hanging, when an user changed some field in address e.x. country and then fast clicked the continue button.

googletorp’s picture

Status: Needs review » Needs work

I'm not too fond of this solution, since it overwrites the complete function which could be anything. If things were to change, we would have to maintain it in the module.

I would like to see a solution where we don't have to altering cores AJAX handling.

Rodlangh’s picture

@sinn

Could you explain why you copy the checkout button before disabling it in your patch? Is it necessary?

sinn’s picture

@ Rodlangh

Copied checkout button is fake without click event. We need this one to because we don't know exactly what events are in original button.

button.clone().insertAfter(button).addClass('checkout-continue-copy').click(function(e){
  e.preventDefault();
});

In another case we need to remove/add click event every time. I think it is more complicated.

IckZ’s picture

any other idea how to solve this? I have the same problem.

googletorp’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)
donquixote’s picture

How is this "outdated"?
It still applies today.
See #2938233: Shipping cost based on outdated address with one-page ajax checkout