Merge branch 'master' into tinymce
Conflicts: local/modules/Tinymce/templates/backOffice/default/include/tinymce_init.tpl
This commit is contained in:
@@ -17,6 +17,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Thelia\Core\Event\Order\OrderEvent;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Core\Template\ParserInterface;
|
||||
use Thelia\Log\Tlog;
|
||||
use Thelia\Mailer\MailerFactory;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Model\MessageQuery;
|
||||
@@ -47,7 +48,7 @@ class SendMail implements EventSubscriberInterface
|
||||
$order = $event->getOrder();
|
||||
$colissimo = new Colissimo();
|
||||
|
||||
if ($order->getStatusId() == OrderStatus::CODE_SENT && $order->getDeliveryModuleId() == $colissimo->getModuleModel()->getId()) {
|
||||
if ($order->isSent() && $order->getDeliveryModuleId() == $colissimo->getModuleModel()->getId()) {
|
||||
$contact_email = ConfigQuery::read('store_email');
|
||||
|
||||
if ($contact_email) {
|
||||
@@ -83,6 +84,12 @@ class SendMail implements EventSubscriberInterface
|
||||
$message->buildMessage($this->parser, $instance);
|
||||
|
||||
$this->mailer->send($instance);
|
||||
|
||||
Tlog::getInstance()->debug("Colissimo shipping message sent to customer ".$customer->getEmail());
|
||||
}
|
||||
else {
|
||||
$customer = $order->getCustomer();
|
||||
Tlog::getInstance()->debug("Colissimo shipping message no contact email customer_id", $customer->getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,4 +120,4 @@ class SendMail implements EventSubscriberInterface
|
||||
TheliaEvents::ORDER_UPDATE_STATUS => array("updateStatus", 128)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +160,11 @@
|
||||
<default key="_view">order-invoice</default>
|
||||
</route>
|
||||
|
||||
<route id="order.coupon.clear" path="/order/clear-coupons">
|
||||
<default key="_controller">Front\Controller\CouponController::clearAllCouponsAction</default>
|
||||
<default key="_view">order-invoice</default>
|
||||
</route>
|
||||
|
||||
<route id="order.payment.process" path="/order/pay">
|
||||
<default key="_controller">Front\Controller\OrderController::pay</default>
|
||||
</route>
|
||||
|
||||
@@ -174,10 +174,10 @@ class CartController extends BaseFrontController
|
||||
$order = $this->getSession()->getOrder();
|
||||
if (null !== $order) {
|
||||
$deliveryModule = $order->getModuleRelatedByDeliveryModuleId();
|
||||
$deliveryAddress = AddressQuery::create()->findPk($order->chosenDeliveryAddress);
|
||||
$deliveryAddress = AddressQuery::create()->findPk($order->getChoosenDeliveryAddress());
|
||||
|
||||
if (null !== $deliveryModule && null !== $deliveryAddress) {
|
||||
$moduleInstance = $this->container->get(sprintf('module.%s', $deliveryModule->getCode()));
|
||||
$moduleInstance = $deliveryModule->getModuleInstance($this->container);
|
||||
|
||||
$orderEvent = new OrderEvent($order);
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ class ContactController extends BaseFrontController
|
||||
$form = $this->validateForm($contactForm);
|
||||
|
||||
$message = \Swift_Message::newInstance($form->get('subject')->getData())
|
||||
->addFrom($form->get('email')->getData(), $form->get('name')->getData())
|
||||
->addFrom(ConfigQuery::read("store_email"), $form->get('name')->getData())
|
||||
->addReplyTo($form->get('email')->getData(), $form->get('name')->getData())
|
||||
->addTo(ConfigQuery::read('store_email'), ConfigQuery::read('store_name'))
|
||||
->setBody($form->get('message')->getData())
|
||||
;
|
||||
|
||||
@@ -40,9 +40,16 @@ use Thelia\Module\Exception\DeliveryException;
|
||||
*/
|
||||
class CouponController extends BaseFrontController
|
||||
{
|
||||
/**
|
||||
* Clear all coupons.
|
||||
*/
|
||||
public function clearAllCouponsAction() {
|
||||
// Dispatch Event to the Action
|
||||
$this->getDispatcher()->dispatch(TheliaEvents::COUPON_CLEAR_ALL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Coupon consuming
|
||||
* Coupon consuming
|
||||
*/
|
||||
public function consumeAction()
|
||||
{
|
||||
@@ -69,12 +76,14 @@ class CouponController extends BaseFrontController
|
||||
|
||||
/* recalculate postage amount */
|
||||
$order = $this->getSession()->getOrder();
|
||||
|
||||
if (null !== $order) {
|
||||
$deliveryModule = $order->getModuleRelatedByDeliveryModuleId();
|
||||
$deliveryAddress = AddressQuery::create()->findPk($order->chosenDeliveryAddress);
|
||||
$deliveryAddress = AddressQuery::create()->findPk($order->getChoosenDeliveryAddress());
|
||||
|
||||
if (null !== $deliveryModule && null !== $deliveryAddress) {
|
||||
$moduleInstance = $this->container->get(sprintf('module.%s', $deliveryModule->getCode()));
|
||||
|
||||
$moduleInstance = $deliveryModule->getModuleInstance($this->container);
|
||||
|
||||
$orderEvent = new OrderEvent($order);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ use Thelia\Controller\Front\BaseFrontController;
|
||||
use Thelia\Core\HttpFoundation\Request;
|
||||
use Thelia\Core\HttpFoundation\Response;
|
||||
use Thelia\Log\Tlog;
|
||||
use Thelia\Model\Base\FolderQuery;
|
||||
use Thelia\Model\FolderQuery;
|
||||
use Thelia\Model\CategoryQuery;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Model\Folder;
|
||||
|
||||
@@ -88,7 +88,8 @@ class OrderController extends BaseFrontController
|
||||
}
|
||||
|
||||
/* get postage amount */
|
||||
$moduleInstance = $this->container->get(sprintf('module.%s', $deliveryModule->getCode()));
|
||||
$moduleInstance = $deliveryModule->getModuleInstance($this->container);
|
||||
|
||||
$postage = $moduleInstance->getPostage($deliveryAddress->getCountry());
|
||||
|
||||
$orderEvent = $this->getOrderEvent();
|
||||
|
||||
Reference in New Issue
Block a user