diff --git a/core/lib/Thelia/Action/Customer.php b/core/lib/Thelia/Action/Customer.php index 94d27793a..98341ee28 100755 --- a/core/lib/Thelia/Action/Customer.php +++ b/core/lib/Thelia/Action/Customer.php @@ -68,7 +68,8 @@ class Customer implements EventSubscriberInterface $data["zipcode"], $data["country"], $data["email"], - $data["password"] + $data["password"], + $request->getSession()->get("lang") ); } catch (\PropelException $e) { Tlog::getInstance()->error(sprintf('error during creating customer on action/createCustomer with message "%s"', $e->getMessage())); diff --git a/core/lib/Thelia/Core/TheliaHttpKernel.php b/core/lib/Thelia/Core/TheliaHttpKernel.php index e04009301..0af91fa08 100755 --- a/core/lib/Thelia/Core/TheliaHttpKernel.php +++ b/core/lib/Thelia/Core/TheliaHttpKernel.php @@ -76,6 +76,7 @@ class TheliaHttpKernel extends HttpKernel { //$request->headers->set('X-Php-Ob-Level', ob_get_level()); $request = $this->initSession($request); + $this->initParam($request); $this->container->enterScope('request'); $this->container->set('request', $request, 'request'); diff --git a/core/lib/Thelia/Model/Customer.php b/core/lib/Thelia/Model/Customer.php index 20146cd94..197df4c7c 100755 --- a/core/lib/Thelia/Model/Customer.php +++ b/core/lib/Thelia/Model/Customer.php @@ -45,7 +45,7 @@ class Customer extends BaseCustomer * @param null $sponsor * @param int $discount */ - public function createOrUpdate($titleId, $firstname, $lastname, $address1, $address2, $address3, $phone, $cellphone, $zipcode, $countryId, $email, $plainPassword = null, $reseller = 0, $sponsor = null, $discount = 0 ) + public function createOrUpdate($titleId, $firstname, $lastname, $address1, $address2, $address3, $phone, $cellphone, $zipcode, $countryId, $email, $plainPassword = null, $lang = null, $reseller = 0, $sponsor = null, $discount = 0) { $this ->setCustomerTitleId($titleId) @@ -63,9 +63,14 @@ class Customer extends BaseCustomer ->setReseller($reseller) ->setSponsor($sponsor) ->setDiscount($discount) - ->save() ; + if(!is_null($lang)) { + $this->setLang($lang); + } + + $this->save(); + } public function preInsert(\PropelPDO $con = null) diff --git a/templates/smarty-sample/index.html b/templates/smarty-sample/index.html index d7c2b2e62..77ba1e978 100755 --- a/templates/smarty-sample/index.html +++ b/templates/smarty-sample/index.html @@ -13,22 +13,7 @@ An image from asset directory : jQuery data: -
Category loop example
-Conditional example #1
@@ -66,9 +51,7 @@ An image from asset directory : {elseloop rel="catloop2"}... but catloop2 is still empty :-)
{/elseloop} - {ifloop rel="catloop1"} -... and catloop1 is still NOT empty :-)
- {/ifloop} +