Merge pull request #350 from lunika/permanentDiscount

apply a permanent discount on a customer.
This commit is contained in:
Manuel Raynaud
2014-04-29 12:06:13 +02:00
19 changed files with 1186 additions and 1126 deletions

View File

@@ -1,3 +1,9 @@
#2.0.1
- possibility to apply a permanent discount on a customer
- display estimated shipping on cart page
- export newsletter subscribers list
- Fix redirect issues
#2.0.0 #2.0.0
- Coupons values are re-evaluated when a product quantity is changed in the shopping cart - Coupons values are re-evaluated when a product quantity is changed in the shopping cart
- You can declare new compilerPass in modules. See Thelia\Module\BaseModule::getCompilers phpDoc - You can declare new compilerPass in modules. See Thelia\Module\BaseModule::getCompilers phpDoc

View File

@@ -48,6 +48,12 @@ class Cart extends BaseAction implements EventSubscriberInterface
$append = $event->getAppend(); $append = $event->getAppend();
$quantity = $event->getQuantity(); $quantity = $event->getQuantity();
$currency = $cart->getCurrency(); $currency = $cart->getCurrency();
$customer = $cart->getCustomer();
$discount = 0;
if (null !== $customer && $customer->getDiscount() > 0) {
$discount = $customer->getDiscount();
}
$productSaleElementsId = $event->getProductSaleElementsId(); $productSaleElementsId = $event->getProductSaleElementsId();
$productId = $event->getProduct(); $productId = $event->getProduct();
@@ -60,7 +66,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
->findPk($productSaleElementsId); ->findPk($productSaleElementsId);
if (null !== $productSaleElements) { if (null !== $productSaleElements) {
$productPrices = $productSaleElements->getPricesByCurrency($currency); $productPrices = $productSaleElements->getPricesByCurrency($currency, $discount);
$event->setCartItem( $event->setCartItem(
$this->doAddItem($event->getDispatcher(), $cart, $productId, $productSaleElements, $quantity, $productPrices) $this->doAddItem($event->getDispatcher(), $cart, $productId, $productSaleElements, $quantity, $productPrices)
); );
@@ -151,11 +157,18 @@ class Cart extends BaseAction implements EventSubscriberInterface
public function updateCartPrices(\Thelia\Model\Cart $cart, Currency $currency) public function updateCartPrices(\Thelia\Model\Cart $cart, Currency $currency)
{ {
$customer = $cart->getCustomer();
$discount = 0;
if (null !== $customer && $customer->getDiscount() > 0) {
$discount = $customer->getDiscount();
}
// cart item // cart item
foreach ($cart->getCartItems() as $cartItem) { foreach ($cart->getCartItems() as $cartItem) {
$productSaleElements = $cartItem->getProductSaleElements(); $productSaleElements = $cartItem->getProductSaleElements();
$productPrice = $productSaleElements->getPricesByCurrency($currency); $productPrice = $productSaleElements->getPricesByCurrency($currency, $discount);
$cartItem $cartItem
->setPrice($productPrice->getPrice()) ->setPrice($productPrice->getPrice())

View File

@@ -112,7 +112,8 @@ trait CartTrait
*/ */
protected function duplicateCart(EventDispatcherInterface $dispatcher, CartModel $cart, Session $session, Customer $customer = null) protected function duplicateCart(EventDispatcherInterface $dispatcher, CartModel $cart, Session $session, Customer $customer = null)
{ {
$newCart = $cart->duplicate($this->generateCookie($session), $customer, $dispatcher); $currency = $session->getCurrency();
$newCart = $cart->duplicate($this->generateCookie($session), $customer, $currency, $dispatcher);
$session->setCart($newCart->getId()); $session->setCart($newCart->getId());
$cartEvent = new CartEvent($newCart); $cartEvent = new CartEvent($newCart);

View File

@@ -23,7 +23,6 @@ return array(
'Alpha code 3 *' => 'Alpha code 3 *', 'Alpha code 3 *' => 'Alpha code 3 *',
'Amount removed from the cart' => 'Amount removed from the cart', 'Amount removed from the cart' => 'Amount removed from the cart',
'Apply exchange rates on price in %sym' => 'Apply exchange rates on price in %sym', 'Apply exchange rates on price in %sym' => 'Apply exchange rates on price in %sym',
'Area' => 'Area',
'Attribute ID:Attribute AV ID' => 'Attribute ID:Attribute AV ID', 'Attribute ID:Attribute AV ID' => 'Attribute ID:Attribute AV ID',
'Auth mode' => 'Auth mode', 'Auth mode' => 'Auth mode',
'Available quantity' => 'Available quantity', 'Available quantity' => 'Available quantity',
@@ -212,7 +211,6 @@ return array(
'Value *' => 'Value *', 'Value *' => 'Value *',
'Warnings' => 'Warnings', 'Warnings' => 'Warnings',
'Weight' => 'Weight', 'Weight' => 'Weight',
'Weight *' => 'Weight *',
'Yes, I have a password :' => 'Yes, I have a password :', 'Yes, I have a password :' => 'Yes, I have a password :',
'You are already registered!' => 'You are already registered!', 'You are already registered!' => 'You are already registered!',
'Your Email Address' => 'Your Email Address', 'Your Email Address' => 'Your Email Address',
@@ -221,13 +219,13 @@ return array(
'Zip code' => 'Zip code', 'Zip code' => 'Zip code',
'date format' => 'date format', 'date format' => 'date format',
'delivery module %s is not a Thelia\Module\DeliveryModuleInterface' => 'delivery module %s is not a Thelia\Module\DeliveryModuleInterface', 'delivery module %s is not a Thelia\Module\DeliveryModuleInterface' => 'delivery module %s is not a Thelia\Module\DeliveryModuleInterface',
'payment module %s is not a Thelia\Module\PaymentModuleInterface' => 'payment module %s is not a Thelia\Module\PaymentModuleInterface',
'language locale' => 'language locale', 'language locale' => 'language locale',
'mailing system modification' => 'mailing system modification', 'mailing system modification' => 'mailing system modification',
'password confirmation is not the same as password field' => 'password confirmation is not the same as password field', 'password confirmation is not the same as password field' => 'password confirmation is not the same as password field',
'password must be composed of at least 4 characters' => 'password must be composed of at least 4 characters', 'password must be composed of at least 4 characters' => 'password must be composed of at least 4 characters',
'payment module %s is not a Thelia\Module\PaymentModuleInterface' => 'payment module %s is not a Thelia\Module\PaymentModuleInterface',
'permanent discount (in percent)' => 'permanent discount (in percent)',
'quantity value is not valid' => 'quantity value is not valid', 'quantity value is not valid' => 'quantity value is not valid',
'shipping area name' => 'shipping area name',
'this product id does not exists : %d' => 'this product id does not exists : %d', 'this product id does not exists : %d' => 'this product id does not exists : %d',
'time format' => 'time format', 'time format' => 'time format',
); );

View File

@@ -299,6 +299,7 @@ return array(
'password confirmation is not the same as password field' => 'le mot de passe de confirmation n\'est pas le même que le champ mot de passe', 'password confirmation is not the same as password field' => 'le mot de passe de confirmation n\'est pas le même que le champ mot de passe',
'password must be composed of at least 4 characters' => 'le mot de passe doit être composé d\'au moins 4 caractères', 'password must be composed of at least 4 characters' => 'le mot de passe doit être composé d\'au moins 4 caractères',
'payment module %s is not a Thelia\Module\PaymentModuleInterface' => 'Le module de paiement %s n\'est pas une instance de Thelia\Module\PaymentModuleInterface ', 'payment module %s is not a Thelia\Module\PaymentModuleInterface' => 'Le module de paiement %s n\'est pas une instance de Thelia\Module\PaymentModuleInterface ',
'permanent discount (in percent)' => 'Remise permanente (en pourcentage)',
'quantity value is not valid' => 'la valeur de la quantité n\'est pas valide', 'quantity value is not valid' => 'la valeur de la quantité n\'est pas valide',
'superior or equal to' => 'supérieur ou égal à', 'superior or equal to' => 'supérieur ou égal à',
'superior to' => 'supérieur à', 'superior to' => 'supérieur à',

View File

@@ -19,7 +19,6 @@ use Thelia\Core\Security\Resource\AdminResources;
use Thelia\Form\Cache\AssetsFlushForm; use Thelia\Form\Cache\AssetsFlushForm;
use Thelia\Form\Cache\CacheFlushForm; use Thelia\Form\Cache\CacheFlushForm;
use Thelia\Form\Cache\ImagesAndDocumentsCacheFlushForm; use Thelia\Form\Cache\ImagesAndDocumentsCacheFlushForm;
use Thelia\Form\Exception\FormValidationException;
use Thelia\Log\Tlog; use Thelia\Log\Tlog;
use Thelia\Model\ConfigQuery; use Thelia\Model\ConfigQuery;

View File

@@ -90,6 +90,7 @@ class CustomerController extends AbstractCrudController
'lastname' => $object->getLastname(), 'lastname' => $object->getLastname(),
'email' => $object->getEmail(), 'email' => $object->getEmail(),
'title' => $object->getTitleId(), 'title' => $object->getTitleId(),
'discount' => $object->getDiscount(),
); );
if ($address !== null) { if ($address !== null) {

View File

@@ -173,8 +173,7 @@ class Module extends BaseI18nLoop implements PropelSearchLoopInterface
new \ReflectionClass($module->getFullNamespace()); new \ReflectionClass($module->getFullNamespace());
$exists = true; $exists = true;
} } catch (\ReflectionException $ex) {
catch(\ReflectionException $ex) {
$exists = false; $exists = false;
} }

View File

@@ -457,12 +457,19 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
} }
$taxCountry = $this->container->get('thelia.taxEngine')->getDeliveryCountry(); $taxCountry = $this->container->get('thelia.taxEngine')->getDeliveryCountry();
/** @var \Thelia\Core\Security\SecurityContext $securityContext */
$securityContext = $this->container->get('thelia.securityContext');
foreach ($loopResult->getResultDataCollection() as $product) { foreach ($loopResult->getResultDataCollection() as $product) {
$loopResultRow = new LoopResultRow($product); $loopResultRow = new LoopResultRow($product);
$price = $product->getVirtualColumn('price'); $price = $product->getVirtualColumn('price');
if ($securityContext->hasCustomerUser() && $securityContext->getCustomerUser()->getDiscount() > 0) {
$price = $price * (1-($securityContext->getCustomerUser()->getDiscount()/100));
}
try { try {
$taxedPrice = $product->getTaxedPrice( $taxedPrice = $product->getTaxedPrice(
$taxCountry, $taxCountry,
@@ -472,6 +479,10 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
$taxedPrice = null; $taxedPrice = null;
} }
$promoPrice = $product->getVirtualColumn('promo_price'); $promoPrice = $product->getVirtualColumn('promo_price');
if ($securityContext->hasCustomerUser() && $securityContext->getCustomerUser()->getDiscount() > 0) {
$promoPrice = $promoPrice * (1-($securityContext->getCustomerUser()->getDiscount()/100));
}
try { try {
$taxedPromoPrice = $product->getTaxedPromoPrice( $taxedPromoPrice = $product->getTaxedPromoPrice(
$taxCountry, $taxCountry,
@@ -938,6 +949,8 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
$loopResult = new LoopResult($results); $loopResult = new LoopResult($results);
$taxCountry = $this->container->get('thelia.taxEngine')->getDeliveryCountry(); $taxCountry = $this->container->get('thelia.taxEngine')->getDeliveryCountry();
/** @var \Thelia\Core\Security\SecurityContext $securityContext */
$securityContext = $this->container->get('thelia.securityContext');
foreach ($loopResult->getResultDataCollection() as $product) { foreach ($loopResult->getResultDataCollection() as $product) {
@@ -945,10 +958,14 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
$price = $product->getRealLowestPrice(); $price = $product->getRealLowestPrice();
if ($securityContext->hasCustomerUser() && $securityContext->getCustomerUser()->getDiscount() > 0) {
$price = $price * (1-($securityContext->getCustomerUser()->getDiscount()/100));
}
try { try {
$taxedPrice = $product->getTaxedPrice( $taxedPrice = $product->getTaxedPrice(
$taxCountry, $taxCountry,
$product->getRealLowestPrice() $price
); );
} catch (TaxEngineException $e) { } catch (TaxEngineException $e) {
$taxedPrice = null; $taxedPrice = null;

View File

@@ -135,22 +135,34 @@ class ProductSaleElements extends BaseLoop implements PropelSearchLoopInterface
public function parseResults(LoopResult $loopResult) public function parseResults(LoopResult $loopResult)
{ {
$taxCountry = $this->container->get('thelia.taxEngine')->getDeliveryCountry(); $taxCountry = $this->container->get('thelia.taxEngine')->getDeliveryCountry();
/** @var \Thelia\Core\Security\SecurityContext $securityContext */
$securityContext = $this->container->get('thelia.securityContext');
$discount = 0;
if ($securityContext->hasCustomerUser() && $securityContext->getCustomerUser()->getDiscount() > 0) {
$discount = $securityContext->getCustomerUser()->getDiscount();
}
foreach ($loopResult->getResultDataCollection() as $PSEValue) { foreach ($loopResult->getResultDataCollection() as $PSEValue) {
$loopResultRow = new LoopResultRow($PSEValue); $loopResultRow = new LoopResultRow($PSEValue);
$price = $PSEValue->getPrice(); $price = $PSEValue->getPrice('price_PRICE', $discount);
try { try {
$taxedPrice = $PSEValue->getTaxedPrice( $taxedPrice = $PSEValue->getTaxedPrice(
$taxCountry $taxCountry,
'price_PRICE',
$discount
); );
} catch (TaxEngineException $e) { } catch (TaxEngineException $e) {
$taxedPrice = null; $taxedPrice = null;
} }
$promoPrice = $PSEValue->getPromoPrice();
$promoPrice = $PSEValue->getPromoPrice('price_PROMO_PRICE', $discount);
try { try {
$taxedPromoPrice = $PSEValue->getTaxedPromoPrice( $taxedPromoPrice = $PSEValue->getTaxedPromoPrice(
$taxCountry $taxCountry,
'price_PROMO_PRICE',
$discount
); );
} catch (TaxEngineException $e) { } catch (TaxEngineException $e) {
$taxedPromoPrice = null; $taxedPromoPrice = null;

View File

@@ -158,6 +158,12 @@ class CustomerUpdateForm extends BaseForm
"for" => "title" "for" => "title"
) )
)) ))
->add('discount', 'text', array(
'label' => Translator::getInstance()->trans('permanent discount (in percent)'),
'label_attr' => array(
'for' => 'discount'
)
))
; ;
} }

View File

@@ -18,7 +18,7 @@ class Cart extends BaseCart
* @param Customer $customer * @param Customer $customer
* @return Cart * @return Cart
*/ */
public function duplicate($token, Customer $customer = null, EventDispatcherInterface $dispatcher) public function duplicate($token, Customer $customer = null, Currency $currency = null, EventDispatcherInterface $dispatcher)
{ {
$cartItems = $this->getCartItems(); $cartItems = $this->getCartItems();
@@ -26,11 +26,21 @@ class Cart extends BaseCart
$cart->setAddressDeliveryId($this->getAddressDeliveryId()); $cart->setAddressDeliveryId($this->getAddressDeliveryId());
$cart->setAddressInvoiceId($this->getAddressInvoiceId()); $cart->setAddressInvoiceId($this->getAddressInvoiceId());
$cart->setToken($token); $cart->setToken($token);
// TODO : set current Currency $discount = 0;
$cart->setCurrencyId($this->getCurrencyId());
if (null === $currency) {
$currencyQuery = CurrencyQuery::create();
$currency = $currencyQuery->findPk($this->getCurrencyId()) ?: $currencyQuery->findOneByByDefault(1);
}
$cart->setCurrency($currency);
if ($customer) { if ($customer) {
$cart->setCustomer($customer); $cart->setCustomer($customer);
if ($customer->getDiscount() > 0) {
$discount = $customer->getDiscount();
}
} }
$cart->save(); $cart->save();
@@ -50,25 +60,18 @@ class Cart extends BaseCart
$item->setProductId($cartItem->getProductId()); $item->setProductId($cartItem->getProductId());
$item->setQuantity($cartItem->getQuantity()); $item->setQuantity($cartItem->getQuantity());
$item->setProductSaleElements($productSaleElements); $item->setProductSaleElements($productSaleElements);
if ($currentDateTime <= $cartItem->getPriceEndOfLife()) { $prices = $productSaleElements->getPricesByCurrency($currency, $discount);
$item->setPrice($cartItem->getPrice()) $item
->setPromoPrice($cartItem->getPromoPrice()) ->setPrice($prices->getPrice())
->setPromo($productSaleElements->getPromo()) ->setPromoPrice($prices->getPromoPrice())
// TODO : new price EOF or duplicate current priceEOF from $cartItem ? ->setPromo($productSaleElements->getPromo());
->setPriceEndOfLife($cartItem->getPriceEndOfLife());
} else {
$productPrices = ProductPriceQuery::create()->filterByProductSaleElements($productSaleElements)->findOne();
$item->setPrice($productPrices->getPrice())
->setPromoPrice($productPrices->getPromoPrice())
->setPromo($productSaleElements->getPromo())
->setPriceEndOfLife(time() + ConfigQuery::read("cart.priceEOF", 60*60*24*30));
}
$item->save(); $item->save();
$dispatcher->dispatch(TheliaEvents::CART_ITEM_DUPLICATE, new CartItemDuplicationItem($item, $cartItem)); $dispatcher->dispatch(TheliaEvents::CART_ITEM_DUPLICATE, new CartItemDuplicationItem($item, $cartItem));
} }
} }
$this->delete();
return $cart; return $cart;
} }

View File

@@ -143,6 +143,15 @@ class Customer extends BaseCustomer implements UserInterface
->findOne(); ->findOne();
} }
public function setRef($v)
{
if (null !== $v) {
parent::setRef($v);
}
return $this;
}
/** /**
* create hash for plain password and set it in Customer object * create hash for plain password and set it in Customer object
* *

View File

@@ -165,7 +165,8 @@ class Module extends BaseModule
/** /**
* @return true if this module is a delivery module * @return true if this module is a delivery module
*/ */
public function isDeliveryModule() { public function isDeliveryModule()
{
$moduleReflection = new \ReflectionClass($this->getFullNamespace()); $moduleReflection = new \ReflectionClass($this->getFullNamespace());
return $moduleReflection->implementsInterface("Thelia\Module\DeliveryModuleInterface"); return $moduleReflection->implementsInterface("Thelia\Module\DeliveryModuleInterface");
@@ -174,17 +175,18 @@ class Module extends BaseModule
/** /**
* @return true if this module is a payment module * @return true if this module is a payment module
*/ */
public function isPayementModule() { public function isPayementModule()
{
$moduleReflection = new \ReflectionClass($this->getFullNamespace()); $moduleReflection = new \ReflectionClass($this->getFullNamespace());
return $moduleReflection->implementsInterface("Thelia\Module\PaymentModuleInterface"); return $moduleReflection->implementsInterface("Thelia\Module\PaymentModuleInterface");
} }
/** /**
* @return BaseModule a new module instance. * @return BaseModule a new module instance.
*/ */
public function createInstance() { public function createInstance()
{
$moduleClass = new \ReflectionClass($this->getFullNamespace()); $moduleClass = new \ReflectionClass($this->getFullNamespace());
return $moduleClass->newInstance(); return $moduleClass->newInstance();

View File

@@ -8,10 +8,14 @@ use Thelia\TaxEngine\Calculator;
class ProductSaleElements extends BaseProductSaleElements class ProductSaleElements extends BaseProductSaleElements
{ {
public function getPrice($virtualColumnName = 'price_PRICE') public function getPrice($virtualColumnName = 'price_PRICE', $discount = 0)
{ {
try { try {
$amount = $this->getVirtualColumn($virtualColumnName); $amount = $this->getVirtualColumn($virtualColumnName);
if ($discount > 0) {
$amount = $amount * (1-($discount/100));
}
} catch (PropelException $e) { } catch (PropelException $e) {
throw new PropelException("Virtual column `$virtualColumnName` does not exist in ProductSaleElements::getPrice"); throw new PropelException("Virtual column `$virtualColumnName` does not exist in ProductSaleElements::getPrice");
} }
@@ -19,10 +23,14 @@ class ProductSaleElements extends BaseProductSaleElements
return $amount; return $amount;
} }
public function getPromoPrice($virtualColumnName = 'price_PROMO_PRICE') public function getPromoPrice($virtualColumnName = 'price_PROMO_PRICE', $discount = 0)
{ {
try { try {
$amount = $this->getVirtualColumn($virtualColumnName); $amount = $this->getVirtualColumn($virtualColumnName);
if ($discount > 0) {
$amount = $amount * (1-($discount/100));
}
} catch (PropelException $e) { } catch (PropelException $e) {
throw new PropelException("Virtual column `$virtualColumnName` does not exist in ProductSaleElements::getPromoPrice"); throw new PropelException("Virtual column `$virtualColumnName` does not exist in ProductSaleElements::getPromoPrice");
} }
@@ -30,18 +38,18 @@ class ProductSaleElements extends BaseProductSaleElements
return $amount; return $amount;
} }
public function getTaxedPrice(Country $country) public function getTaxedPrice(Country $country , $virtualColumnName = 'price_PRICE', $discount = 0)
{ {
$taxCalculator = new Calculator(); $taxCalculator = new Calculator();
return round($taxCalculator->load($this->getProduct(), $country)->getTaxedPrice($this->getPrice()), 2); return round($taxCalculator->load($this->getProduct(), $country)->getTaxedPrice($this->getPrice($virtualColumnName, $discount)), 2);
} }
public function getTaxedPromoPrice(Country $country) public function getTaxedPromoPrice(Country $country, $virtualColumnName = 'price_PROMO_PRICE', $discount = 0)
{ {
$taxCalculator = new Calculator(); $taxCalculator = new Calculator();
return round($taxCalculator->load($this->getProduct(), $country)->getTaxedPrice($this->getPromoPrice()), 2); return round($taxCalculator->load($this->getProduct(), $country)->getTaxedPrice($this->getPromoPrice($virtualColumnName, $discount)), 2);
} }
/** /**
@@ -56,7 +64,7 @@ class ProductSaleElements extends BaseProductSaleElements
* @return ProductPriceTools * @return ProductPriceTools
* @throws \RuntimeException * @throws \RuntimeException
*/ */
public function getPricesByCurrency($currency) public function getPricesByCurrency(Currency $currency, $discount = 0)
{ {
$defaultCurrency = Currency::getDefaultCurrency(); $defaultCurrency = Currency::getDefaultCurrency();
@@ -85,6 +93,11 @@ class ProductSaleElements extends BaseProductSaleElements
$promoPrice = $productPrice->getPromoPrice(); $promoPrice = $productPrice->getPromoPrice();
} }
if ($discount > 0) {
$price = $price * (1-($discount/100));
$promoPrice = $promoPrice * (1-($discount/100));
}
$productPriceTools = new ProductPriceTools($price, $promoPrice); $productPriceTools = new ProductPriceTools($price, $promoPrice);
return $productPriceTools; return $productPriceTools;

View File

@@ -6,9 +6,6 @@ return array(
'(edit)' => '(edit)', '(edit)' => '(edit)',
'<a href="http://en.wikipedia.org/wiki/ISO_639-1_language_matrix" target="_other">Check the list</a> of ISO 639-1 codes' => '<a href="http://en.wikipedia.org/wiki/ISO_639-1_language_matrix" target="_other">Check the list</a> of ISO 639-1 codes', '<a href="http://en.wikipedia.org/wiki/ISO_639-1_language_matrix" target="_other">Check the list</a> of ISO 639-1 codes' => '<a href="http://en.wikipedia.org/wiki/ISO_639-1_language_matrix" target="_other">Check the list</a> of ISO 639-1 codes',
'<span id="number_of_generated_combinations">0</span> combinations' => '<span id="number_of_generated_combinations">0</span> combinations', '<span id="number_of_generated_combinations">0</span> combinations' => '<span id="number_of_generated_combinations">0</span> combinations',
'<strong>Cannot translate all fields.</strong> According to your PHP configuration, forms cannot contains more than
%current_max_input_vars input fields, but at least %required_max_input_vars are required. Please change the value of max_input_vars in your PHP configuration
of change the translation file by hand.' => '<strong>Cannot translate all fields.</strong> According to your PHP configuration, forms cannot contains more than %current_max_input_vars input fields, but at least %required_max_input_vars are required. Please change the value of max_input_vars in your PHP configuration of change the translation file by hand.',
'<strong>Congratulations</strong>, all text is now translated !' => '<strong>Congratulations</strong>, all text is now translated !', '<strong>Congratulations</strong>, all text is now translated !' => '<strong>Congratulations</strong>, all text is now translated !',
'<strong>Did not found any text to translate</strong>. It\'s probably normal. If not, please be sure to use Smarty\'s "intl" function in templates, or the Translator::trans() method in PHP files.' => '<strong>Did not found any text to translate</strong>. It\'s probably normal. If not, please be sure to use Smarty\'s "intl" function in templates, or the Translator::trans() method in PHP files.', '<strong>Did not found any text to translate</strong>. It\'s probably normal. If not, please be sure to use Smarty\'s "intl" function in templates, or the Translator::trans() method in PHP files.' => '<strong>Did not found any text to translate</strong>. It\'s probably normal. If not, please be sure to use Smarty\'s "intl" function in templates, or the Translator::trans() method in PHP files.',
'A content could be attached to more than one folder. Select here the additional folders for this content.' => 'A content could be attached to more than one folder. Select here the additional folders for this content.', 'A content could be attached to more than one folder. Select here the additional folders for this content.' => 'A content could be attached to more than one folder. Select here the additional folders for this content.',
@@ -35,7 +32,6 @@ return array(
'Add a new product attribute' => 'Add a new product attribute', 'Add a new product attribute' => 'Add a new product attribute',
'Add a new product feature' => 'Add a new product feature', 'Add a new product feature' => 'Add a new product feature',
'Add a new product template' => 'Add a new product template', 'Add a new product template' => 'Add a new product template',
'Add a new shipping configuration' => 'Add a new shipping configuration',
'Add a new variable' => 'Add a new variable', 'Add a new variable' => 'Add a new variable',
'Add tax to this group' => 'Add tax to this group', 'Add tax to this group' => 'Add tax to this group',
'Add this attribute to all product templates' => 'Add this attribute to all product templates', 'Add this attribute to all product templates' => 'Add this attribute to all product templates',
@@ -103,7 +99,6 @@ return array(
'Change this product feature' => 'Change this product feature', 'Change this product feature' => 'Change this product feature',
'Change this product template' => 'Change this product template', 'Change this product template' => 'Change this product template',
'Change this profile' => 'Change this profile', 'Change this profile' => 'Change this profile',
'Change this shipping configuration' => 'Change this shipping configuration',
'Change this shipping zone' => 'Change this shipping zone', 'Change this shipping zone' => 'Change this shipping zone',
'Change this tax' => 'Change this tax', 'Change this tax' => 'Change this tax',
'Change this tax rule' => 'Change this tax rule', 'Change this tax rule' => 'Change this tax rule',
@@ -166,7 +161,6 @@ return array(
'Create a new product' => 'Create a new product', 'Create a new product' => 'Create a new product',
'Create a new product template' => 'Create a new product template', 'Create a new product template' => 'Create a new product template',
'Create a new profile' => 'Create a new profile', 'Create a new profile' => 'Create a new profile',
'Create a new shipping configuration' => 'Create a new shipping configuration',
'Create a new tax' => 'Create a new tax', 'Create a new tax' => 'Create a new tax',
'Create a new tax rule' => 'Create a new tax rule', 'Create a new tax rule' => 'Create a new tax rule',
'Create a new variable' => 'Create a new variable', 'Create a new variable' => 'Create a new variable',
@@ -186,7 +180,6 @@ return array(
'Create this mailing template' => 'Create this mailing template', 'Create this mailing template' => 'Create this mailing template',
'Create this product' => 'Create this product', 'Create this product' => 'Create this product',
'Create this product template' => 'Create this product template', 'Create this product template' => 'Create this product template',
'Create this shipping configuration' => 'Create this shipping configuration',
'Create this value' => 'Create this value', 'Create this value' => 'Create this value',
'Create this variable' => 'Create this variable', 'Create this variable' => 'Create this variable',
'Currencies' => 'Currencies', 'Currencies' => 'Currencies',
@@ -232,7 +225,6 @@ return array(
'Delete mailing template' => 'Delete mailing template', 'Delete mailing template' => 'Delete mailing template',
'Delete product' => 'Delete product', 'Delete product' => 'Delete product',
'Delete profile' => 'Delete profile', 'Delete profile' => 'Delete profile',
'Delete shipping configuration' => 'Delete shipping configuration',
'Delete tax' => 'Delete tax', 'Delete tax' => 'Delete tax',
'Delete tax rule' => 'Delete tax rule', 'Delete tax rule' => 'Delete tax rule',
'Delete template' => 'Delete template', 'Delete template' => 'Delete template',
@@ -255,7 +247,6 @@ return array(
'Delete this product feature' => 'Delete this product feature', 'Delete this product feature' => 'Delete this product feature',
'Delete this product template' => 'Delete this product template', 'Delete this product template' => 'Delete this product template',
'Delete this profile' => 'Delete this profile', 'Delete this profile' => 'Delete this profile',
'Delete this shipping configuration' => 'Delete this shipping configuration',
'Delete this tax' => 'Delete this tax', 'Delete this tax' => 'Delete this tax',
'Delete this tax rule' => 'Delete this tax rule', 'Delete this tax rule' => 'Delete this tax rule',
'Delete this value' => 'Delete this value', 'Delete this value' => 'Delete this value',
@@ -292,7 +283,6 @@ return array(
'Do you really want to delete this module ?' => 'Do you really want to delete this module ?', 'Do you really want to delete this module ?' => 'Do you really want to delete this module ?',
'Do you really want to delete this product ?' => 'Do you really want to delete this product ?', 'Do you really want to delete this product ?' => 'Do you really want to delete this product ?',
'Do you really want to delete this profile ?' => 'Do you really want to delete this profile ?', 'Do you really want to delete this profile ?' => 'Do you really want to delete this profile ?',
'Do you really want to delete this shipping configuration ?' => 'Do you really want to delete this shipping configuration ?',
'Do you really want to delete this tax ?' => 'Do you really want to delete this tax ?', 'Do you really want to delete this tax ?' => 'Do you really want to delete this tax ?',
'Do you really want to delete this tax rule ?' => 'Do you really want to delete this tax rule ?', 'Do you really want to delete this tax rule ?' => 'Do you really want to delete this tax rule ?',
'Do you really want to delete this template ? It will be removed from all products.' => 'Do you really want to delete this template ? It will be removed from all products.', 'Do you really want to delete this template ? It will be removed from all products.' => 'Do you really want to delete this template ? It will be removed from all products.',
@@ -303,7 +293,6 @@ return array(
'Do you really want to remove this accessory from the product ?' => 'Do you really want to remove this accessory from the product ?', 'Do you really want to remove this accessory from the product ?' => 'Do you really want to remove this accessory from the product ?',
'Do you really want to remove this attribute from all product templates ? You\'ll loose all product related data for this attribute.' => 'Do you really want to remove this attribute from all product templates ? You\'ll loose all product related data for this attribute.', 'Do you really want to remove this attribute from all product templates ? You\'ll loose all product related data for this attribute.' => 'Do you really want to remove this attribute from all product templates ? You\'ll loose all product related data for this attribute.',
'Do you really want to remove this attribute from the template ?' => 'Do you really want to remove this attribute from the template ?', 'Do you really want to remove this attribute from the template ?' => 'Do you really want to remove this attribute from the template ?',
'Do you really want to remove this country ?' => 'Do you really want to remove this country ?',
'Do you really want to remove this feature from all product templates ? You\'ll loose all product related data for this feature.' => 'Do you really want to remove this feature from all product templates ? You\'ll loose all product related data for this feature.', 'Do you really want to remove this feature from all product templates ? You\'ll loose all product related data for this feature.' => 'Do you really want to remove this feature from all product templates ? You\'ll loose all product related data for this feature.',
'Do you really want to remove this feature from the template ?' => 'Do you really want to remove this feature from the template ?', 'Do you really want to remove this feature from the template ?' => 'Do you really want to remove this feature from the template ?',
'Do you really want to remove this related content ?' => 'Do you really want to remove this related content ?', 'Do you really want to remove this related content ?' => 'Do you really want to remove this related content ?',
@@ -373,8 +362,6 @@ return array(
'Edit prices in %curr' => 'Edit prices in %curr', 'Edit prices in %curr' => 'Edit prices in %curr',
'Edit product' => 'Edit product', 'Edit product' => 'Edit product',
'Edit product %title' => 'Edit product %title', 'Edit product %title' => 'Edit product %title',
'Edit shipping configuration %title' => 'Edit shipping configuration %title',
'Edit shipping zone %title' => 'Edit shipping zone %title',
'Edit tax rule taxes' => 'Edit tax rule taxes', 'Edit tax rule taxes' => 'Edit tax rule taxes',
'Edit template "%name"' => 'Edit template "%name"', 'Edit template "%name"' => 'Edit template "%name"',
'Edit this address' => 'Edit this address', 'Edit this address' => 'Edit this address',
@@ -392,14 +379,12 @@ return array(
'Editing attribute "%name"' => 'Editing attribute "%name"', 'Editing attribute "%name"' => 'Editing attribute "%name"',
'Editing country "%name"' => 'Editing country "%name"', 'Editing country "%name"' => 'Editing country "%name"',
'Editing currency "%name"' => 'Editing currency "%name"', 'Editing currency "%name"' => 'Editing currency "%name"',
'Editing customer "%name"' => 'Editing customer "%name"',
'Editing document "%name"' => 'Editing document "%name"', 'Editing document "%name"' => 'Editing document "%name"',
'Editing feature "%name"' => 'Editing feature "%name"', 'Editing feature "%name"' => 'Editing feature "%name"',
'Editing image "%name"' => 'Editing image "%name"', 'Editing image "%name"' => 'Editing image "%name"',
'Editing mailing template "%name"' => 'Editing mailing template "%name"', 'Editing mailing template "%name"' => 'Editing mailing template "%name"',
'Editing module' => 'Editing module', 'Editing module' => 'Editing module',
'Editing profile' => 'Editing profile', 'Editing profile' => 'Editing profile',
'Editing shipping configuration "%name"' => 'Editing shipping configuration "%name"',
'Editing shipping zone "%name"' => 'Editing shipping zone "%name"', 'Editing shipping zone "%name"' => 'Editing shipping zone "%name"',
'Editing tax' => 'Editing tax', 'Editing tax' => 'Editing tax',
'Editing tax rule' => 'Editing tax rule', 'Editing tax rule' => 'Editing tax rule',
@@ -423,9 +408,7 @@ return array(
'Enter here the folder name in the default language (%title)' => 'Enter here the folder name in the default language (%title)', 'Enter here the folder name in the default language (%title)' => 'Enter here the folder name in the default language (%title)',
'Enter here the mailing template purpose in the default language (%title)' => 'Enter here the mailing template purpose in the default language (%title)', 'Enter here the mailing template purpose in the default language (%title)' => 'Enter here the mailing template purpose in the default language (%title)',
'Enter here the product name in the default language (%title)' => 'Enter here the product name in the default language (%title)', 'Enter here the product name in the default language (%title)' => 'Enter here the product name in the default language (%title)',
'Enter here the product price in the default currency (%title)' => 'Enter here the product price in the default currency (%title)',
'Enter here the product reference' => 'Enter here the product reference', 'Enter here the product reference' => 'Enter here the product reference',
'Enter here the product tax price in the default currency (%title)' => 'Enter here the product tax price in the default currency (%title)',
'Enter here the product weight, in Kilogrammes' => 'Enter here the product weight, in Kilogrammes', 'Enter here the product weight, in Kilogrammes' => 'Enter here the product weight, in Kilogrammes',
'Enter here the template name in the default language (%title)' => 'Enter here the template name in the default language (%title)', 'Enter here the template name in the default language (%title)' => 'Enter here the template name in the default language (%title)',
'Enter here the value in the current edit language (%language_name)' => 'Enter here the value in the current edit language (%language_name)', 'Enter here the value in the current edit language (%language_name)' => 'Enter here the value in the current edit language (%language_name)',
@@ -578,8 +561,6 @@ return array(
'Online' => 'Online', 'Online' => 'Online',
'Online products' => 'Online products', 'Online products' => 'Online products',
'Oops! An Error Occurred' => 'Oops! An Error Occurred', 'Oops! An Error Occurred' => 'Oops! An Error Occurred',
'Order #' => 'Order #',
'Order %ref' => 'Order %ref',
'Order n°' => 'Order n°', 'Order n°' => 'Order n°',
'Order status:' => 'Order status:', 'Order status:' => 'Order status:',
'Ordered products' => 'Ordered products', 'Ordered products' => 'Ordered products',
@@ -717,22 +698,13 @@ return array(
'Select an attribute and click (+) to view available values' => 'Select an attribute and click (+) to view available values', 'Select an attribute and click (+) to view available values' => 'Select an attribute and click (+) to view available values',
'Select an attribute value...' => 'Select an attribute value...', 'Select an attribute value...' => 'Select an attribute value...',
'Select an attribute...' => 'Select an attribute...', 'Select an attribute...' => 'Select an attribute...',
'Select an feature and click (+) to add it to this template' => 'Select an feature and click (+) to add it to this template',
'Select an feature...' => 'Select an feature...',
'Select attribute values to combine. You may enter a default value for some of the fields of the generated combinations.' => 'Select attribute values to combine. You may enter a default value for some of the fields of the generated combinations.', 'Select attribute values to combine. You may enter a default value for some of the fields of the generated combinations.' => 'Select attribute values to combine. You may enter a default value for some of the fields of the generated combinations.',
'Select here the tax applicable to this product' => 'Select here the tax applicable to this product', 'Select here the tax applicable to this product' => 'Select here the tax applicable to this product',
'Select the E-mail template you want to translate' => 'Select the E-mail template you want to translate',
'Select the PDF template you want to translate' => 'Select the PDF template you want to translate',
'Select the back-office template you want to translate' => 'Select the back-office template you want to translate',
'Select the front-office template you want to translate' => 'Select the front-office template you want to translate',
'Select the module you want to translate' => 'Select the module you want to translate',
'Select which items you want to translate' => 'Select which items you want to translate',
'Send a mail to this customer' => 'Send a mail to this customer', 'Send a mail to this customer' => 'Send a mail to this customer',
'Send files' => 'Send files', 'Send files' => 'Send files',
'Sequential number of log line' => 'Sequential number of log line', 'Sequential number of log line' => 'Sequential number of log line',
'Set as default tax rule' => 'Set as default tax rule', 'Set as default tax rule' => 'Set as default tax rule',
'Shipping configuration' => 'Shipping configuration', 'Shipping configuration' => 'Shipping configuration',
'Shipping configuration name' => 'Shipping configuration name',
'Shipping zones' => 'Shipping zones', 'Shipping zones' => 'Shipping zones',
'Shop' => 'Shop', 'Shop' => 'Shop',
'Shop Informations' => 'Shop Information', 'Shop Informations' => 'Shop Information',
@@ -753,7 +725,6 @@ return array(
'Sorry, variable ID=%id was not found.' => 'Sorry, variable ID=%id was not found.', 'Sorry, variable ID=%id was not found.' => 'Sorry, variable ID=%id was not found.',
'Source IP' => 'Source IP', 'Source IP' => 'Source IP',
'Source IP :' => 'Source IP :', 'Source IP :' => 'Source IP :',
'Stats on %month/%year' => 'Stats on %month/%year',
'Status' => 'Status', 'Status' => 'Status',
'Stock' => 'Stock', 'Stock' => 'Stock',
'Store' => 'Store', 'Store' => 'Store',
@@ -892,7 +863,6 @@ return array(
'Variable value' => 'Variable value', 'Variable value' => 'Variable value',
'Version %ver' => 'Version %ver', 'Version %ver' => 'Version %ver',
'View' => 'View', 'View' => 'View',
'View only missing translations' => 'View only missing translations',
'View shop' => 'View shop', 'View shop' => 'View shop',
'View site' => 'View site', 'View site' => 'View site',
'Visibility' => 'Visibility', 'Visibility' => 'Visibility',
@@ -915,7 +885,6 @@ return array(
'You don\'t need to use commas or other punctuations.' => 'You don\'t need to use commas or other punctuations.', 'You don\'t need to use commas or other punctuations.' => 'You don\'t need to use commas or other punctuations.',
'Your current IP address is %ip' => 'Your current IP address is %ip', 'Your current IP address is %ip' => 'Your current IP address is %ip',
'Zip code' => 'Zip code', 'Zip code' => 'Zip code',
'Zones' => 'Zones',
'activate' => 'activate', 'activate' => 'activate',
'activate %title module' => 'activate %title module', 'activate %title module' => 'activate %title module',
'activation' => 'activation', 'activation' => 'activation',
@@ -938,6 +907,7 @@ return array(
'max usage' => 'max usage', 'max usage' => 'max usage',
'order amount' => 'order amount', 'order amount' => 'order amount',
'orders for this customer' => 'orders for this customer', 'orders for this customer' => 'orders for this customer',
'permanent discount' => 'permanent discount (in percent)',
'short description' => 'short description', 'short description' => 'short description',
'tax rules' => 'tax rules', 'tax rules' => 'tax rules',
'taxes' => 'taxes', 'taxes' => 'taxes',

View File

@@ -361,6 +361,7 @@ return array(
'Edit country "%name"' => 'Modifier le pays "%name"', 'Edit country "%name"' => 'Modifier le pays "%name"',
'Edit currency "%name"' => 'Modifier la devise "%name"', 'Edit currency "%name"' => 'Modifier la devise "%name"',
'Edit customer %firstname %lastname' => 'Modification du client %firstname %lastname ', 'Edit customer %firstname %lastname' => 'Modification du client %firstname %lastname ',
'Edit customer %firstname %lastname (Ref : %ref)' => 'Modification du client %firstname %lastname (Ref : %ref) ',
'Edit delivery address' => 'Editer l\'adresse de livraison', 'Edit delivery address' => 'Editer l\'adresse de livraison',
'Edit document "%name"' => 'Modifier le document "%name"', 'Edit document "%name"' => 'Modifier le document "%name"',
'Edit feature "%name"' => 'Modifier la caractéristique "%name"', 'Edit feature "%name"' => 'Modifier la caractéristique "%name"',
@@ -413,6 +414,7 @@ return array(
'Editing tax rule' => 'En cours de modification de la règle de taxe', 'Editing tax rule' => 'En cours de modification de la règle de taxe',
'Editing template "%name"' => 'Modification du gabarit "%name"', 'Editing template "%name"' => 'Modification du gabarit "%name"',
'Editing variable "%name"' => 'Modification de la variable "%name" ', 'Editing variable "%name"' => 'Modification de la variable "%name" ',
'Email' => 'Email',
'Email address' => 'Adresse e-mail', 'Email address' => 'Adresse e-mail',
'Email used when you send an email to your customers (Order confirmations, etc).' => 'Adresse email utilisé pour envoyer les mails à vos clients', 'Email used when you send an email to your customers (Order confirmations, etc).' => 'Adresse email utilisé pour envoyer les mails à vos clients',
'Enable remote SMTP use : ' => 'Activer l\'utilisation d\'un serveur SMTP distant:', 'Enable remote SMTP use : ' => 'Activer l\'utilisation d\'un serveur SMTP distant:',
@@ -986,6 +988,7 @@ return array(
'newsletter subscribers' => 'Inscrits à la newsletter', 'newsletter subscribers' => 'Inscrits à la newsletter',
'order amount' => 'Montant de la commande', 'order amount' => 'Montant de la commande',
'orders for this customer' => 'commandes pour ce client', 'orders for this customer' => 'commandes pour ce client',
'permanent discount' => 'Remise permanente (en pourcentage)',
'short description' => 'description court', 'short description' => 'description court',
'tax rules' => 'règles de taxe', 'tax rules' => 'règles de taxe',
'taxes' => 'taxes', 'taxes' => 'taxes',

View File

@@ -22,7 +22,7 @@
<div class="row"> <div class="row">
<div class="col-md-12 title title-without-tabs"> <div class="col-md-12 title title-without-tabs">
{intl l="Edit customer %firstname %lastname" firstname={$FIRSTNAME} lastname={$LASTNAME}} {intl l="Edit customer %firstname %lastname (Ref : %ref)" firstname={$FIRSTNAME} lastname={$LASTNAME} ref={$REF}}
</div> </div>
<div class="form-container"> <div class="form-container">
@@ -80,7 +80,14 @@
{form_field form=$form field='email'} {form_field form=$form field='email'}
<div class="form-group {if $error}has-error{/if}"> <div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label> <label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Lastname'}"> <input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Email'}">
</div>
{/form_field}
{form_field form=$form field='discount'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='permanent discount'}">
</div> </div>
{/form_field} {/form_field}