[Skip to main content](#vessel-content)

#   How to prevent invalid addresses

##

- **[mkj101us](/forum/user/9513-mkj101us "View mkj101us's Profile")**
- [![mkj101us's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9513.jpeg)](/forum/user/9513-mkj101us "View mkj101us's Profile") Topic Author
- [ Offline](/forum/user/9513-mkj101us)

Less More

- Posts: 12
- Thank you received: 0
-
-

14 years 1 month ago [\#67507](#67507) by [mkj101us](/forum/user/9513-mkj101us "View mkj101us's Profile")  *[How to prevent invalid addresses](/forum/2-general-talk-about-hikashop/67507-how-to-prevent-invalid-addresses#67507 "Hello,  Is there a way to prevent invalid addresses from being entered? If not, how to disable the &quot;Next&quot; 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 &quot;Next&quot; button to try to complete the purchase.  &quot;Error while sending XML to UPS. Error code: 111210. Message: The requested service is unavailable between the selected locations.&quot;  Thanks, -Michael")* was created by *[mkj101us](/forum/user/9513-mkj101us "View mkj101us's Profile")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3NTA3LWhvdy10by1wcmV2ZW50LWludmFsaWQtYWRkcmVzc2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

14 years 1 month ago [\#67556](#67556) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: How to prevent invalid addresses](/forum/2-general-talk-about-hikashop/67507-how-to-prevent-invalid-addresses#67556 "Hello,  Is there a way to prevent invalid addresses from being entered? If not, how to disable the &quot;Next&quot; 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 &quot;Next&quot; button to try to complete the purchase.  &quot;Error while sending XML to UPS. Error code: 111210. Message: The requested service is unavailable between the selected locations.&quot;  Thanks, -Michael")*

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-&gt;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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY3NTA3LWhvdy10by1wcmV2ZW50LWludmFsaWQtYWRkcmVzc2VzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.079 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
