diff --git a/local/modules/DHL/DHL.php b/local/modules/DHL/DHL.php index 58b07421..0136f0e4 100644 --- a/local/modules/DHL/DHL.php +++ b/local/modules/DHL/DHL.php @@ -2,7 +2,6 @@ namespace DHL; -use DHL\Model\Config\DHLConfigValue; use DHL\Model\DHLDeliveryPrice; use DHL\Model\DHLDeliveryPriceQuery; use Propel\Runtime\ActiveQuery\Criteria; @@ -184,12 +183,4 @@ class DHL extends AbstractDeliveryModule return $postage; } -// public function update($currentVersion, $newVersion, ConnectionInterface $con = null) -// { -// $uploadDir = __DIR__ . '/Config/prices.json'; -// if (is_readable($uploadDir) && DHL::getConfigValue(DHLConfigValue::PRICES, null) == null) { -// DHL::setConfigValue(DHLConfigValue::PRICES, file_get_contents($uploadDir)); -// } -// } - } diff --git a/local/modules/DHL/Listener/SendMail.php b/local/modules/DHL/Listener/SendMail.php index f40a649b..e231beb1 100644 --- a/local/modules/DHL/Listener/SendMail.php +++ b/local/modules/DHL/Listener/SendMail.php @@ -1,18 +1,9 @@ + * @author Laurent LE CORRE */ class SendMail implements EventSubscriberInterface { - protected $parser; - protected $mailer; public function __construct(ParserInterface $parser, MailerFactory $mailer) @@ -69,7 +56,7 @@ class SendMail implements EventSubscriberInterface $this->parser->assign('order_date', $order->getCreatedAt()); $this->parser->assign('update_date', $order->getUpdatedAt()); $this->parser->assign('package', $order->getDeliveryRef()); - + $this->parser->assign('tracking_url', DHL::getConfigValue(DHLConfigValue::TRACKING_URL)); $message ->setLocale($order->getLang()->getLocale()); @@ -80,7 +67,6 @@ class SendMail implements EventSubscriberInterface ; // Build subject and body - $message->buildMessage($this->parser, $instance); $this->mailer->send($instance);