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

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

public static function getSubscribedEvents()
    {
        return array(
            ‘Enlight_Controller_Action_PreDispatch_Frontend_Checkout’ => ‘onFrontendPreDispatchCheckout’,
        );
    }

 

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

   }

 

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

You should extend the Address Form instead with a custom constraint. Here is a developer docs entry for that Address Management Guide

1 „Gefällt mir“

@Shyim schrieb:

You should extend the Address Form instead with a custom constraint. Here is a developer docs entry for that https://developers.shopware.com/developers-guide/address-management-guide/#extending-the-address-form

 

I not needed to add the extra fields. I need only get the address details Like (name, street address ,zipcode) etc…

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