Correction d'un bogue dans l'envoi de mail ColissimoWs + finalisation module DHL
This commit is contained in:
@@ -361,8 +361,7 @@ class Order extends BaseOrder
|
||||
{
|
||||
if (is_array($statusCode)) {
|
||||
return in_array($this->getOrderStatus()->getCode(), $statusCode);
|
||||
} else {
|
||||
return $this->getOrderStatus()->getCode() == $statusCode;
|
||||
} else {return $this->getOrderStatus()->getCode() == $statusCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,10 @@ class ShippingNotificationSender extends BaseAction implements EventSubscriberIn
|
||||
*/
|
||||
public function sendShippingNotification(OrderEvent $event)
|
||||
{
|
||||
if ($event->getOrder()->isSent()) {
|
||||
$order = $event->getOrder();
|
||||
$module = new ColissimoWs();
|
||||
|
||||
if ($event->getOrder()->isSent() && $order->getDeliveryModuleId() == $module->getModuleModel()->getId()) {
|
||||
$contact_email = ConfigQuery::getStoreEmail();
|
||||
|
||||
if ($contact_email) {
|
||||
|
||||
@@ -11,7 +11,7 @@ use Thelia\Core\Event\TheliaEvents;
|
||||
/**
|
||||
* Class AreaDeletedListener
|
||||
* @package AreaDeletedListener\EventListener
|
||||
* @author Thomas Arnaud <tarnaud@openstudio.fr>
|
||||
* @author Laurent LE CORRE <laurent@thecoredev.fr>
|
||||
*/
|
||||
class AreaDeletedListener implements EventSubscriberInterface
|
||||
{
|
||||
@@ -20,13 +20,13 @@ class AreaDeletedListener implements EventSubscriberInterface
|
||||
*/
|
||||
public function updateConfig(AreaDeleteEvent $event)
|
||||
{
|
||||
if (null !== $data = DHL::getConfigValue(DHLConfigValue::PRICES, null)) {
|
||||
$areaId = $event->getAreaId();
|
||||
$json_data = json_decode($data, true);
|
||||
unset($json_data[$areaId]);
|
||||
|
||||
DHL::setConfigValue(DHLConfigValue::PRICES, json_encode($json_data, true));
|
||||
}
|
||||
// if (null !== $data = DHL::getConfigValue(DHLConfigValue::PRICES, null)) {
|
||||
// $areaId = $event->getAreaId();
|
||||
// $json_data = json_decode($data, true);
|
||||
// unset($json_data[$areaId]);
|
||||
//
|
||||
// DHL::setConfigValue(DHLConfigValue::PRICES, json_encode($json_data, true));
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,7 @@ class SendMail implements EventSubscriberInterface
|
||||
->findOne();
|
||||
|
||||
if (false === $message) {
|
||||
throw new \Exception("Failed to load message 'order_confirmation'.");
|
||||
throw new \Exception("Failed to load message 'mail_dhl'.");
|
||||
}
|
||||
|
||||
$order = $event->getOrder();
|
||||
|
||||
Reference in New Issue
Block a user