diff --git a/core/lib/Thelia/Controller/Front/AddressController.php b/core/lib/Thelia/Controller/Front/AddressController.php index 94d0f78d7..6ab6e72e8 100644 --- a/core/lib/Thelia/Controller/Front/AddressController.php +++ b/core/lib/Thelia/Controller/Front/AddressController.php @@ -101,7 +101,7 @@ class AddressController extends BaseFrontController $address = AddressQuery::create()->findPk($address_id); if (!$address || $customer->getId() != $address->getCustomerId()) { - $this->redirectToRoute("home"); + $this->redirectToRoute('default'); } $this->getParserContext()->set("address_id", $address_id); @@ -122,11 +122,11 @@ class AddressController extends BaseFrontController $address = AddressQuery::create()->findPk($address_id); if (null === $address) { - $this->redirectToRoute("home"); + $this->redirectToRoute('default'); } if ($address->getCustomer()->getId() != $customer->getId()) { - $this->redirectToRoute("home"); + $this->redirectToRoute('default'); } $event = $this->createAddressEvent($form); @@ -161,12 +161,12 @@ class AddressController extends BaseFrontController $address = AddressQuery::create()->findPk($address_id); if (!$address || $customer->getId() != $address->getCustomerId()) { - $this->redirectToRoute("home"); + $this->redirectToRoute('default'); } $this->dispatch(TheliaEvents::ADDRESS_DELETE, new AddressEvent($address)); - $this->redirectToRoute("customer.account.view"); + $this->redirectToRoute('default', array('view'=>'account')); } protected function createAddressEvent($form) diff --git a/core/lib/Thelia/Controller/Front/BaseFrontController.php b/core/lib/Thelia/Controller/Front/BaseFrontController.php index fadf65795..54ac1d703 100755 --- a/core/lib/Thelia/Controller/Front/BaseFrontController.php +++ b/core/lib/Thelia/Controller/Front/BaseFrontController.php @@ -56,7 +56,7 @@ class BaseFrontController extends BaseController public function checkAuth() { if ($this->getSecurityContext()->hasCustomerUser() === false) { - $this->redirectToRoute("customer.login.view"); + $this->redirectToRoute('default', array('view'=>'login')); } } @@ -64,7 +64,7 @@ class BaseFrontController extends BaseController { $cart = $this->getSession()->getCart(); if ($cart===null || $cart->countCartItems() == 0) { - $this->redirectToRoute("cart.view"); + $this->redirectToRoute('default', array('view'=>'cart')); } } diff --git a/core/lib/Thelia/Controller/Front/CustomerController.php b/core/lib/Thelia/Controller/Front/CustomerController.php index 5611675e8..a51fb98bc 100755 --- a/core/lib/Thelia/Controller/Front/CustomerController.php +++ b/core/lib/Thelia/Controller/Front/CustomerController.php @@ -109,7 +109,7 @@ class CustomerController extends BaseFrontController $cart = $this->getCart($this->getRequest()); if ($cart->getCartItems()->count() > 0) { - $this->redirectToRoute("cart.view"); + $this->redirectToRoute('default', array('view'=>'cart')); } else { $this->redirectSuccess($customerCreation); } @@ -278,7 +278,7 @@ class CustomerController extends BaseFrontController // If User is a new customer if ($form->get('account')->getData() == 0 && !$form->get("email")->getErrors()) { - $this->redirectToRoute("customer.create.view", array("email" => $form->get("email")->getData())); + $this->redirectToRoute("default", array("view" => "register","email" => $form->get("email")->getData())); } else { try { diff --git a/core/lib/Thelia/Controller/Front/OrderController.php b/core/lib/Thelia/Controller/Front/OrderController.php index 968597b8a..21aa22f4f 100755 --- a/core/lib/Thelia/Controller/Front/OrderController.php +++ b/core/lib/Thelia/Controller/Front/OrderController.php @@ -197,7 +197,7 @@ class OrderController extends BaseFrontController $this->redirect(URL::getInstance()->absoluteUrl($this->getRoute('order.placed', array('order_id' => $orderEvent->getPlacedOrder()->getId())))); } else { /* order has not been placed */ - $this->redirectToRoute("cart.view"); + $this->redirectToRoute('default', array('view'=>'cart')); } }