diff --git a/core/lib/Thelia/Action/Customer.php b/core/lib/Thelia/Action/Customer.php
index 1903cc45a..137ba33d8 100644
--- a/core/lib/Thelia/Action/Customer.php
+++ b/core/lib/Thelia/Action/Customer.php
@@ -27,10 +27,18 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\ActionEvent;
use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent;
use Thelia\Core\Event\Customer\CustomerEvent;
+use Thelia\Core\Event\LostPasswordEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Security\SecurityContext;
+use Thelia\Core\Template\ParserInterface;
+use Thelia\Mailer\MailerFactory;
+use Thelia\Model\ConfigQuery;
use Thelia\Model\Customer as CustomerModel;
use Thelia\Core\Event\Customer\CustomerLoginEvent;
+use Thelia\Model\CustomerQuery;
+use Thelia\Model\LangQuery;
+use Thelia\Model\MessageQuery;
+use Thelia\Tools\Password;
/**
*
@@ -44,9 +52,15 @@ class Customer extends BaseAction implements EventSubscriberInterface
{
protected $securityContext;
- public function __construct(SecurityContext $securityContext)
+ protected $parser;
+
+ protected $mailer;
+
+ public function __construct(SecurityContext $securityContext, ParserInterface $parser, MailerFactory $mailer)
{
$this->securityContext = $securityContext;
+ $this->mailer = $mailer;
+ $this->parser = $parser;
}
public function create(CustomerCreateOrUpdateEvent $event)
@@ -140,6 +154,60 @@ class Customer extends BaseAction implements EventSubscriberInterface
$this->securityContext->clearCustomerUser();
}
+ public function lostPassword(LostPasswordEvent $event)
+ {
+ $contact_email = ConfigQuery::read('store_email');
+
+ if ($contact_email) {
+ if (null !== $customer = CustomerQuery::create()->filterByEmail($event->getEmail())->findOne()) {
+
+ $password = Password::generateRandom(8);
+
+ $customer
+ ->setPassword($password)
+ ->save()
+ ;
+
+ if ($customer->getLang() !== null) {
+ $lang = LangQuery::create()
+ ->findPk($customer->getLang());
+
+ $locale = $lang->getLocale();
+ } else {
+ $lang = LangQuery::create()
+ ->filterByByDefault(1)
+ ->findOne();
+
+ $locale = $lang->getLocale();
+ }
+
+ $message = MessageQuery::create()
+ ->filterByName('lost_password')
+ ->findOne();
+
+ $message->setLocale($locale);
+
+ if (false === $message) {
+ throw new \Exception("Failed to load message 'order_confirmation'.");
+ }
+
+ $this->parser->assign('password', $password);
+
+ $instance = \Swift_Message::newInstance()
+ ->addTo($customer->getEmail(), $customer->getFirstname()." ".$customer->getLastname())
+ ->addFrom($contact_email, ConfigQuery::read('store_name'))
+ ;
+
+ // Build subject and body
+
+ $message->buildMessage($this->parser, $instance);
+
+ $this->mailer->send($instance);
+
+ }
+ }
+ }
+
/**
* Returns an array of event names this subscriber wants to listen to.
*
@@ -169,6 +237,7 @@ class Customer extends BaseAction implements EventSubscriberInterface
TheliaEvents::CUSTOMER_LOGOUT => array('logout', 128),
TheliaEvents::CUSTOMER_LOGIN => array('login', 128),
TheliaEvents::CUSTOMER_DELETEACCOUNT => array('delete', 128),
+ TheliaEvents::LOST_PASSWORD => array('lostPassword', 128)
);
}
}
diff --git a/core/lib/Thelia/Config/Resources/action.xml b/core/lib/Thelia/Config/Resources/action.xml
index 717c96975..51f0b5fcc 100644
--- a/core/lib/Thelia/Config/Resources/action.xml
+++ b/core/lib/Thelia/Config/Resources/action.xml
@@ -36,6 +36,8 @@
+
+
diff --git a/install/insert.sql b/install/insert.sql
index a88d36ce6..177d2e30e 100644
--- a/install/insert.sql
+++ b/install/insert.sql
@@ -1326,9 +1326,12 @@ INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES
INSERT INTO `message` (`id`, `name`, `secured`, `created_at`, `updated_at`, `version`, `version_created_at`, `version_created_by`) VALUES
-(1, 'order_confirmation', NULL, NOW(), NOW(), 2, NOW(), NULL);
+(1, 'order_confirmation', NULL, NOW(), NOW(), 2, NOW(), NULL),
+(2, 'lost_password', 1, NOW(), NOW(), 2, NOW(), NULL);
INSERT INTO `message_i18n` (`id`, `locale`, `title`, `subject`, `text_message`, `html_message`) VALUES
(1, 'en_US', 'order confirmation', 'Commande : Commande : {$order_ref}', '{assign var="order_id" value=1}\r\n\r\n{loop name="order.invoice" type="order" id=$order_id customer="*"}\r\n {loop name="currency.order" type="currency" id=$CURRENCY}\r\n {assign "orderCurrency" $CODE}\r\n {/loop}\r\n{loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS}\r\n{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}{$FIRSTNAME} {$LASTNAME}\\r\\n\r\n{$ADDRESS1} {$ADDRESS2} {$ADDRESS3}\\r\\n\r\n{$ZIPCODE} {$CITY}\\r\\n\r\n{loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}\\r\\n\r\n{/loop}\r\nConfirmation de commande {$REF} du {format_date date=$INVOICE_DATE}\\r\\n\\r\\n\r\nLes articles commandés:\\r\\n\r\n{loop type="order_product" name="order-products" order=$ID}\r\n{if $WAS_IN_PROMO == 1}\r\n {assign "realPrice" $PROMO_PRICE}\r\n {assign "realTax" $PROMO_PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PROMO_PRICE}\r\n{else}\r\n {assign "realPrice" $PRICE}\r\n {assign "realTax" $PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PRICE}\r\n{/if}\r\n \\r\\n\r\n Article : {$TITLE}\r\n{ifloop rel="combinations"}\r\n {loop type="order_product_attribute_combination" name="combinations" order_product=$ID}\r\n {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE}\\r\\n\r\n{/loop}\r\n{/ifloop}\\r\\n\r\n Quantité : {$QUANTITY}\\r\\n\r\n Prix unitaire TTC : {$realTaxedPrice} {$orderCurrency}\\r\\n\r\n{/loop}\r\n\\r\\n-----------------------------------------\\r\\n\r\nMontant total TTC : {$TOTAL_TAXED_AMOUNT - $POSTAGE} {$orderCurrency} \\r\\n\r\nFrais de port TTC : {$POSTAGE} {$orderCurrency} \\r\\n\r\nSomme totale: {$TOTAL_TAXED_AMOUNT} {$orderCurrency} \\r\\n\r\n==================================\\r\\n\\r\\n\r\nVotre facture est disponible dans la rubrique mon compte sur {config key="url_site"}\r\n{/loop}', '{loop name="order.invoice" type="order" id=$order_id customer="*"}\r\n {loop name="currency.order" type="currency" id=$CURRENCY}\r\n {assign "orderCurrency" $SYMBOL}\r\n {/loop}\r\n{loop type="customer" name="customer.invoice" id=$CUSTOMER current="0"}\r\n {assign var="customer_ref" value=$REF}\r\n{/loop}\r\n\r\n\r\n
\r\n \r\n courriel de confirmation de commande de {config key="url_site"} \r\n {literal}\r\n \r\n {/literal}\r\n\r\n\r\n\r\n
{config key="store_name"}
\r\n Confirmation de commande
\r\n N° {$REF} du {format_date date=$INVOICE_DATE output="date"}
\r\n \r\n
\r\n \r\n \r\n | Référence | \r\n Désignation | \r\n P.U. € | \r\n Qté | \r\n
\r\n {loop type="order_product" name="order-products" order=$ID}\r\n {if $WAS_IN_PROMO == 1}\r\n {assign "realPrice" $PROMO_PRICE}\r\n {assign "realTax" $PROMO_PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PROMO_PRICE}\r\n {else}\r\n {assign "realPrice" $PRICE}\r\n {assign "realTax" $PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PRICE}\r\n {/if}\r\n \r\n | {$REF} | \r\n {$TITLE}\r\n {ifloop rel="combinations"}\r\n {loop type="order_product_attribute_combination" name="combinations" order_product=$ID}\r\n {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE} \r\n {/loop}\r\n {/ifloop}\r\n | \r\n {$orderCurrency} {$realTaxedPrice} | \r\n {$QUANTITY} | \r\n
\r\n {/loop}\r\n \r\n \r\n | | \r\n
\r\n \r\n | Montant total avant remise € | \r\n {$orderCurrency} {$TOTAL_TAXED_AMOUNT - $POSTAGE} | \r\n
\r\n \r\n | Port € | \r\n {$orderCurrency} {$POSTAGE} | \r\n
\r\n \r\n | Montant total de la commande € | \r\n {$orderCurrency} {$TOTAL_TAXED_AMOUNT} | \r\n
\r\n \r\n
\r\n
\r\n
LIVRAISON : {loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}
\r\n {loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS}\r\n
N° de client : {$customer_ref}
\r\n
Nom :\r\n {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop} {$FIRSTNAME} {$LASTNAME}
\r\n
N° et rue :\r\n {$ADDRESS1}
\r\n
Complément : {$ADDRESS2}\r\n {$ADDRESS3}
\r\n
Code postal : {$ZIPCODE}
\r\n
Ville : {$CITY}
\r\n
Pays : {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
\r\n
\r\n {/loop}\r\n
\r\n
FACTURATION : paiement par {loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}
\r\n {loop type="order_address" name="delivery_address" id=$DELIVERY_ADDRESS}\r\n
N° de client : {$customer_ref}
\r\n
Nom :\r\n {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop} {$FIRSTNAME} {$LASTNAME}
\r\n
N° et rue :\r\n {$ADDRESS1}
\r\n
Complément : {$ADDRESS2}\r\n {$ADDRESS3}
\r\n
Code postal : {$ZIPCODE}
\r\n
Ville : {$CITY}
\r\n
Pays : {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
\r\n
\r\n {/loop}\r\n
Le suivi de votre commande est disponible dans la rubrique mon compte sur {config key="url_site"}
\r\n
\r\n\r\n\r\n{/loop}'),
-(1, 'fr_FR', 'order confirmation', 'Commande : {$order_ref}', '{assign var="order_id" value=1}\r\n\r\n{loop name="order.invoice" type="order" id=$order_id customer="*"}\r\n {loop name="currency.order" type="currency" id=$CURRENCY}\r\n {assign "orderCurrency" $CODE}\r\n {/loop}\r\n{loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS}\r\n{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}{$FIRSTNAME} {$LASTNAME}\\r\\n\r\n{$ADDRESS1} {$ADDRESS2} {$ADDRESS3}\\r\\n\r\n{$ZIPCODE} {$CITY}\\r\\n\r\n{loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}\\r\\n\r\n{/loop}\r\nConfirmation de commande {$REF} du {format_date date=$INVOICE_DATE}\\r\\n\\r\\n\r\nLes articles commandés:\\r\\n\r\n{loop type="order_product" name="order-products" order=$ID}\r\n{if $WAS_IN_PROMO == 1}\r\n {assign "realPrice" $PROMO_PRICE}\r\n {assign "realTax" $PROMO_PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PROMO_PRICE}\r\n{else}\r\n {assign "realPrice" $PRICE}\r\n {assign "realTax" $PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PRICE}\r\n{/if}\r\n \\r\\n\r\n Article : {$TITLE}\r\n{ifloop rel="combinations"}\r\n {loop type="order_product_attribute_combination" name="combinations" order_product=$ID}\r\n {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE}\\r\\n\r\n{/loop}\r\n{/ifloop}\\r\\n\r\n Quantité : {$QUANTITY}\\r\\n\r\n Prix unitaire TTC : {$realTaxedPrice} {$orderCurrency}\\r\\n\r\n{/loop}\r\n\\r\\n-----------------------------------------\\r\\n\r\nMontant total TTC : {$TOTAL_TAXED_AMOUNT - $POSTAGE} {$orderCurrency} \\r\\n\r\nFrais de port TTC : {$POSTAGE} {$orderCurrency} \\r\\n\r\nSomme totale: {$TOTAL_TAXED_AMOUNT} {$orderCurrency} \\r\\n\r\n==================================\\r\\n\\r\\n\r\nVotre facture est disponible dans la rubrique mon compte sur {config key="url_site"}\r\n{/loop}', '{loop name="order.invoice" type="order" id=$order_id customer="*"}\r\n {loop name="currency.order" type="currency" id=$CURRENCY}\r\n {assign "orderCurrency" $SYMBOL}\r\n {/loop}\r\n{loop type="customer" name="customer.invoice" id=$CUSTOMER current="0"}\r\n {assign var="customer_ref" value=$REF}\r\n{/loop}\r\n\r\n\r\n\r\n \r\n courriel de confirmation de commande de {config key="url_site"} \r\n {literal}\r\n \r\n {/literal}\r\n\r\n\r\n\r\n
{config key="store_name"}
\r\n Confirmation de commande
\r\n N° {$REF} du {format_date date=$INVOICE_DATE output="date"}
\r\n \r\n
\r\n \r\n \r\n | Référence | \r\n Désignation | \r\n P.U. € | \r\n Qté | \r\n
\r\n {loop type="order_product" name="order-products" order=$ID}\r\n {if $WAS_IN_PROMO == 1}\r\n {assign "realPrice" $PROMO_PRICE}\r\n {assign "realTax" $PROMO_PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PROMO_PRICE}\r\n {else}\r\n {assign "realPrice" $PRICE}\r\n {assign "realTax" $PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PRICE}\r\n {/if}\r\n \r\n | {$REF} | \r\n {$TITLE}\r\n {ifloop rel="combinations"}\r\n {loop type="order_product_attribute_combination" name="combinations" order_product=$ID}\r\n {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE} \r\n {/loop}\r\n {/ifloop}\r\n | \r\n {$orderCurrency} {$realTaxedPrice} | \r\n {$QUANTITY} | \r\n
\r\n {/loop}\r\n \r\n \r\n | | \r\n
\r\n \r\n | Montant total avant remise € | \r\n {$orderCurrency} {$TOTAL_TAXED_AMOUNT - $POSTAGE} | \r\n
\r\n \r\n | Port € | \r\n {$orderCurrency} {$POSTAGE} | \r\n
\r\n \r\n | Montant total de la commande € | \r\n {$orderCurrency} {$TOTAL_TAXED_AMOUNT} | \r\n
\r\n \r\n
\r\n
\r\n
LIVRAISON : {loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}
\r\n {loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS}\r\n
N° de client : {$customer_ref}
\r\n
Nom :\r\n {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop} {$FIRSTNAME} {$LASTNAME}
\r\n
N° et rue :\r\n {$ADDRESS1}
\r\n
Complément : {$ADDRESS2}\r\n {$ADDRESS3}
\r\n
Code postal : {$ZIPCODE}
\r\n
Ville : {$CITY}
\r\n
Pays : {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
\r\n
\r\n {/loop}\r\n
\r\n
FACTURATION : paiement par {loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}
\r\n {loop type="order_address" name="delivery_address" id=$DELIVERY_ADDRESS}\r\n
N° de client : {$customer_ref}
\r\n
Nom :\r\n {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop} {$FIRSTNAME} {$LASTNAME}
\r\n
N° et rue :\r\n {$ADDRESS1}
\r\n
Complément : {$ADDRESS2}\r\n {$ADDRESS3}
\r\n
Code postal : {$ZIPCODE}
\r\n
Ville : {$CITY}
\r\n
Pays : {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
\r\n
\r\n {/loop}\r\n
Le suivi de votre commande est disponible dans la rubrique mon compte sur {config key="url_site"}
\r\n
\r\n\r\n\r\n{/loop}');
+(1, 'fr_FR', 'Confirmation de commande', 'Commande : {$order_ref}', '{assign var="order_id" value=1}\r\n\r\n{loop name="order.invoice" type="order" id=$order_id customer="*"}\r\n {loop name="currency.order" type="currency" id=$CURRENCY}\r\n {assign "orderCurrency" $CODE}\r\n {/loop}\r\n{loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS}\r\n{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}{$FIRSTNAME} {$LASTNAME}\\r\\n\r\n{$ADDRESS1} {$ADDRESS2} {$ADDRESS3}\\r\\n\r\n{$ZIPCODE} {$CITY}\\r\\n\r\n{loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}\\r\\n\r\n{/loop}\r\nConfirmation de commande {$REF} du {format_date date=$INVOICE_DATE}\\r\\n\\r\\n\r\nLes articles commandés:\\r\\n\r\n{loop type="order_product" name="order-products" order=$ID}\r\n{if $WAS_IN_PROMO == 1}\r\n {assign "realPrice" $PROMO_PRICE}\r\n {assign "realTax" $PROMO_PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PROMO_PRICE}\r\n{else}\r\n {assign "realPrice" $PRICE}\r\n {assign "realTax" $PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PRICE}\r\n{/if}\r\n \\r\\n\r\n Article : {$TITLE}\r\n{ifloop rel="combinations"}\r\n {loop type="order_product_attribute_combination" name="combinations" order_product=$ID}\r\n {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE}\\r\\n\r\n{/loop}\r\n{/ifloop}\\r\\n\r\n Quantité : {$QUANTITY}\\r\\n\r\n Prix unitaire TTC : {$realTaxedPrice} {$orderCurrency}\\r\\n\r\n{/loop}\r\n\\r\\n-----------------------------------------\\r\\n\r\nMontant total TTC : {$TOTAL_TAXED_AMOUNT - $POSTAGE} {$orderCurrency} \\r\\n\r\nFrais de port TTC : {$POSTAGE} {$orderCurrency} \\r\\n\r\nSomme totale: {$TOTAL_TAXED_AMOUNT} {$orderCurrency} \\r\\n\r\n==================================\\r\\n\\r\\n\r\nVotre facture est disponible dans la rubrique mon compte sur {config key="url_site"}\r\n{/loop}', '{loop name="order.invoice" type="order" id=$order_id customer="*"}\r\n {loop name="currency.order" type="currency" id=$CURRENCY}\r\n {assign "orderCurrency" $SYMBOL}\r\n {/loop}\r\n{loop type="customer" name="customer.invoice" id=$CUSTOMER current="0"}\r\n {assign var="customer_ref" value=$REF}\r\n{/loop}\r\n\r\n\r\n\r\n \r\n courriel de confirmation de commande de {config key="url_site"} \r\n {literal}\r\n \r\n {/literal}\r\n\r\n\r\n\r\n
{config key="store_name"}
\r\n Confirmation de commande
\r\n N° {$REF} du {format_date date=$INVOICE_DATE output="date"}
\r\n \r\n
\r\n \r\n \r\n | Référence | \r\n Désignation | \r\n P.U. € | \r\n Qté | \r\n
\r\n {loop type="order_product" name="order-products" order=$ID}\r\n {if $WAS_IN_PROMO == 1}\r\n {assign "realPrice" $PROMO_PRICE}\r\n {assign "realTax" $PROMO_PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PROMO_PRICE}\r\n {else}\r\n {assign "realPrice" $PRICE}\r\n {assign "realTax" $PRICE_TAX}\r\n {assign "realTaxedPrice" $TAXED_PRICE}\r\n {/if}\r\n \r\n | {$REF} | \r\n {$TITLE}\r\n {ifloop rel="combinations"}\r\n {loop type="order_product_attribute_combination" name="combinations" order_product=$ID}\r\n {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE} \r\n {/loop}\r\n {/ifloop}\r\n | \r\n {$orderCurrency} {$realTaxedPrice} | \r\n {$QUANTITY} | \r\n
\r\n {/loop}\r\n \r\n \r\n | | \r\n
\r\n \r\n | Montant total avant remise € | \r\n {$orderCurrency} {$TOTAL_TAXED_AMOUNT - $POSTAGE} | \r\n
\r\n \r\n | Port € | \r\n {$orderCurrency} {$POSTAGE} | \r\n
\r\n \r\n | Montant total de la commande € | \r\n {$orderCurrency} {$TOTAL_TAXED_AMOUNT} | \r\n
\r\n \r\n
\r\n
\r\n
LIVRAISON : {loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}
\r\n {loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS}\r\n
N° de client : {$customer_ref}
\r\n
Nom :\r\n {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop} {$FIRSTNAME} {$LASTNAME}
\r\n
N° et rue :\r\n {$ADDRESS1}
\r\n
Complément : {$ADDRESS2}\r\n {$ADDRESS3}
\r\n
Code postal : {$ZIPCODE}
\r\n
Ville : {$CITY}
\r\n
Pays : {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
\r\n
\r\n {/loop}\r\n
\r\n
FACTURATION : paiement par {loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}
\r\n {loop type="order_address" name="delivery_address" id=$DELIVERY_ADDRESS}\r\n
N° de client : {$customer_ref}
\r\n
Nom :\r\n {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop} {$FIRSTNAME} {$LASTNAME}
\r\n
N° et rue :\r\n {$ADDRESS1}
\r\n
Complément : {$ADDRESS2}\r\n {$ADDRESS3}
\r\n
Code postal : {$ZIPCODE}
\r\n
Ville : {$CITY}
\r\n
Pays : {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop}
\r\n
\r\n {/loop}\r\n
Le suivi de votre commande est disponible dans la rubrique mon compte sur {config key="url_site"}
\r\n
\r\n\r\n\r\n{/loop}'),
+(2, 'en_US', 'Your new password', 'Your new password', 'Your new passord is : {$password}', '\r\n\r\n\r\n\r\nchanging password email for {config key="urlsite"} \r\n{literal}\r\n\r\n{/literal}\r\n\r\n\r\n\r\n
\r\n
{config key="store_name"}
\r\nChangement de mot de passe
\r\n You have lost your password
\r\nYour new password is {$password}.
\r\n\r\n
\r\nVous pouvez à présent vous connecter sur {config key="urlsite"}.
Please, change this password after your first connection
\r\n\r\n'),
+(2, 'fr_FR', 'Votre nouveau mot de passe', 'Votre nouveau mot de passe', 'Votre nouveau mot de passe est : {$password}', '\r\n\r\n\r\n\r\ncourriel de confirmation de changement de mot de passe de {config key="urlsite"} \r\n{literal}\r\n\r\n{/literal}\r\n\r\n\r\n\r\n
\r\n
{config key="store_name"}
\r\nChangement de mot de passe
\r\n Vous avez perdu votre mot de passe.
\r\nVotre nouveau mot de passe est {$password}.
\r\n\r\n
\r\nVous pouvez à présent vous connecter sur {config key="urlsite"}.
N''oubliez pas de modifier votre mot de passe.
\r\n\r\n');
diff --git a/install/update/2.0.0-beta5.sql b/install/update/2.0.0-beta5.sql
new file mode 100644
index 000000000..90944ceda
--- /dev/null
+++ b/install/update/2.0.0-beta5.sql
@@ -0,0 +1,19 @@
+# This is a fix for InnoDB in MySQL >= 4.1.x
+# It "suspends judgement" for fkey relationships until are tables are set.
+SET FOREIGN_KEY_CHECKS = 0;
+
+ALTER TABLE `product` CHANGE `position` `position` INT( 11 ) NOT NULL DEFAULT '0';
+ALTER TABLE `product_version` CHANGE `position` `position` INT( 11 ) NOT NULL DEFAULT '0';
+
+SELECT @max := MAX(`id`) FROM `message`;
+SET @max := @max+1;
+
+INSERT INTO `message` (`id`, `name`, `secured`, `created_at`, `updated_at`, `version`, `version_created_at`, `version_created_by`) VALUES
+(@max, 'lost_password', 1, NOW(), NOW(), 2, NOW(), NULL);
+
+INSERT INTO `message_i18n` (`id`, `locale`, `title`, `subject`, `text_message`, `html_message`) VALUES
+(@max, 'en_US', 'Your new password', 'Your new password', 'Your new passord is : {$password}', '\r\n\r\n\r\n\r\nchanging password email for {config key="urlsite"} \r\n{literal}\r\n\r\n{/literal}\r\n\r\n\r\n\r\n
\r\n
{config key="store_name"}
\r\nChangement de mot de passe
\r\n You have lost your password
\r\nYour new password is {$password}.
\r\n\r\n
\r\nVous pouvez à présent vous connecter sur {config key="urlsite"}.
Please, change this password after your first connection
\r\n\r\n'),
+(@max, 'fr_FR', 'Votre nouveau mot de passe', 'Votre nouveau mot de passe', 'Votre nouveau mot de passe est : {$password}', '\r\n\r\n\r\n\r\ncourriel de confirmation de changement de mot de passe de {config key="urlsite"} \r\n{literal}\r\n\r\n{/literal}\r\n\r\n\r\n\r\n
\r\n
{config key="store_name"}
\r\nChangement de mot de passe
\r\n Vous avez perdu votre mot de passe.
\r\nVotre nouveau mot de passe est {$password}.
\r\n\r\n
\r\nVous pouvez à présent vous connecter sur {config key="urlsite"}.
N''oubliez pas de modifier votre mot de passe.
\r\n\r\n');
+
+
+SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
diff --git a/templates/frontOffice/default/password.html b/templates/frontOffice/default/password.html
index 03f327bef..65aa7408d 100644
--- a/templates/frontOffice/default/password.html
+++ b/templates/frontOffice/default/password.html
@@ -17,7 +17,7 @@
{intl l="Password Forgotten"}
{form name="thelia.front.customer.lostpassword"}