Laddawn.com : Duplicate PO Popup - Handle User Response (5-2)

Overview:  Popup is called upon Save and Continue on Payment step of checkout process.  The user is shown orders that have the entered PO, and offered a Continue Y / N option.

 

If the user Clicks Yes:

  • Essentially only close the popup allowing the code to run as if the popup was never called.

 

If the user clicks No:

  • Put the focus on the PO number box, highlight the text.
  • Cancel the processing of the save and continue.

 

Processing Changes.

 

  • Checkout\Index.vbhtml validateSteps
    • Bottom of Case 3
      • Call the popup
      • Return like it failed validation
      • In the Yes function  call $('.buttonNext').trigger('click');

 

Since the popup is asynchronous we need to assume they do not want to continue then trigger the continue if they say yes to the continue.