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.