From b0fb0fdd437fa5e00df21965d2dd8484f0ccec6e Mon Sep 17 00:00:00 2001 From: touffies Date: Thu, 24 Oct 2013 19:39:54 +0200 Subject: [PATCH 1/5] I need the route cart.view for the OrderException.php file. --- core/lib/Thelia/Config/Resources/routing/front.xml | 5 +++++ core/lib/Thelia/Controller/Front/BaseFrontController.php | 2 +- core/lib/Thelia/Controller/Front/CustomerController.php | 2 +- core/lib/Thelia/Controller/Front/OrderController.php | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/lib/Thelia/Config/Resources/routing/front.xml b/core/lib/Thelia/Config/Resources/routing/front.xml index 981e8130f..cf7797cc9 100755 --- a/core/lib/Thelia/Config/Resources/routing/front.xml +++ b/core/lib/Thelia/Config/Resources/routing/front.xml @@ -95,6 +95,11 @@ + + Thelia\Controller\Front\DefaultController::noAction + cart + + Thelia\Controller\Front\CartController::addItem diff --git a/core/lib/Thelia/Controller/Front/BaseFrontController.php b/core/lib/Thelia/Controller/Front/BaseFrontController.php index 54ac1d703..5892194a4 100755 --- a/core/lib/Thelia/Controller/Front/BaseFrontController.php +++ b/core/lib/Thelia/Controller/Front/BaseFrontController.php @@ -64,7 +64,7 @@ class BaseFrontController extends BaseController { $cart = $this->getSession()->getCart(); if ($cart===null || $cart->countCartItems() == 0) { - $this->redirectToRoute('default', array('view'=>'cart')); + $this->redirectToRoute('cart.view'); } } diff --git a/core/lib/Thelia/Controller/Front/CustomerController.php b/core/lib/Thelia/Controller/Front/CustomerController.php index a51fb98bc..23f2e0f30 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('default', array('view'=>'cart')); + $this->redirectToRoute('cart.view'); } else { $this->redirectSuccess($customerCreation); } diff --git a/core/lib/Thelia/Controller/Front/OrderController.php b/core/lib/Thelia/Controller/Front/OrderController.php index 21aa22f4f..d225210ae 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('default', array('view'=>'cart')); + $this->redirectToRoute('cart.view'); } } @@ -205,7 +205,7 @@ class OrderController extends BaseFrontController { /* check if the placed order matched the customer */ $placedOrder = OrderQuery::create()->findPk( - $this->getRequest()->attributes->get('order_id') + $this->getRequest()->attributes->get('order_id'); ); if (null === $placedOrder) { From d8b2ef28fcb97e9d6260d71c58672737aed8b12f Mon Sep 17 00:00:00 2001 From: touffies Date: Thu, 24 Oct 2013 19:45:30 +0200 Subject: [PATCH 2/5] Issue 51, removed s at account information --- templates/default/account.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/default/account.html b/templates/default/account.html index 50d37e7d3..100080768 100644 --- a/templates/default/account.html +++ b/templates/default/account.html @@ -58,7 +58,7 @@
  • - + {intl l="Change my password"}
  • From 64985faedc5a18fbc745cfdad9c452ff94172931 Mon Sep 17 00:00:00 2001 From: touffies Date: Thu, 24 Oct 2013 19:49:52 +0200 Subject: [PATCH 3/5] small fix --- core/lib/Thelia/Controller/Front/OrderController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/Thelia/Controller/Front/OrderController.php b/core/lib/Thelia/Controller/Front/OrderController.php index d225210ae..bb0604bd1 100755 --- a/core/lib/Thelia/Controller/Front/OrderController.php +++ b/core/lib/Thelia/Controller/Front/OrderController.php @@ -205,7 +205,7 @@ class OrderController extends BaseFrontController { /* check if the placed order matched the customer */ $placedOrder = OrderQuery::create()->findPk( - $this->getRequest()->attributes->get('order_id'); + $this->getRequest()->attributes->get('order_id') ); if (null === $placedOrder) { From 54eda797a242bb4e018e5cb3faa528cd344f0688 Mon Sep 17 00:00:00 2001 From: touffies Date: Thu, 24 Oct 2013 19:56:15 +0200 Subject: [PATCH 4/5] Replace /login and /register by /logout and /account in the footer if the customer is logged in --- templates/default/layout.tpl | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/templates/default/layout.tpl b/templates/default/layout.tpl index 37d275aa9..6933dbb26 100644 --- a/templates/default/layout.tpl +++ b/templates/default/layout.tpl @@ -222,22 +222,29 @@ URL: http://www.thelia.net
    -

    Usefull links

    +

    {intl l="Usefull links"}

    -

    Follow us

    +

    {intl l="Follow us"}

    Lorem ipsum dolor sit amet, consectetur adipisicing elit.

      @@ -315,7 +322,7 @@ URL: http://www.thelia.net
      -

      Contact Us

      +

      {intl l="Contact Us"}

      From 29c7d077c6734723299ff00fac8e3e94bbb0000c Mon Sep 17 00:00:00 2001 From: touffies Date: Thu, 24 Oct 2013 21:12:32 +0200 Subject: [PATCH 5/5] Wrong form name thelia.admin.customer.modification replaced by thelia.admin.customer.update --- templates/admin/default/customer-edit.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/admin/default/customer-edit.html b/templates/admin/default/customer-edit.html index 6fea48aea..71c6b8695 100644 --- a/templates/admin/default/customer-edit.html +++ b/templates/admin/default/customer-edit.html @@ -29,7 +29,7 @@
      - {form name="thelia.admin.customer.modification"} + {form name="thelia.admin.customer.update"}