# How to get the confirm order page customer billing & shipping addrerss details

**URL:** <https://forum.shopware.com/t/how-to-get-the-confirm-order-page-customer-billing-shipping-addrerss-details/54568>\
**Category:** Programmierung\
**Tags:** customelements\
**Created:** [13. August 2018 um 09:25 UTC](https://forum.shopware.com/t/how-to-get-the-confirm-order-page-customer-billing-shipping-addrerss-details/54568 "2018-08-13T09:25:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kanewilliam](https://avatars.discourse-cdn.com/v4/letter/k/53a042/32.png) [@Kanewilliam](https://forum.shopware.com/u/Kanewilliam)\
**Post date:** [13. August 2018 um 09:25 UTC](https://forum.shopware.com/t/how-to-get-the-confirm-order-page-customer-billing-shipping-addrerss-details/54568/1 "2018-08-13T09:25:53Z")

</div>

I have implement country & zip code&nbsp;validation in custom code.&nbsp; So how to get the confirm order page customer billing & shipping addrerss details. Please review my below code.

public static function getSubscribedEvents()  
&nbsp;&nbsp; &nbsp;{  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return array(  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‘Enlight\_Controller\_Action\_PreDispatch\_Frontend\_Checkout’ =\> ‘onFrontendPreDispatchCheckout’,  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;);  
&nbsp;&nbsp; &nbsp;}

&nbsp;

public function onFrontendPreDispatchCheckout(\Enlight\_Controller\_ActionEventArgs $args)  
&nbsp;{  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;$subject = $args-\>getSubject();  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$request = $subject-\>Request();  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$response = $subject-\>Response();  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$action = $request-\>getActionName();  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$view = $subject-\>View();  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp; **&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //// How to get user data & user address**  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (!$request-\>isDispatched() || $response-\>isException() ||&nbsp;  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// only in case action is payment or confirm we should chcek it  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;($action != ‘payment’ && $action != ‘confirm’) ||  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;!$view-\>hasTemplate()  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;) {  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return;  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}

&nbsp; &nbsp;}

&nbsp;

Please let me know i how to get customer order billing & shipping details.

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [13. August 2018 um 09:37 UTC](https://forum.shopware.com/t/how-to-get-the-confirm-order-page-customer-billing-shipping-addrerss-details/54568/2 "2018-08-13T09:37:03Z")

</div>

You should extend the Address Form instead with a custom constraint. Here is a developer docs entry for that&nbsp;[Address Management Guide](https://developers.shopware.com/developers-guide/address-management-guide/#extending-the-address-form)

---

<div class="post-metadata">

**Author:** ![Kanewilliam](https://avatars.discourse-cdn.com/v4/letter/k/53a042/32.png) [@Kanewilliam](https://forum.shopware.com/u/Kanewilliam)\
**Post date:** [13. August 2018 um 09:53 UTC](https://forum.shopware.com/t/how-to-get-the-confirm-order-page-customer-billing-shipping-addrerss-details/54568/3 "2018-08-13T09:53:19Z")

</div>

> [@Shyim schrieb:](https://forum.shopware.com/profile/20792/Shyim "Shyim")
> 
> You should extend the Address Form instead with a custom constraint. Here is a developer docs entry for that&nbsp;[https://developers.shopware.com/developers-guide/address-management-guide/#extending-the-address-form](https://developers.shopware.com/developers-guide/address-management-guide/#extending-the-address-form)
> 
> &nbsp;
> 
> I not needed to add the extra fields. I need only get the address details Like (name, street address ,zipcode) etc…

---

<div class="post-metadata">

**Author:** ![BestShopPossible](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@BestShopPossible](https://forum.shopware.com/u/BestShopPossible)\
**Post date:** [13. August 2018 um 10:54 UTC](https://forum.shopware.com/t/how-to-get-the-confirm-order-page-customer-billing-shipping-addrerss-details/54568/4 "2018-08-13T10:54:30Z")

</div>

It is not about the fields. It is about the constraint you should add to the methods of the address manager.
