How to prevent invalid addresses

  • Posts: 12
  • Thank you received: 0
12 years 1 month ago #67507

Hello,

Is there a way to prevent invalid addresses from being entered? If not, how to disable the "Next" button on the checkout page if there are no shipping options available?

The problem I am experiencing on checkout is:

1. Enter address of:
324234 MAIN
00000 ASDFFD Alabama, USA
// that not a valid address
2. On submit of address, the UPS shipping plugin fails // as expected, but a nasty error displayed to user - unexpected and unwanted

I don't want the error below shown to the user nor do I want them to be able to click on the "Next" button to try to complete the purchase.

"Error while sending XML to UPS. Error code: 111210. Message: The requested service is unavailable between the selected locations."

Thanks,
-Michael

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
12 years 1 month ago #67556

Hi,

They shouldn't be able to finish the order. When clicking next, the system will display again the checkout with the error message.

If you want to change the message, you would have to change the line:
$app->enqueueMessage( 'Error while sending XML to UPS. Error code: '.$shipment[$i].'. Message: '.$shipment[$i].'', 'error');

of the file plugins/hikashopshipping/ups/ups.php

Please Log in or Create an account to join the conversation.

Time to create page: 0.052 seconds
Powered by Kunena Forum