Skip to content

Commit

Permalink
revert changes in PaymentShippingStep from previous release
Browse files Browse the repository at this point in the history
  • Loading branch information
David Alexa committed Jan 22, 2016
1 parent 66493e8 commit f0961c3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ public function forwardAction(ProcessContextInterface $context)

$this->dispatchCheckoutEvent(SyliusCheckoutEvents::SHIPPING_INITIALIZE, $order);
$formShippingPre = $this->createCheckoutShippingForm($order, null);
$formShippingPre->handleRequest($request);

if ($formShippingPre->get('country')->getData() === null) {
$choices = $formShippingPre->get('country')->getConfig()->getOption('choice_list')->getChoices();
$formShippingPre->get('country')->setData(reset($choices));
}
$formShippingPre->handleRequest($request);

$this->dispatchCheckoutEvent(SyliusCheckoutEvents::SHIPPING_INITIALIZE, $order);
$formShipping = $this->createCheckoutShippingForm($order, $formShippingPre->get('country')->getData());
$formShipping->handleRequest($request);

$this->dispatchCheckoutEvent(SyliusCheckoutEvents::ADDRESSING_INITIALIZE, $order);
if (is_null($order->getShippingAddress()) || $order->getShippingAddress()->getFirstName() == 'anon.') {
Expand Down

0 comments on commit f0961c3

Please sign in to comment.