fix modules cs
This commit is contained in:
@@ -183,7 +183,6 @@ class AddressController extends BaseFrontController
|
|||||||
|
|
||||||
\Thelia\Log\Tlog::getInstance()->error(sprintf('Error during address deletion : %s', $error_message));
|
\Thelia\Log\Tlog::getInstance()->error(sprintf('Error during address deletion : %s', $error_message));
|
||||||
|
|
||||||
|
|
||||||
// If Ajax Request
|
// If Ajax Request
|
||||||
if ($this->getRequest()->isXmlHttpRequest()) {
|
if ($this->getRequest()->isXmlHttpRequest()) {
|
||||||
if ($error_message) {
|
if ($error_message) {
|
||||||
|
|||||||
@@ -154,11 +154,11 @@ class CartController extends BaseFrontController
|
|||||||
{
|
{
|
||||||
/* recalculate postage amount */
|
/* recalculate postage amount */
|
||||||
$order = $this->getSession()->getOrder();
|
$order = $this->getSession()->getOrder();
|
||||||
if(null !== $order) {
|
if (null !== $order) {
|
||||||
$deliveryModule = $order->getModuleRelatedByDeliveryModuleId();
|
$deliveryModule = $order->getModuleRelatedByDeliveryModuleId();
|
||||||
$deliveryAddress = AddressQuery::create()->findPk($order->chosenDeliveryAddress);
|
$deliveryAddress = AddressQuery::create()->findPk($order->chosenDeliveryAddress);
|
||||||
|
|
||||||
if(null !== $deliveryModule && null !== $deliveryAddress) {
|
if (null !== $deliveryModule && null !== $deliveryAddress) {
|
||||||
$moduleInstance = $this->container->get(sprintf('module.%s', $deliveryModule->getCode()));
|
$moduleInstance = $this->container->get(sprintf('module.%s', $deliveryModule->getCode()));
|
||||||
$postage = $moduleInstance->getPostage($deliveryAddress->getCountry());
|
$postage = $moduleInstance->getPostage($deliveryAddress->getCountry());
|
||||||
|
|
||||||
@@ -170,5 +170,4 @@ class CartController extends BaseFrontController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,11 +68,11 @@ class CouponController extends BaseFrontController
|
|||||||
|
|
||||||
/* recalculate postage amount */
|
/* recalculate postage amount */
|
||||||
$order = $this->getSession()->getOrder();
|
$order = $this->getSession()->getOrder();
|
||||||
if(null !== $order) {
|
if (null !== $order) {
|
||||||
$deliveryModule = $order->getModuleRelatedByDeliveryModuleId();
|
$deliveryModule = $order->getModuleRelatedByDeliveryModuleId();
|
||||||
$deliveryAddress = AddressQuery::create()->findPk($order->chosenDeliveryAddress);
|
$deliveryAddress = AddressQuery::create()->findPk($order->chosenDeliveryAddress);
|
||||||
|
|
||||||
if(null !== $deliveryModule && null !== $deliveryAddress) {
|
if (null !== $deliveryModule && null !== $deliveryAddress) {
|
||||||
$moduleInstance = $this->container->get(sprintf('module.%s', $deliveryModule->getCode()));
|
$moduleInstance = $this->container->get(sprintf('module.%s', $deliveryModule->getCode()));
|
||||||
$postage = $moduleInstance->getPostage($deliveryAddress->getCountry());
|
$postage = $moduleInstance->getPostage($deliveryAddress->getCountry());
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,6 @@ namespace Front\Controller;
|
|||||||
use Propel\Runtime\Exception\PropelException;
|
use Propel\Runtime\Exception\PropelException;
|
||||||
use Thelia\Cart\CartTrait;
|
use Thelia\Cart\CartTrait;
|
||||||
use Thelia\Controller\Front\BaseFrontController;
|
use Thelia\Controller\Front\BaseFrontController;
|
||||||
use Thelia\Core\Event\PdfEvent;
|
|
||||||
use Thelia\Core\HttpFoundation\Response;
|
|
||||||
use Thelia\Core\Template\TemplateHelper;
|
|
||||||
use Thelia\Core\Translation\Translator;
|
use Thelia\Core\Translation\Translator;
|
||||||
use Thelia\Exception\TheliaProcessException;
|
use Thelia\Exception\TheliaProcessException;
|
||||||
use Thelia\Form\Exception\FormValidationException;
|
use Thelia\Form\Exception\FormValidationException;
|
||||||
@@ -202,7 +199,7 @@ class OrderController extends BaseFrontController
|
|||||||
|
|
||||||
if (null !== $placedOrder && null !== $placedOrder->getId()) {
|
if (null !== $placedOrder && null !== $placedOrder->getId()) {
|
||||||
/* order has been placed */
|
/* order has been placed */
|
||||||
if($orderEvent->hasResponse()) {
|
if ($orderEvent->hasResponse()) {
|
||||||
return $orderEvent->getResponse();
|
return $orderEvent->getResponse();
|
||||||
} else {
|
} else {
|
||||||
$this->redirect(URL::getInstance()->absoluteUrl($this->getRoute('order.placed', array('order_id' => $orderEvent->getPlacedOrder()->getId()))));
|
$this->redirect(URL::getInstance()->absoluteUrl($this->getRoute('order.placed', array('order_id' => $orderEvent->getPlacedOrder()->getId()))));
|
||||||
@@ -263,6 +260,7 @@ class OrderController extends BaseFrontController
|
|||||||
{
|
{
|
||||||
/* check customer */
|
/* check customer */
|
||||||
$this->checkAuth();
|
$this->checkAuth();
|
||||||
|
|
||||||
return $this->generateOrderPdf($order_id, ConfigQuery::read('pdf_invoice_file', 'invoice'));
|
return $this->generateOrderPdf($order_id, ConfigQuery::read('pdf_invoice_file', 'invoice'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,6 +268,7 @@ class OrderController extends BaseFrontController
|
|||||||
{
|
{
|
||||||
/* check customer */
|
/* check customer */
|
||||||
$this->checkAuth();
|
$this->checkAuth();
|
||||||
|
|
||||||
return $this->generateOrderPdf($order_id, ConfigQuery::read('pdf_delivery_file', 'delivery'));
|
return $this->generateOrderPdf($order_id, ConfigQuery::read('pdf_delivery_file', 'delivery'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,5 +285,4 @@ class OrderController extends BaseFrontController
|
|||||||
return $this->render('ajax/order-delivery-module-list', $args);
|
return $this->render('ajax/order-delivery-module-list', $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user