Skip to content

Commit

Permalink
Fixed bug caused by missing call of event sylius.cart_change
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetragramat authored Apr 3, 2017
1 parent faf087f commit 17f4ca5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Sylius\Bundle\CoreBundle\Controller;

use FOS\RestBundle\Controller\FOSRestController;
use Sylius\Component\Cart\SyliusCartEvents;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Core\OrderCheckoutTransitions;
use Sylius\Component\Core\SyliusCheckoutEvents;
Expand Down Expand Up @@ -72,6 +73,9 @@ public function addressingAction(Request $request, OrderInterface $order)
return new Response('Method not allowed!', 405);
}

// make sure sylius.cart_change was called
$this->dispatchCheckoutEvent(SyliusCartEvents::CART_CHANGE, $order);

$this->dispatchCheckoutEvent(SyliusCheckoutEvents::ADDRESSING_INITIALIZE, $order);

$form = $this->createCheckoutAddressingForm($order);
Expand Down

0 comments on commit 17f4ca5

Please sign in to comment.