This commit is contained in:
Manuel Raynaud
2013-10-25 10:07:21 +02:00
parent 22caf28f80
commit 2c030f910b
91 changed files with 219 additions and 761 deletions

View File

@@ -67,7 +67,6 @@ class CartController extends BaseFrontController
$request->attributes->set('_view', "includes/mini-cart");
}
if ($message) {
$cartAdd->setErrorMessage($message);
$this->getParserContext()->addForm($cartAdd);

View File

@@ -26,7 +26,6 @@ use Thelia\Form\ContactForm;
use Thelia\Form\Exception\FormValidationException;
use Thelia\Model\ConfigQuery;
/**
* Class ContactController
* @package Thelia\Controller\Front
@@ -53,7 +52,7 @@ class ContactController extends BaseFrontController
$this->getMailer()->send($message);
} catch(FormValidationException $e) {
} catch (FormValidationException $e) {
$error_message = $e->getMessage();
}
@@ -70,4 +69,4 @@ class ContactController extends BaseFrontController
$this->redirectToRoute('contact.success');
}
}
}
}

View File

@@ -24,21 +24,11 @@ namespace Thelia\Controller\Front;
use Propel\Runtime\Exception\PropelException;
use Thelia\Core\Event\Coupon\CouponConsumeEvent;
use Thelia\Exception\TheliaProcessException;
use Thelia\Form\CouponCode;
use Thelia\Form\Exception\FormValidationException;
use Thelia\Core\Event\Order\OrderEvent;
use Thelia\Core\Event\TheliaEvents;
use Symfony\Component\HttpFoundation\Request;
use Thelia\Form\OrderDelivery;
use Thelia\Form\OrderPayment;
use Thelia\Log\Tlog;
use Thelia\Model\AddressQuery;
use Thelia\Model\AreaDeliveryModuleQuery;
use Thelia\Model\Base\OrderQuery;
use Thelia\Model\ModuleQuery;
use Thelia\Model\Order;
use Thelia\Tools\URL;
/**
* Class CouponController

View File

@@ -51,7 +51,6 @@ class CustomerController extends BaseFrontController
{
use \Thelia\Cart\CartTrait;
public function newPasswordAction()
{
if (! $this->getSecurityContext()->hasCustomerUser()) {
@@ -156,7 +155,6 @@ class CustomerController extends BaseFrontController
$this->getParserContext()->addForm($customerProfilUpdateForm);
}
public function updatePasswordAction()
{
if ($this->getSecurityContext()->hasCustomerUser()) {
@@ -220,14 +218,14 @@ class CustomerController extends BaseFrontController
$nlEvent->setFirstname($updatedCustomer->getFirstname());
$nlEvent->setLastname($updatedCustomer->getLastname());
if(null !== $newsletter = NewsletterQuery::create()->findOneByEmail($newsletterOldEmail)) {
if (null !== $newsletter = NewsletterQuery::create()->findOneByEmail($newsletterOldEmail)) {
$nlEvent->setId($newsletter->getId());
$this->dispatch(TheliaEvents::NEWSLETTER_UPDATE, $nlEvent);
} else {
$this->dispatch(TheliaEvents::NEWSLETTER_SUBSCRIBE, $nlEvent);
}
} else {
if(null !== $newsletter = NewsletterQuery::create()->findOneByEmail($newsletterOldEmail)) {
if (null !== $newsletter = NewsletterQuery::create()->findOneByEmail($newsletterOldEmail)) {
$nlEvent = new NewsletterEvent($updatedCustomer->getEmail(), $this->getRequest()->getSession()->getLang()->getLocale());
$nlEvent->setId($newsletter->getId());
$this->dispatch(TheliaEvents::NEWSLETTER_UNSUBSCRIBE, $nlEvent);

View File

@@ -23,7 +23,6 @@
namespace Thelia\Controller\Front;
/**
* Class Mail
* @package Thelia\Controller\Front
@@ -46,4 +45,4 @@ class Mail extends BaseFrontController
exit;
}
}
}

View File

@@ -27,7 +27,6 @@ use Thelia\Core\Event\Newsletter\NewsletterEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Form\NewsletterForm;
/**
* Class NewsletterController
* @package Thelia\Controller\Front
@@ -50,15 +49,14 @@ class NewsletterController extends BaseFrontController
$this->getRequest()->getSession()->getLang()->getLocale()
);
if (null !== $customer = $this->getSecurityContext()->getCustomerUser())
{
if (null !== $customer = $this->getSecurityContext()->getCustomerUser()) {
$event->setFirstname($customer->getFirstname());
$event->setLastname($customer->getLastname());
}
$this->dispatch(TheliaEvents::NEWSLETTER_SUBSCRIBE, $event);
} catch(\Exception $e) {
} catch (\Exception $e) {
$error_message = $e->getMessage();
}
@@ -90,4 +88,4 @@ class NewsletterController extends BaseFrontController
}
}
}
}