Merge branch 'master' of github.com:thelia/thelia

This commit is contained in:
Etienne Roudeix
2014-01-10 16:29:27 +01:00
60 changed files with 1056 additions and 1098 deletions

View File

@@ -2,7 +2,9 @@
- Coupon effect inputs are now more customisable (input text, select, ajax, etc.. are usable) and unlimited amount of input for coupon effect are now possible too
- when a category is deleted, all subcategories are deleted
- delete products when categories are removed. Works only when the category is the default one for this product
- Manager update exists now.
- Manager update exists now. Rune php Thelia thelia:update
- Coupon works now
- Improved tax rule configuration
#2.0.0-beta2

View File

@@ -130,7 +130,8 @@ class Coupon extends BaseAction implements EventSubscriberInterface
->getSession()
->getOrder()
->setDiscount($totalDiscount)
->save();
// ->save()
;
}
}
@@ -210,7 +211,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface
/** @var CouponManager $couponManager */
$couponManager = $this->container->get('thelia.coupon.manager');
if($couponManager->isCouponRemovingPostage()) {
if ($couponManager->isCouponRemovingPostage()) {
$order = $event->getOrder();
$order->setPostage(0);
@@ -234,7 +235,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface
$consumedCoupons = $request->getSession()->getConsumedCoupons();
if (is_array($consumedCoupons)) {
foreach($consumedCoupons as $couponCode) {
foreach ($consumedCoupons as $couponCode) {
$couponQuery = CouponQuery::create();
$couponModel = $couponQuery->findOneByCode($couponCode);
$couponModel->setLocale($request->getSession()->getLang()->getLocale());
@@ -262,6 +263,8 @@ class Coupon extends BaseAction implements EventSubscriberInterface
$orderCoupon->save();
}
}
$request->getSession()->setConsumedCoupons(array());
}
/**

View File

@@ -30,7 +30,6 @@ use Thelia\Core\Event\Cart\CartEvent;
use Thelia\Core\Event\Order\OrderAddressEvent;
use Thelia\Core\Event\Order\OrderEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Coupon\CouponManager;
use Thelia\Exception\TheliaProcessException;
use Thelia\Model\AddressQuery;
use Thelia\Model\ConfigQuery;
@@ -288,7 +287,8 @@ class Order extends BaseAction implements EventSubscriberInterface
$sessionOrder = new \Thelia\Model\Order();
$event->setOrder($sessionOrder);
$event->setPlacedOrder($placedOrder);
$this->getSession()->setOrder($placedOrder);
$this->getSession()->setProcessedOrder($placedOrder);
$this->getSession()->setOrder(new \Thelia\Model\Order());
/* empty cart */
$this->getDispatcher()->dispatch(TheliaEvents::CART_CLEAR, new CartEvent($this->getCart($this->getRequest())));

View File

@@ -27,8 +27,6 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Thelia\Install\Exception\UpToDateException;
use Thelia\Install\Update;
use Thelia\Model\ConfigQuery;
/**
* Class UpdateCommand
@@ -65,7 +63,7 @@ class UpdateCommand extends ContainerAwareCommand
'<info>Your database is updated successfully !</info>',
''
));
} catch(PropelException $e) {
} catch (PropelException $e) {
$errorMsg = $e->getMessage();
$output->writeln(array(

View File

@@ -26,7 +26,6 @@ namespace Thelia\Condition;
use ArrayAccess;
use Countable;
use Iterator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Thelia\Condition\Implementation\ConditionInterface;
/**

View File

@@ -23,12 +23,10 @@
namespace Thelia\Condition;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Thelia\Condition\Implementation\ConditionInterface;
use Thelia\Condition\Operators;
use Thelia\Condition\ConditionCollection;
/**
* Validate Conditions
*

View File

@@ -28,7 +28,6 @@ use Thelia\Condition\Implementation\ConditionInterface;
use Thelia\Coupon\FacadeInterface;
use Thelia\Condition\ConditionCollection;
/**
* Manage how Condition could interact with the current application state (Thelia)
*
@@ -114,7 +113,6 @@ class ConditionFactory
return $collection;
}
/**
* Build a Condition from form
*
@@ -166,7 +164,6 @@ class ConditionFactory
*/
public function getInputsFromConditionInterface(ConditionInterface $condition)
{
return $condition->getValidators();
}
}

View File

@@ -171,7 +171,6 @@ abstract class ConditionAbstract implements ConditionInterface
return $serializableCondition;
}
/**
* Check if currency if valid or not
*
@@ -232,7 +231,7 @@ abstract class ConditionAbstract implements ConditionInterface
$selectHtml = '';
$optionHtml = '';
$inputs = $this->getValidators();
if(isset($inputs['inputs'][$inputKey])) {
if (isset($inputs['inputs'][$inputKey])) {
$operators = $inputs['inputs'][$inputKey]['availableOperators'];
foreach ($operators as $key => $operator) {
$selected = '';
@@ -282,6 +281,7 @@ abstract class ConditionAbstract implements ConditionInterface
</div>
</div>
';
return $html;
}

View File

@@ -24,7 +24,6 @@
namespace Thelia\Condition\Implementation;
use Thelia\Condition\SerializableCondition;
use Thelia\Core\Translation\Translator;
use Thelia\Coupon\FacadeInterface;
/**
@@ -41,7 +40,7 @@ interface ConditionInterface
*
* @param FacadeInterface $adapter Service adapter
*/
function __construct(FacadeInterface $adapter);
public function __construct(FacadeInterface $adapter);
/**
* Get Condition Service id
@@ -75,7 +74,6 @@ interface ConditionInterface
*/
public function getAvailableOperators();
/**
* Get I18n name
*

View File

@@ -148,7 +148,6 @@ class MatchForEveryone extends ConditionAbstract
public function drawBackOfficeInputs()
{
// No input
return '';
}

View File

@@ -23,7 +23,6 @@
namespace Thelia\Condition\Implementation;
use Symfony\Component\Intl\Exception\NotImplementedException;
use Thelia\Condition\Implementation\ConditionAbstract;
use Thelia\Condition\Operators;
use Thelia\Exception\InvalidConditionOperatorException;
@@ -119,10 +118,8 @@ class MatchForTotalAmount extends ConditionAbstract
$this->isPriceValid($priceValue);
$this->isCurrencyValid($currencyValue);
$this->operators = array(
self::INPUT1 => $priceOperator,
self::INPUT2 => $currencyOperator,

View File

@@ -247,6 +247,7 @@ class MatchForXArticles extends ConditionAbstract
</div>
</div>
';
return $html;
}

View File

@@ -314,7 +314,6 @@ class CouponController extends BaseAdminController
/** @var ConditionInterface $condition */
$condition = $this->container->get($conditionId);
if ($inputs === null) {
return $this->pageNotFound();
}
@@ -723,6 +722,7 @@ class CouponController extends BaseAdminController
$args = array();
$args['conditions'] = $this->cleanConditionForTemplate($couponManager->getConditions());
return $this->render('coupon/conditions', $args);
}

View File

@@ -253,6 +253,26 @@ class Session extends BaseSession
return $this->get("thelia.order");
}
/**
* @param Order $order
* @return $this
*/
public function setProcessedOrder(Order $order)
{
$this->set('thelia.order.processed', $order);
return $this;
}
/**
* Return an order already processed, usefull for payment modules
* @return Order
*/
public function getProcessedOrder()
{
return $this->get('thelia.order.processed');
}
/**
* Set consumed coupons by the Customer
*

View File

@@ -23,7 +23,8 @@
namespace Thelia\Core\Template\Assets;
interface AssetManagerInterface {
interface AssetManagerInterface
{
/**
* Prepare an asset directory by checking that no changes occured in
* the source directory. If any change is detected, the whole asset directory

View File

@@ -76,7 +76,8 @@ class AsseticAssetManager implements AssetManagerInterface
*
* @return bool
*/
protected function isSourceFile(\SplFileInfo $fileInfo) {
protected function isSourceFile(\SplFileInfo $fileInfo)
{
return in_array($fileInfo->getExtension(), $this->source_file_extensions);
}
@@ -205,8 +206,7 @@ class AsseticAssetManager implements AssetManagerInterface
throw new \RuntimeException(
"Failed to create asset stamp file $stamp_file_path. Please check that your web server has the proper access rights to do that.");
}
/* }
else {
/* } else {
@fclose($fp);
}
*/
@@ -221,8 +221,8 @@ class AsseticAssetManager implements AssetManagerInterface
* @throws \InvalidArgumentException if a wrong filter is passed
* @return an array of filter names
*/
protected function decodeAsseticFilters(FilterManager $filterManager, $filters) {
protected function decodeAsseticFilters(FilterManager $filterManager, $filters)
{
if (!empty($filters)) {
$filter_list = explode(',', $filters);
@@ -261,8 +261,7 @@ class AsseticAssetManager implements AssetManagerInterface
break;
}
}
}
else {
} else {
$filter_list = array();
}

View File

@@ -15,7 +15,6 @@ use Thelia\Core\Template\Element\LoopResult;
use Thelia\Core\Template\Element\LoopResultRow;
use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Model\CountryQuery;
use Thelia\TaxEngine\TaxEngine;
use Thelia\Type;

View File

@@ -25,8 +25,6 @@ namespace Thelia\Core\Template\Loop;
use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Condition\ConditionFactory;
use Thelia\Condition\Implementation\ConditionInterface;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Core\Template\Element\BaseLoop;
use Thelia\Core\Template\Element\LoopResult;
use Thelia\Core\Template\Element\LoopResultRow;
@@ -35,7 +33,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Model\OrderCouponQuery;
use Thelia\Model\OrderQuery;
use Thelia\Type;
/**
*

View File

@@ -36,7 +36,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Exception\TaxEngineException;
use Thelia\Model\CategoryQuery;
use Thelia\Model\CountryQuery;
use Thelia\Model\CurrencyQuery;
use Thelia\Model\Map\ProductPriceTableMap;
use Thelia\Model\Map\ProductSaleElementsTableMap;

View File

@@ -34,7 +34,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Exception\TaxEngineException;
use Thelia\Model\Base\ProductSaleElementsQuery;
use Thelia\Model\CountryQuery;
use Thelia\Model\CurrencyQuery;
use Thelia\Model\Map\ProductSaleElementsTableMap;
use Thelia\TaxEngine\TaxEngine;

View File

@@ -23,19 +23,12 @@
namespace Thelia\Core\Template\Loop;
use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Core\Security\AccessManager;
use Thelia\Core\Template\Element\BaseI18nLoop;
use Thelia\Core\Template\Element\LoopResult;
use Thelia\Core\Template\Element\LoopResultRow;
use Thelia\Core\Template\Element\PropelSearchLoopInterface;
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\ModuleQuery;
use Thelia\Module\BaseModule;
use Thelia\Type;
use Thelia\Core\Template\TemplateHelper;
use Thelia\Core\Template\TemplateDefinition;
@@ -72,7 +65,8 @@ class Template extends BaseLoop implements ArraySearchLoopInterface
);
}
public function buildArray() {
public function buildArray()
{
$type = $this->getArg('template-type')->getValue();
if ($type == 'front-office')

View File

@@ -50,7 +50,6 @@ interface ParserInterface
*/
public function addTemplateDirectory($templateType, $templateName, $templateDirectory, $key, $unshift = false);
/**
* Return the registeted template directories for a givent template type
*

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Template\Smarty\Assets;
use Thelia\Core\Template\Assets\AsseticHelper;
use Thelia\Core\Template\TemplateDefinition;
use Thelia\Tools\URL;
use Thelia\Core\Template\Assets\AssetManagerInterface;
@@ -37,7 +36,7 @@ class SmartyAssetsManager
private $web_root;
private $path_relative_to_web_root;
static private $assetsDirectory = null;
private static $assetsDirectory = null;
/**
* Creates a new SmartyAssetsManager instance
@@ -67,7 +66,7 @@ class SmartyAssetsManager
if (isset($templateDirectories[$templateDefinition->getName()])) {
/* create assets foreach registered directory : main @ modules */
foreach($templateDirectories[$templateDefinition->getName()] as $key => $directory) {
foreach ($templateDirectories[$templateDefinition->getName()] as $key => $directory) {
$tpl_path = $directory . DS . self::$assetsDirectory;
@@ -95,7 +94,7 @@ class SmartyAssetsManager
/* we trick here relative thinking for file attribute */
$file = ltrim($file, '/');
while(substr($file, 0, 3) == '../') {
while (substr($file, 0, 3) == '../') {
$file = substr($file, 3);
}

View File

@@ -14,8 +14,6 @@ use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;
use Thelia\Core\Template\Exception\ResourceNotFoundException;
use Thelia\Core\Template\ParserContext;
use Thelia\Core\Template\TemplateDefinition;
use Thelia\Model\ConfigQuery;
use Thelia\Core\Template\TemplateHelper;
use Imagine\Exception\InvalidArgumentException;
use Thelia\Core\Translation\Translator;
@@ -72,7 +70,6 @@ class SmartyParser extends Smarty implements ParserInterface
$this->setCompileDir($compile_dir);
$this->setCacheDir($cache_dir);
$this->debugging = $debug;
// Prevent smarty ErrorException: Notice: Undefined index bla bla bla...
@@ -80,7 +77,7 @@ class SmartyParser extends Smarty implements ParserInterface
// Si on n'est pas en mode debug, activer le cache, avec une lifetime de 15mn, et en vérifiant que les templates sources n'ont pas été modifiés.
if($debug) {
if ($debug) {
$this->setCaching(Smarty::CACHING_OFF);
$this->setForceCompile(true);
} else {
@@ -89,7 +86,6 @@ class SmartyParser extends Smarty implements ParserInterface
//$this->enableSecurity();
// The default HTTP status
$this->status = 200;
@@ -106,9 +102,9 @@ class SmartyParser extends Smarty implements ParserInterface
* @param unknown $key ???
* @param string $unshift ??? Etienne ?
*/
public function addTemplateDirectory($templateType, $templateName, $templateDirectory, $key, $unshift = false) {
if(true === $unshift && isset($this->templateDirectories[$templateType][$templateName])) {
public function addTemplateDirectory($templateType, $templateName, $templateDirectory, $key, $unshift = false)
{
if (true === $unshift && isset($this->templateDirectories[$templateType][$templateName])) {
$this->templateDirectories[$templateType][$templateName] = array_merge(
array(
@@ -176,7 +172,7 @@ class SmartyParser extends Smarty implements ParserInterface
/* do not pass array directly to addTemplateDir since we cant control on keys */
if (isset($this->templateDirectories[$templateDefinition->getType()][$templateDefinition->getName()])) {
foreach($this->templateDirectories[$templateDefinition->getType()][$templateDefinition->getName()] as $key => $directory) {
foreach ($this->templateDirectories[$templateDefinition->getType()][$templateDefinition->getName()] as $key => $directory) {
$this->addTemplateDir($directory, $key);
}
}

View File

@@ -57,13 +57,12 @@ class TemplateDefinition
*/
protected $type;
public function __construct($name, $type)
{
$this->name = $name;
$this->type = $type;
switch($type) {
switch ($type) {
case TemplateDefinition::FRONT_OFFICE:
$this->path = self::FRONT_OFFICE_SUBDIR . $name;
break;
@@ -90,14 +89,17 @@ class TemplateDefinition
public function setName($name)
{
$this->name = $name;
return $this;
}
public function getI18nPath() {
public function getI18nPath()
{
return $this->getPath() . DS . 'I18n';
}
public function getAbsoluteI18nPath() {
public function getAbsoluteI18nPath()
{
return THELIA_TEMPLATE_DIR . $this->getI18nPath();
}
@@ -106,7 +108,8 @@ class TemplateDefinition
return $this->path;
}
public function getAbsolutePath() {
public function getAbsolutePath()
{
return THELIA_TEMPLATE_DIR . $this->getPath();
}
@@ -115,13 +118,15 @@ class TemplateDefinition
return $this->getPath() . DS . 'configs';
}
public function getAbsoluteConfigPath() {
public function getAbsoluteConfigPath()
{
return THELIA_TEMPLATE_DIR . $this->getConfigPath();
}
public function setPath($path)
{
$this->path = $path;
return $this;
}
@@ -133,13 +138,15 @@ class TemplateDefinition
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* Returns an iterator on the standard templates subdir names
*/
public static function getStandardTemplatesSubdirsIterator() {
public static function getStandardTemplatesSubdirsIterator()
{
return new \ArrayIterator(self::$standardTemplatesSubdirs);
}
}

View File

@@ -93,7 +93,8 @@ class TemplateHelper
/**
* Returns an array which contains all standard template definitions
*/
public function getStandardTemplateDefinitions() {
public function getStandardTemplateDefinitions()
{
return array(
$this->getActiveFrontTemplate(),
$this->getActiveAdminTemplate(),
@@ -108,13 +109,13 @@ class TemplateHelper
* @param int $templateType the template type
* @return An array of \Thelia\Core\Template\TemplateDefinition
*/
public function getList($templateType) {
public function getList($templateType)
{
$list = $exclude = array();
$tplIterator = TemplateDefinition::getStandardTemplatesSubdirsIterator();
foreach($tplIterator as $type => $subdir) {
foreach ($tplIterator as $type => $subdir) {
if ($templateType == $type) {

View File

@@ -49,7 +49,6 @@ use Thelia\Config\DefinePropel;
use Thelia\Core\Template\TemplateDefinition;
use Thelia\Core\TheliaContainerBuilder;
use Thelia\Core\DependencyInjection\Loader\XmlFileLoader;
use Thelia\Model\ConfigQuery;
use Symfony\Component\Config\FileLocator;
use Propel\Runtime\Propel;
@@ -112,10 +111,11 @@ class Thelia extends Kernel
* @param TheliaParser $parser the parser
* @param Module $module the Module.
*/
protected function addStandardModuleTemplatesToParserEnvironment($parser, $module) {
protected function addStandardModuleTemplatesToParserEnvironment($parser, $module)
{
$stdTpls = TemplateDefinition::getStandardTemplatesSubdirsIterator();
foreach($stdTpls as $templateType => $templateSubdirName) {
foreach ($stdTpls as $templateType => $templateSubdirName) {
$this->addModuleTemplateToParserEnvironment($parser, $module, $templateType, $templateSubdirName);
}
}
@@ -128,8 +128,8 @@ class Thelia extends Kernel
* @param string $templateType the template type (one of the TemplateDefinition type constants)
* @param string $templateSubdirName the template subdirectory name (one of the TemplateDefinition::XXX_SUBDIR constants)
*/
protected function addModuleTemplateToParserEnvironment($parser, $module, $templateType, $templateSubdirName) {
protected function addModuleTemplateToParserEnvironment($parser, $module, $templateType, $templateSubdirName)
{
// Get template path
$templateDirectory = $module->getAbsoluteTemplateDirectoryPath($templateSubdirName);
@@ -155,8 +155,7 @@ class Thelia extends Kernel
);
}
}
}
catch (\UnexpectedValueException $ex) {
} catch (\UnexpectedValueException $ex) {
// The directory does not exists, ignore it.
}
}
@@ -176,7 +175,7 @@ class Thelia extends Kernel
->depth(0)
->in(THELIA_ROOT . "/core/lib/Thelia/Config/Resources");
foreach($finder as $file) {
foreach ($finder as $file) {
$loader->load($file->getBaseName());
}
@@ -219,7 +218,7 @@ class Thelia extends Kernel
// Standard templates (front, back, pdf, mail)
$th = TemplateHelper::getInstance();
foreach($th->getStandardTemplateDefinitions() as $templateDefinition) {
foreach ($th->getStandardTemplateDefinitions() as $templateDefinition) {
if (is_dir($dir = $templateDefinition->getAbsoluteI18nPath())) {
$translationDirs[] = $dir;
}

View File

@@ -59,7 +59,7 @@ class BaseFacade implements FacadeInterface
*
* @param ContainerInterface $container Service container
*/
function __construct(ContainerInterface $container)
public function __construct(ContainerInterface $container)
{
$this->container = $container;
}
@@ -135,7 +135,6 @@ class BaseFacade implements FacadeInterface
return $this->getRequest()->getSession()->getCurrency()->getCode();
}
/**
* Return the number of Products in the Cart
*
@@ -202,7 +201,6 @@ class BaseFacade implements FacadeInterface
return $this->container->get('thelia.translator');
}
/**
* Return the main currency
* THe one used to set prices in BackOffice
@@ -234,7 +232,6 @@ class BaseFacade implements FacadeInterface
return $this->container->get('thelia.condition.validator');
}
/**
* Return all available currencies
*

View File

@@ -132,6 +132,4 @@ class CouponFactory
return clone $couponManager;
}
}

View File

@@ -43,9 +43,6 @@ class CouponManager
/** @var ContainerInterface Service Container */
protected $container = null;
/** @var array CouponInterface to process*/
protected $coupons = array();
/** @var array Available Coupons (Services) */
protected $availableCoupons = array();
@@ -61,10 +58,8 @@ class CouponManager
{
$this->container = $container;
$this->facade = $container->get('thelia.facade');
$this->coupons = $this->facade->getCurrentCoupons();
}
/**
* Get Discount for the given Coupons
*
@@ -74,9 +69,9 @@ class CouponManager
public function getDiscount()
{
$discount = 0.00;
if (count($this->coupons) > 0) {
$couponsKept = $this->sortCoupons($this->coupons);
$coupons = $this->facade->getCurrentCoupons();
if (count($coupons) > 0) {
$couponsKept = $this->sortCoupons($coupons);
$discount = $this->getEffect($couponsKept);
@@ -96,11 +91,12 @@ class CouponManager
*/
public function isCouponRemovingPostage()
{
if (count($this->coupons) == 0) {
$coupons = $this->facade->getCurrentCoupons();
if (count($coupons) == 0) {
return false;
}
$couponsKept = $this->sortCoupons($this->coupons);
$couponsKept = $this->sortCoupons($coupons);
/** @var CouponInterface $coupon */
foreach ($couponsKept as $coupon) {
@@ -244,7 +240,7 @@ class CouponManager
$ret = $usageLeft;
}
} catch(\Exception $e) {
} catch (\Exception $e) {
$ret = false;
}

View File

@@ -45,7 +45,7 @@ interface FacadeInterface
*
* @param ContainerInterface $container Service container
*/
function __construct(ContainerInterface $container);
public function __construct(ContainerInterface $container);
/**
* Return a Cart a CouponManager can process

View File

@@ -23,7 +23,6 @@
namespace Thelia\Coupon\Type;
use Symfony\Component\Intl\Exception\NotImplementedException;
use Thelia\Condition\ConditionEvaluator;
use Thelia\Core\Translation\Translator;
use Thelia\Coupon\FacadeInterface;
@@ -62,7 +61,6 @@ abstract class CouponAbstract implements CouponInterface
/** @var ConditionEvaluator Condition validator */
protected $conditionEvaluator = null;
/** @var string Service Id */
protected $serviceId = null;
@@ -75,8 +73,6 @@ abstract class CouponAbstract implements CouponInterface
/** @var string Coupon code (ex: XMAS) */
protected $code = null;
/** @var string Coupon title (ex: Coupon for XMAS) */
protected $title = null;
@@ -86,8 +82,6 @@ abstract class CouponAbstract implements CouponInterface
/** @var string Coupon description */
protected $description = null;
/** @var bool if Coupon is enabled */
protected $isEnabled = false;
@@ -106,7 +100,6 @@ abstract class CouponAbstract implements CouponInterface
/** @var bool if Coupon is available for Products already on special offers */
protected $isAvailableOnSpecialOffers = false;
/**
* Constructor
*
@@ -355,7 +348,6 @@ abstract class CouponAbstract implements CouponInterface
return $this->serviceId;
}
/**
* Check if the current state of the application is matching this Coupon conditions
* Thelia variables are given by the FacadeInterface
@@ -398,5 +390,4 @@ abstract class CouponAbstract implements CouponInterface
return $this->extendedInputs;
}
}

View File

@@ -138,8 +138,6 @@ interface CouponInterface
*/
public function isRemovingPostage();
/**
* Return condition to validate the Coupon or not
*
@@ -173,7 +171,6 @@ interface CouponInterface
*/
public function isAvailableOnSpecialOffers();
/**
* Check if Coupon has been disabled by admin
*
@@ -196,7 +193,6 @@ interface CouponInterface
*/
public function isExpired();
/**
* Return effects generated by the coupon
* A positive value

View File

@@ -110,7 +110,6 @@ class RemoveXPercent extends CouponAbstract
return $basePrice * (( $this->percentage ) / 100);
}
/**
* Get I18n name
*

View File

@@ -22,7 +22,6 @@
/*************************************************************************************/
namespace Thelia\Form;
use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\ExecutionContextInterface;
use Thelia\Core\Translation\Translator;
use Thelia\Model\ProfileQuery;

View File

@@ -53,7 +53,6 @@ abstract class BaseInstall
throw new AlreadyInstallException("Thelia is already installed");
}
$this->exec();
}

View File

@@ -24,12 +24,8 @@
namespace Thelia\Install;
use PDO;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use Symfony\Component\Translation\TranslatorInterface;
use Thelia\Core\Translation\Translator;
use Thelia\Install\Exception\InstallException;
/**
* Class CheckDatabaseConnection

View File

@@ -28,7 +28,6 @@ use RecursiveIteratorIterator;
use Symfony\Component\Translation\TranslatorInterface;
use Thelia\Core\Translation\Translator;
/**
* Class CheckPermission
*
@@ -164,9 +163,6 @@ class CheckPermission extends BaseInstall
}
}
return $this->isValid;
}
@@ -200,7 +196,6 @@ class CheckPermission extends BaseInstall
return (is_writable(THELIA_ROOT . $directory) === true);
}
/**
* Get Translated text about the directory state
*
@@ -269,7 +264,6 @@ class CheckPermission extends BaseInstall
return $translatedText;
}
/**
* Get Translated text about the directory state
* Not usable with CLI
@@ -382,7 +376,7 @@ class CheckPermission extends BaseInstall
{
$serverValueInBytes = $this->returnBytes(ini_get($key));
if($serverValueInBytes == -1) {
if ($serverValueInBytes == -1) {
return true;
}
@@ -400,7 +394,7 @@ class CheckPermission extends BaseInstall
{
$val = trim($val);
$last = strtolower($val[strlen($val)-1]);
switch($last) {
switch ($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;

View File

@@ -23,7 +23,6 @@
namespace Thelia\Install;
/**
* Class Database
* @package Thelia\Install

View File

@@ -23,7 +23,6 @@
namespace Thelia\Install\Exception;
/**
* Class AlreadyInstallException
* @package Thelia\Install\Exception

View File

@@ -23,7 +23,6 @@
namespace Thelia\Install\Exception;
/**
* Class UpToDateException
* @package Thelia\Install\Exception

View File

@@ -29,7 +29,6 @@ use Thelia\Log\Tlog;
use Thelia\Model\ConfigQuery;
use Thelia\Model\Map\ProductTableMap;
/**
* Class Update
* @package Thelia\Install
@@ -61,7 +60,7 @@ class Update
$currentVersion = ConfigQuery::read('thelia_version');
$logger->debug("start update process");
if(true === $this->isLatestVersion($currentVersion)) {
if (true === $this->isLatestVersion($currentVersion)) {
$logger->debug("You already have the latest version. No update available");
throw new UpToDateException('You already have the latest version. No update available');
}
@@ -78,7 +77,7 @@ class Update
}
$con->commit();
$logger->debug('update successfully');
} catch(PropelException $e) {
} catch (PropelException $e) {
$con->rollBack();
$logger->error(sprintf('error during update process with message : %s', $e->getMessage()));
throw $e;

View File

@@ -27,13 +27,13 @@ use Thelia\Core\Event\MailTransporterEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\ConfigQuery;
/**
* Class MailerFactory
* @package Thelia\Mailer
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class MailerFactory {
class MailerFactory
{
/**
* @var \Swift_Mailer
*/
@@ -49,7 +49,7 @@ class MailerFactory {
$transporterEvent = new MailTransporterEvent();
$this->dispatcher->dispatch(TheliaEvents::MAILTRANSPORTER_CONFIG, $transporterEvent);
if($transporterEvent->hasTransporter()) {
if ($transporterEvent->hasTransporter()) {
$transporter = $transporterEvent->getTransporter();
} else {
if (ConfigQuery::isSmtpEnable()) {
@@ -74,6 +74,7 @@ class MailerFactory {
->setTimeout(ConfigQuery::getSmtpTimeout())
->setSourceIp(ConfigQuery::getSmtpSourceIp())
;
return $smtpTransporter;
}
@@ -87,5 +88,4 @@ class MailerFactory {
return $this->swiftMailer;
}
}

View File

@@ -22,12 +22,8 @@
/*************************************************************************************/
namespace Thelia\Rewriting;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\Join;
use Thelia\Exception\RewritingUrlException;
use Thelia\Exception\UrlRewritingException;
use Thelia\Model\RewritingUrlQuery;
use Thelia\Model\Map\RewritingUrlTableMap;
/**
* Class RewritingResolver
@@ -51,7 +47,7 @@ class RewritingResolver
{
$this->rewritingUrlQuery = new RewritingUrlQuery();
if($url !== null) {
if ($url !== null) {
$this->load($url);
}
}
@@ -62,7 +58,7 @@ class RewritingResolver
$rewrittenUrl = urldecode($rewrittenUrl);
$this->search = $this->rewritingUrlQuery->getResolverSearch($rewrittenUrl);
if($this->search->count() == 0) {
if ($this->search->count() == 0) {
throw new UrlRewritingException('URL NOT FOUND', UrlRewritingException::URL_NOT_FOUND);
}
@@ -76,16 +72,16 @@ class RewritingResolver
protected function getOtherParameters()
{
if($this->search === null) {
if ($this->search === null) {
throw new UrlRewritingException('RESOLVER NULL SEARCH', UrlRewritingException::RESOLVER_NULL_SEARCH);
}
$otherParameters = array();
foreach($this->search as $result) {
foreach ($this->search as $result) {
$parameter = $result->getParameter();
$value = $result->getValue();
if(null !== $parameter) {
if (null !== $parameter) {
$otherParameters[$parameter] = $value;
}
}
@@ -93,5 +89,4 @@ class RewritingResolver
return $otherParameters;
}
}

View File

@@ -22,9 +22,7 @@
/*************************************************************************************/
namespace Thelia\Rewriting;
use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Model\RewritingUrlQuery;
use Thelia\Model\Map\RewritingUrlTableMap;
use Thelia\Tools\URL;
/**
@@ -46,7 +44,7 @@ class RewritingRetriever
{
$this->rewritingUrlQuery = new RewritingUrlQuery();
if($view !== null && $viewLocale !== null) {
if ($view !== null && $viewLocale !== null) {
$this->load($view, $viewLocale, $viewId);
}
}
@@ -61,16 +59,16 @@ class RewritingRetriever
$this->search = $this->rewritingUrlQuery->getViewUrlQuery($view, $viewLocale, $viewId);
$allParametersWithoutView = array();
if(null !== $viewId) {
if (null !== $viewId) {
$allParametersWithoutView['locale'] = $viewLocale;
}
if(null !== $viewId) {
if (null !== $viewId) {
$allParametersWithoutView[$view . '_id'] = $viewId;
}
$this->rewrittenUrl = null;
$this->url = URL::getInstance()->viewUrl($view, $allParametersWithoutView);
if($this->search !== null) {
if ($this->search !== null) {
$this->rewrittenUrl = URL::getInstance()->absoluteUrl(
$this->search->getUrl()
);
@@ -85,8 +83,9 @@ class RewritingRetriever
*/
public function loadSpecificUrl($view, $viewLocale, $viewId = null, $viewOtherParameters = array())
{
if(empty($viewOtherParameters)) {
if (empty($viewOtherParameters)) {
$this->loadViewUrl($view, $viewLocale, $viewId);
return;
}
@@ -94,13 +93,13 @@ class RewritingRetriever
$allParametersWithoutView = $viewOtherParameters;
$allParametersWithoutView['locale'] = $viewLocale;
if(null !== $viewId) {
if (null !== $viewId) {
$allParametersWithoutView[$view . '_id'] = $viewId;
}
$this->rewrittenUrl = null;
$this->url = URL::getInstance()->viewUrl($view, $allParametersWithoutView);
if($this->search !== null) {
if ($this->search !== null) {
$this->rewrittenUrl = $this->search->getUrl();
}
}

View File

@@ -61,10 +61,10 @@ class Calculator
$this->country = null;
$this->taxRulesCollection = null;
if($product->getId() === null) {
if ($product->getId() === null) {
throw new TaxEngineException('Product id is empty in Calculator::load', TaxEngineException::UNDEFINED_PRODUCT);
}
if($country->getId() === null) {
if ($country->getId() === null) {
throw new TaxEngineException('Country id is empty in Calculator::load', TaxEngineException::UNDEFINED_COUNTRY);
}
@@ -82,13 +82,13 @@ class Calculator
$this->country = null;
$this->taxRulesCollection = null;
if($taxRule->getId() === null) {
if ($taxRule->getId() === null) {
throw new TaxEngineException('TaxRule id is empty in Calculator::loadTaxRule', TaxEngineException::UNDEFINED_TAX_RULE);
}
if($country->getId() === null) {
if ($country->getId() === null) {
throw new TaxEngineException('Country id is empty in Calculator::loadTaxRule', TaxEngineException::UNDEFINED_COUNTRY);
}
if($product->getId() === null) {
if ($product->getId() === null) {
throw new TaxEngineException('Product id is empty in Calculator::load', TaxEngineException::UNDEFINED_PRODUCT);
}
@@ -120,15 +120,15 @@ class Calculator
*/
public function getTaxedPrice($untaxedPrice, &$taxCollection = null, $askedLocale = null)
{
if(null === $this->taxRulesCollection) {
if (null === $this->taxRulesCollection) {
throw new TaxEngineException('Tax rules collection is empty in Calculator::getTaxedPrice', TaxEngineException::UNDEFINED_TAX_RULES_COLLECTION);
}
if(null === $this->product) {
if (null === $this->product) {
throw new TaxEngineException('Product is empty in Calculator::getTaxedPrice', TaxEngineException::UNDEFINED_PRODUCT);
}
if(false === filter_var($untaxedPrice, FILTER_VALIDATE_FLOAT)) {
if (false === filter_var($untaxedPrice, FILTER_VALIDATE_FLOAT)) {
throw new TaxEngineException('BAD AMOUNT FORMAT', TaxEngineException::BAD_AMOUNT_FORMAT);
}
@@ -136,16 +136,16 @@ class Calculator
$currentPosition = 1;
$currentTax = 0;
if(null !== $taxCollection) {
if (null !== $taxCollection) {
$taxCollection = new OrderProductTaxCollection();
}
foreach($this->taxRulesCollection as $taxRule) {
$position = (int)$taxRule->getTaxRuleCountryPosition();
foreach ($this->taxRulesCollection as $taxRule) {
$position = (int) $taxRule->getTaxRuleCountryPosition();
$taxType = $taxRule->getTypeInstance();
$taxType->loadRequirements( $taxRule->getRequirements() );
if($currentPosition !== $position) {
if ($currentPosition !== $position) {
$taxedPrice += $currentTax;
$currentTax = 0;
$currentPosition = $position;
@@ -154,7 +154,7 @@ class Calculator
$taxAmount = round($taxType->calculate($this->product, $taxedPrice), 2);
$currentTax += $taxAmount;
if(null !== $taxCollection) {
if (null !== $taxCollection) {
$taxI18n = I18n::forceI18nRetrieving($askedLocale, 'Tax', $taxRule->getId());
$orderProductTax = new OrderProductTax();
$orderProductTax->setTitle($taxI18n->getTitle());
@@ -171,36 +171,36 @@ class Calculator
public function getUntaxedPrice($taxedPrice)
{
if(null === $this->taxRulesCollection) {
if (null === $this->taxRulesCollection) {
throw new TaxEngineException('Tax rules collection is empty in Calculator::getTaxAmount', TaxEngineException::UNDEFINED_TAX_RULES_COLLECTION);
}
if(null === $this->product) {
if (null === $this->product) {
throw new TaxEngineException('Product is empty in Calculator::getTaxedPrice', TaxEngineException::UNDEFINED_PRODUCT);
}
if(false === filter_var($taxedPrice, FILTER_VALIDATE_FLOAT)) {
if (false === filter_var($taxedPrice, FILTER_VALIDATE_FLOAT)) {
throw new TaxEngineException('BAD AMOUNT FORMAT', TaxEngineException::BAD_AMOUNT_FORMAT);
}
$taxRule = $this->taxRulesCollection->getLast();
if(null === $taxRule) {
if (null === $taxRule) {
throw new TaxEngineException('Tax rules collection got no tax ', TaxEngineException::NO_TAX_IN_TAX_RULES_COLLECTION);
}
$untaxedPrice = $taxedPrice;
$currentPosition = (int)$taxRule->getTaxRuleCountryPosition();
$currentPosition = (int) $taxRule->getTaxRuleCountryPosition();
$currentFixTax = 0;
$currentTaxFactor = 0;
do {
$position = (int)$taxRule->getTaxRuleCountryPosition();
$position = (int) $taxRule->getTaxRuleCountryPosition();
$taxType = $taxRule->getTypeInstance();
$taxType->loadRequirements( $taxRule->getRequirements() );
if($currentPosition !== $position) {
if ($currentPosition !== $position) {
$untaxedPrice -= $currentFixTax;
$untaxedPrice = $untaxedPrice / (1+$currentTaxFactor);
$currentFixTax = 0;
@@ -211,8 +211,7 @@ class Calculator
$currentFixTax += $taxType->fixAmountRetriever($this->product);
$currentTaxFactor += $taxType->pricePercentRetriever();
} while($taxRule = $this->taxRulesCollection->getPrevious());
} while ($taxRule = $this->taxRulesCollection->getPrevious());
$untaxedPrice -= $currentFixTax;
$untaxedPrice = $untaxedPrice / (1+$currentTaxFactor);
@@ -224,7 +223,7 @@ class Calculator
$untaxedPrice -= $taxType->fixAmountRetriever();
} while($taxRule = $this->taxRulesCollection->getPrevious());
} while ($taxRule = $this->taxRulesCollection->getPrevious());
$taxRule = $this->taxRulesCollection->getLast();
@@ -238,7 +237,7 @@ class Calculator
$toto = true;
} while($taxRule = $this->taxRulesCollection->getPrevious());
} while ($taxRule = $this->taxRulesCollection->getPrevious());
$untaxedPrice = $untaxedPrice / (1+$currentTaxFactor);*/

View File

@@ -42,13 +42,13 @@ class TaxEngine
*/
protected $session = null;
static public function getInstance(Session $session = null)
public static function getInstance(Session $session = null)
{
if(null === self::$instance) {
if (null === self::$instance) {
self::$instance = new TaxEngine();
}
if(null !== self::$instance) {
if (null !== self::$instance) {
self::$instance->setSession($session);
}
@@ -85,7 +85,7 @@ class TaxEngine
$fileName = $directoryContent->getFilename();
$className = substr($fileName, 0, (1+strlen($directoryContent->getExtension())) * -1);
if($className == "BaseTaxType") {
if ($className == "BaseTaxType") {
continue;
}
@@ -106,9 +106,9 @@ class TaxEngine
*/
public function getDeliveryCountry($force = false)
{
if(false === $force || null === self::$taxCountry) {
if (false === $force || null === self::$taxCountry) {
/* is there a logged in customer ? */
if(null !== $customer = $this->session->getCustomerUser()) {
if (null !== $customer = $this->session->getCustomerUser()) {
if (null !== $this->session->getOrder()
&& null !== $this->session->getOrder()->chosenDeliveryAddress
&& null !== $currentDeliveryAddress = AddressQuery::create()->findPk($this->session->getOrder()->chosenDeliveryAddress)) {

View File

@@ -35,13 +35,13 @@ abstract class BaseTaxType
{
protected $requirements = null;
public abstract function pricePercentRetriever();
abstract public function pricePercentRetriever();
public abstract function fixAmountRetriever(Product $product);
abstract public function fixAmountRetriever(Product $product);
public abstract function getRequirementsList();
abstract public function getRequirementsList();
public abstract function getTitle();
abstract public function getTitle();
public function calculate(Product $product, $untaxedPrice)
{
@@ -52,20 +52,20 @@ abstract class BaseTaxType
{
$this->requirements = $this->getRequirementsList();
if(!is_array($this->requirements)) {
if (!is_array($this->requirements)) {
throw new TaxEngineException('getRequirementsList must return an array', TaxEngineException::TAX_TYPE_BAD_ABSTRACT_METHOD);
}
foreach($this->requirements as $requirement => $requirementType) {
if(!$requirementType instanceof TypeInterface) {
foreach ($this->requirements as $requirement => $requirementType) {
if (!$requirementType instanceof TypeInterface) {
throw new TaxEngineException('getRequirementsList must return an array of TypeInterface', TaxEngineException::TAX_TYPE_BAD_ABSTRACT_METHOD);
}
if(!array_key_exists($requirement, $requirementsValues)) {
if (!array_key_exists($requirement, $requirementsValues)) {
throw new TaxEngineException('Cannot load requirements : requirement value for `' . $requirement . '` not found', TaxEngineException::TAX_TYPE_REQUIREMENT_NOT_FOUND);
}
if(!$requirementType->isValid($requirementsValues[$requirement])) {
if (!$requirementType->isValid($requirementsValues[$requirement])) {
throw new TaxEngineException('Requirement value for `' . $requirement . '` does not match required type', TaxEngineException::TAX_TYPE_BAD_REQUIREMENT_VALUE);
}
@@ -75,11 +75,11 @@ abstract class BaseTaxType
public function getRequirement($key)
{
if($this->requirements === null) {
if ($this->requirements === null) {
throw new TaxEngineException('Requirements are empty in BaseTaxType::getRequirement', TaxEngineException::UNDEFINED_REQUIREMENTS);
}
if(!array_key_exists($key, $this->requirements)) {
if (!array_key_exists($key, $this->requirements)) {
throw new TaxEngineException('Requirement value for `' . $key . '` does not exists in BaseTaxType::$requirements', TaxEngineException::UNDEFINED_REQUIREMENT_VALUE);
}

View File

@@ -52,7 +52,7 @@ class FeatureFixAmountTaxType extends BaseTaxType
$taxAmount = $query->getFreeTextValue();
$testInt = new FloatType();
if(!$testInt->isValid($taxAmount)) {
if (!$testInt->isValid($taxAmount)) {
throw new TaxEngineException('Feature value does not match FLOAT format', TaxEngineException::FEATURE_BAD_EXPECTED_VALUE);
}

View File

@@ -406,7 +406,6 @@ Sed facilisis pellentesque nisl, eu tincidunt erat scelerisque a. Nullam malesua
$couponManager = new RemoveXAmount($stubFacade);
$condition1 = new MatchForTotalAmount($stubFacade);
$operators = array(
MatchForTotalAmount::INPUT1 => Operators::SUPERIOR,
@@ -439,7 +438,6 @@ Sed facilisis pellentesque nisl, eu tincidunt erat scelerisque a. Nullam malesua
->method('unserializeConditionCollection')
->will($this->returnValue($conditions));
$stubContainer->expects($this->any())
->method('get')
->will($this->onConsecutiveCalls($stubFacade, $couponManager, $stubConditionFactory));

View File

@@ -1190,15 +1190,15 @@ INSERT INTO `country_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `po
INSERT INTO `tax` (`id`, `type`, `serialized_requirements`, `created_at`, `updated_at`)
VALUES
(1, 'PricePercentTaxType', 'eyJwZXJjZW50IjoxOS42fQ==', NOW(), NOW()),
(2, 'PricePercentTaxType', 'eyJwZXJjZW50Ijo1LjV9', NOW(), NOW());
(1, 'PricePercentTaxType', 'eyJwZXJjZW50IjoiMjAifQ==', NOW(), NOW()),
(2, 'PricePercentTaxType', 'eyJwZXJjZW50IjoiMTAifQ==', NOW(), NOW());
INSERT INTO `tax_i18n` (`id`, `locale`, `title`)
VALUES
(1, 'fr_FR', 'TVA française à 19.6%'),
(1, 'en_US', 'French 19.6% VAT'),
(2, 'fr_FR', 'TVA française à 5.5%'),
(2, 'en_US', 'French 5.5% VAT');
(1, 'fr_FR', 'TVA française à 20%'),
(1, 'en_US', 'French 20% VAT'),
(2, 'fr_FR', 'TVA française à 10%'),
(2, 'en_US', 'French 10% VAT');
INSERT INTO `tax_rule` (`id`, `is_default`, `created_at`, `updated_at`)
VALUES
(1, 1, NOW(), NOW()),
@@ -1206,10 +1206,10 @@ INSERT INTO `tax_rule` (`id`, `is_default`, `created_at`, `updated_at`)
INSERT INTO `tax_rule_i18n` (`id`, `locale`, `title`)
VALUES
(1, 'fr_FR', 'TVA française à 19.6%'),
(1, 'en_US', 'French 19.6% VAT'),
(2, 'fr_FR', 'TVA française à 5.5%'),
(2, 'en_US', 'French 5.5% VAT');
(1, 'fr_FR', 'TVA française à 20%'),
(1, 'en_US', 'French 20% VAT'),
(2, 'fr_FR', 'TVA française à 10%'),
(2, 'en_US', 'French 10% VAT');
INSERT INTO `tax_rule_country` (`tax_rule_id`, `country_id`, `tax_id`, `position`, `created_at`, `updated_at`)
VALUES

File diff suppressed because it is too large Load Diff

View File

@@ -6,6 +6,9 @@ return array(
'(edit)' => '(modification)',
'14.50' => '14.50',
'<span id="number_of_generated_combinations">0</span> combinations' => '<span id="number_of_generated_combinations">0</span> combinaisons',
'<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>Impossible de traduire tout les champs.</strong> Selon votre configuration PHP, les formulaires ne peuvent pas contenir plus de %current_max_input_vars champs input, mais au moins %required_max_input_vars sont nécessaire. Vous devez changer la valeur max_input_vars dans votre fichier de configuration PHP ou modifier le fichier de traduction manuellement.',
'<strong>Congratulations</strong>, all text is now translated !' => '<strong>Félicitation</strong>, tout est traduit !',
'<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>Aucun texte à traduire trouvé</strong>. Cela est probablement normal. Sinon veuillez-vous assurer d\'utiliser la fonction Smarty intl dans vos templates, ou la méthode Translator::trans() dans vos fichiers PHP.',
'A content could be attached to more than one folder. Select here the additional folders for this content.' => 'Un contenu peut-être lié à un ou plusieurs fichier. Sélectionnez ici les dossiers additionnels pour ce contenu.',
@@ -78,6 +81,8 @@ return array(
'Can\'t be cumulative' => 'Ne peut être cumulé',
'Can\'t load documents, please refresh this page.' => 'Impossible de charger le document, veuillez rafraîchir cette page.',
'Can\'t load images, please refresh this page.' => 'Impossible de charger les images, veuillez rafraîchir cette page.',
'Can\'t reorder documents, please refresh this page.' => 'Impossible de réorganiser les documents, rafraichissez la page.',
'Can\'t reorder images, please refresh this page.' => 'Impossible de réorganiser les images, rafraichissez la page.',
'Cancel' => 'Annuler',
'Cancel changes and revert to original value' => 'Annuler les modifications et revenir à la version antérieure',
'Cancel this order' => 'Annuler cette commande',
@@ -106,6 +111,7 @@ return array(
'Change this tax rule' => 'Modifier cette règle de taxe',
'Change this template' => 'Modifier ce template',
'Change this variable' => 'Modifier cette variable',
'Chapo' => 'Chapeau',
'Check this box if you want to add this attributes to all product templates' => 'Cochez cette case si vous voulez ajouter cette déclinaison à tous les templates produits',
'Check this box if you want to add this features to all product templates' => 'Cochez cette case si voulez ajouter cette caractéristique à tous les templates produit.',
'Choose a country' => 'Choisissez un pays',
@@ -309,6 +315,7 @@ return array(
'Document' => 'Document',
'Document informations' => 'Informations sur le document',
'Documents' => 'Documents',
'Don\'t repeat keywords over and over in a row. Rather, put in keyword phrases.' => 'Ne pas répéter les mots-clés. Il est préférable de les intégrer dans des phrases.',
'Download invoice as PDF' => 'Télécharger la facture au format PDF',
'Download purchase order as PDF' => 'Télécharger le bon de commande au format PDF',
'Drop files to upload' => 'Déposez des fichiers à envoyer',
@@ -430,6 +437,7 @@ return array(
'Enter new currency position' => 'Modifier la position de la devise',
'Enter new feature position' => 'Modifier la position de la caractéristique',
'Enter new folder position' => 'Modifier la position du dossier',
'Enter new module position' => 'Entrez l\'emplacement du nouveau module',
'Enter new product position' => 'Classement du produit',
'Enter new value position' => 'Entrez une nouvelle position',
'Enter one or more IP V4 addresses separated by ";". Leave empty to display logs for all IP addresses' => 'Entrez une ou plusieurs adresses IP V4 séparées par un ";". Laissez vide afin d\'afficher les logs pour toutes les adresses IP',
@@ -441,6 +449,7 @@ return array(
'Expiration date :' => 'Date de fin de validité',
'Failed to get converted prices. Please try again.' => 'Erreur lors de la récupération des prix convertis. Veuillez réessayer.',
'Failed to get prices. Please try again.' => 'Erreur lors de la récupération des prix. Veuillez réessayer.',
'Fax number' => 'Numéro de fax',
'Feature Name' => 'Nom de la caractéristique',
'Feature information' => 'Informations sur la caractéristique',
'Feature title' => 'Titre de la caractéristique',
@@ -501,6 +510,7 @@ return array(
'Is enabled' => 'Est valide',
'Is removing postage' => 'Offre les frais de port',
'Is unlimited' => 'Est illimité',
'Keep the most important part of your description in the first 150-160 characters.' => 'Insérez la partie la plus importante de votre description dans les 150-160 premiers caractères.',
'Kg' => 'Kg',
'Label' => 'Libellé',
'Language name' => 'Nom de la langue',
@@ -528,6 +538,8 @@ return array(
'Mailing template name' => 'Nom du template de mailing',
'Mailing template purpose' => 'Objectif du template de mailing',
'Mailing templates' => 'Template e-mail',
'Make sure it uses keywords found within the page itself.' => 'Assurez-vous d\'utiliser des mot-clés qui apparaissent dans le contenu de la page en cours.',
'Make sure that your title is clear, and contains many of the keywords within the page itself.' => 'Assurez-vous que votre titre est clair et qu\'il contient les mot clés pertinents de la page en cours.',
'Manage module rights' => 'Gestion des accès aux modules',
'Manage resource rights' => 'Gérer les droits d\'accès aux ressources',
'Manage taxes' => 'Gérer les taxes',
@@ -573,6 +585,9 @@ return array(
'Order n°' => 'Commande n°',
'Ordered products' => 'Produits commandés',
'Orders' => 'Commandes',
'Originating file line number ' => 'Nombre de ligne du fichier d\'origine.',
'Originating file name' => 'Nom du fichier d\'origine.',
'Originating function name ' => 'Nom de la fonction d\'origine.',
'Other addresses' => 'Autres adresses',
'Overall sales' => 'Total des ventes',
'PDF templates' => 'Template PDF',
@@ -669,7 +684,7 @@ return array(
'Rewritten URL' => 'URL réécrites',
'Rights' => 'Droits',
'SEO' => 'SEO',
'Sale' => 'Vente',
'Sale' => 'En promo',
'Sale price incl. taxes' => 'Prix de vente taxes incluses',
'Sale price<br />w/ taxes (%currency)' => 'Prix de vente<br />sans taxes (%currency)',
'Sale price<br />w/o taxes (%currency)' => 'Prix de vente<br />avec taxes (%currency)',
@@ -714,6 +729,7 @@ return array(
'Select which items you want to translate' => 'Sélectionnez quels éléments vous voulez traduire',
'Send a mail to this customer' => 'Contacter ce client par mail',
'Send files' => 'Envoyer des fichiers',
'Sequential number of log line' => 'Numéro de ligne du log.',
'Set as default tax rule' => 'Configurer en tant que règle par défaut',
'Shipping configuration' => 'Configuration du transport',
'Shipping configuration name' => 'Nom de la configuration de livraison',
@@ -740,6 +756,7 @@ return array(
'Status' => 'Etat',
'Store' => 'Magasin',
'Store Business Identification Number (SIRET, etc).' => 'Numéro d\'identification de votre magasin (SIRET, etc).',
'Store address' => 'Adresse du magasin',
'Store configuration' => 'Configuration du magasin',
'Street address' => 'Adresse',
'Subject' => 'Sujet',
@@ -763,7 +780,9 @@ return array(
'Template title' => 'Titre du template',
'Templates' => 'Templates',
'Text version of this message' => 'Version texte de ce message',
'The HTML TITLE element is the most important element on your web page.' => 'La balise HTML TITLE est l\'élément le plus important de votre page.',
'The default pricing is used when no combination is defined.' => 'Le tarif par défaut est utilisé lorsque aucune combinaison n\'est définie.',
'The destinations processes logs to display, store or send them. You can select and configure zero, one or more destinations below.' => 'Destinations des processus de journaux à afficher, stocker ou envoyer. Vous pouvez sélectionner et configurer aucune, une ou plusieurs destinations ci-dessous.',
'The detailed description.' => 'La description détaillée.',
'The mailing template in HTML format.' => 'Le template de mailing au format HTML',
'The mailing template in text-only format.' => 'Le template de mailing en format text-only.',
@@ -821,7 +840,7 @@ return array(
'This year' => 'Cette année',
'Timeout' => 'Timeout',
'Timeout :' => 'Timeout:',
'Title' => 'Civilité',
'Title' => 'Titre',
'Title :' => 'Titre',
'To' => 'A',
'To create a new content, select an existing folder, or create a new one.' => 'Piur créer un nouveau contenu, choisissez un des dossiers ci dessus, ou créez un nouveau dossier.',
@@ -855,6 +874,7 @@ return array(
'Use Text message defined below' => 'Utiliser le message Text défini ci-dessous',
'Use address by default' => 'Utiliser comme adresse par défaut',
'Use default layout' => 'Utiliser le layout par défaut',
'Use the keyword phrase in your URL.' => 'Utilisez les mot-clés importants de la page dans votre URL.',
'Use this address by default' => 'Utiliser comme adresse par défaut',
'Used in your store front' => 'Utilisé dans votre vitrine',
'Username' => 'Nom d\'utilisateur',
@@ -887,6 +907,7 @@ return array(
'You can change the default folder (%title) in the "General" tab.' => 'Vous pouvez modifier le dossier par défaut (%title) dans l\'onglet "Général".',
'You can\'t delete this administrator' => 'Vous ne pouvez pas supprimer cet administrateur',
'You can\'t delete this profile' => 'Vous ne pouvez pas supprimer ce profil',
'You don\'t need to use commas or other punctuations.' => 'Il n\'est pas nécessaire d\'utiliser d\'apostrophe ou autre ponctuation.',
'Your current IP address is %ip' => 'Votre adresse IP courante est %ip',
'Zip code' => 'Code postal',
'Zones' => 'Zones',

View File

@@ -3,17 +3,19 @@
return array(
'%nb Item' => '%nb produit',
'%nb Items' => '%nb produits',
'+' => '+',
'+ View All' => '+ Voir tout',
'404' => '404',
'<strong>Sorry!</strong> We are not able to give you a delivery method for your order.' => '<strong>Désolé !</strong> Nous n\'avons aucune méthode de livraison pour votre commande.',
'A summary of your order email has been sent to the following address' => 'Un récapitulatif de commande vows a été envoyé par e-mail à l\'adresse suivante : ',
'Account' => 'Mon compte',
'Add a new address' => 'Ajouter une nouvelle adresse',
'Add to cart' => 'Ajouter au panier',
'Additional Info' => 'Informations complémentaires',
'Address' => 'Adresse',
'Address %nb' => 'Adresse n°',
'Address Update' => 'Mise à jour de l\'adresse',
'Address' => 'Adresse',
'Address Line 2'=>'Complément d\'adresse',
'All rights reserved.' => 'Tout droits réservés.',
'Amount' => 'Montant',
'Availability' => 'Disponibilité',
'Available' => 'Disponible',
@@ -23,102 +25,95 @@ return array(
'Cancel' => 'Annuler',
'Cart' => 'Panier',
'Categories' => 'Catégories',
'Cellphone'=> 'Portable',
'Change Password' => 'Modifier mon mot de passe',
'Change address' => 'Changer d\'adresse',
'Change my account information' => 'Modifier mes informations personnelles',
'Change my password' => 'Changer mon mot de passe',
'Change Password' => 'Modifier mon mot de passe',
'Check my order' => 'Vérifier ma commmande',
'Checkout' => 'Payer',
'Choose your delivery address' => 'Choisissez une adresse de livraison',
'Choose your delivery method' => 'Choisissez votre moyen de livraison',
'Choose your payment method' => 'Choisissez voter moyen de paiement',
'Code :' => 'Code',
'Company Name'=>'Entreprise',
'Complementary address' => 'Résidence secondaire',
'Contact Us' => 'Contactez-nous',
'Continue Shopping' => 'Continuer mes achats',
'Copyright' => 'Copyright',
'Coupon code' => 'Code promo',
'Create' => 'Créer',
'Create New Account' => 'Créer un nouveau compte',
'Create New Address' => 'Créer une nouvelle adresse',
'Create' => 'Créer',
'Currency:' => 'Monnaie',
'Currency' => 'Devise',
'Currency:' => 'Devise',
'Date' => 'Date',
'Delete address' => 'Supprimer cette adresse',
'Delivery address' => 'Adresse de livraison',
'Delivery Information' => 'Informations de livraison',
'Delivery address' => 'Adresse de livraison',
'Demo product description' => 'Exemple de description de produit',
'Demo product title' => 'Exemple de titre',
'Description' => 'Description',
'Do you have an account?' => 'Avez-vous déjà un compte ?',
'Do you really want to delete this address ?' => 'Voulez-vous vraiment supprimer cette adresse ?',
'Edit this address' => 'Editer cette adresse',
'Edit' => 'Editer',
'Edit this address' => 'Editer cette adresse',
'Email address' => 'Adresse e-mail',
'Email Address' => 'Adresse e-mail',
'Email not displaying correctly?' => 'L\'e-mail ne s\'affiche pas correctement ?',
'Facebook' => 'Facebook',
'Follow us' => 'Suivez-nous',
'Follow us introduction' => 'Sur les réseaux :',
'Forgot your Password?' => 'Mot de passe oublié ?',
'Free shipping' => 'Livraison gratuite',
'Go home' => 'Retour à l\'accueil',
'Google+' => 'Google+',
'Grid' => 'Grille',
'Home address' => 'Résidence principale',
'Home' => 'Accueil',
'In Stock' => 'Disponible',
'instead of' => 'au lieu de',
'Item(s)' => 'Produit(s)',
'I would like to receive the newsletter or the latest news.' => 'Je veux m\'inscrire à la newsletter pour rester informé.',
'Instagram' => 'Instagram',
'Language' => 'Langue',
'Language:' => 'Langue',
'Latest' => 'Nouveautés',
'Latest articles' => 'Nouveaux articles',
'Latest products' => 'Derniers produits',
'Latest' => 'Nouveautés',
'List of orders' => 'Liste de mes commandes',
'List' => 'Liste',
'List of orders' => 'Liste de mes commandes',
'Log In!' => 'Se connecter',
'Log out!' => 'Se déconnecter',
'Login Information' => 'Informations de connexion',
'Login' => 'Connexion',
'Login Information' => 'Informations de connexion',
'Main Navigation' => 'Navigation principale',
'Minimum 2 characters.' => '2 caractères minimum.',
'missing or invalid data' => 'Information éronnée ou incomplète',
'Multi-payment platform' => 'Plateforme de paiement en ligne',// bizarre ?
'Multi-payment platform' => 'Plateforme de paiement en ligne',
'My Account' => 'Mon compte',
'My Address book' => 'Mon carnet d\'adresses',
'My Address Books' => 'Mes carnets d\'adresses',
'My order' => 'Ma commande',
'My Address book' => 'Mon carnet d\'adresses',
'My Orders' => 'Mes commandes',
'My order' => 'Ma commande',
'Name' => 'Nom',
'Name ascending' => 'Nom croissant',
'Name descending' => 'Nom décroissant',
'Name' => 'Nom',
'Need help ?' => 'Besoin d\'aide? ',
'Newsletter Subscription' => 'Inscription à la newsletter',
'Newsletter' => 'Newsletter',
'Next product' => 'Produits suivants',
'Newsletter Subscription' => 'Inscription à la newsletter',
'Next' => 'Suivant',
'Next Step' => 'Etape suivante',
'Next' => 'Suivant',
'Next' => 'Suivant',
'Next product' => 'Produits suivants',
'No Content in this folder.' => 'Aucun contenu dans ce dossier.',
'No articles currently' => 'Actuellement aucun article',
'No, I am a new customer.' => 'Non, je suis un nouveau client.',
'No products available in this category' => 'Aucun produit dans cette catégorie.',
'No results found' => 'Aucun résultat',
'No' => 'Non',
'No.' => 'N°',
'Offers' => 'Promotions',
'Ok' => 'Ok',
'Order details' => 'Détail de commande',
'Order number' => 'Commande numéro',
'Orders over $50' => 'Commandes supérieures à 50€',//ne devrait-on pas mettre une variable ici?
'Out of stock' => 'Indisponible',
'Orders over $50' => 'Commandes supérieures à 50€',
'Our mailing address is:' => 'Notre adresse mail est :',
'Out of Stock' => 'Hors stock',
'Pagination' => 'Pagination',
'Password Forgotten' => 'Mot de passe oublié',
'Password' => 'Mot de passe',
'Password confirmation'=>"Confirmer le mot de passe",
'per page' => 'par page',
'Password Forgotten' => 'Mot de passe oublié',
'Personal Information' => 'Informations personnelles',
'Placeholder address label' => 'Maison, Domicile, Travail...',
'Placeholder address1' => 'Adresse',
'Placeholder address2' => '',
'Placeholder address2' => 'Adresse suite',
'Placeholder cellphone' => 'Portable',
'Placeholder city' => 'Ville',
'Placeholder company' => 'Compagnie',
@@ -131,46 +126,43 @@ return array(
'Placeholder lastname' => 'Nom de famille',
'Placeholder phone' => 'Téléphone',
'Placeholder zipcode' => 'Code postal',
'Please enter your email address' => 'Veuillez saisir votre adresse e-mail',
'Please enter your email address below.' => 'Veuillez saisir votre adresse e-mail ci-dessous.',
'Position' => 'Position',
'Previous product' => 'Produits précédents',
'Previous' => 'Précédent',
'Previous product' => 'Produits précédents',
'Price' => 'Prix',
'Price ascending' => 'Prix croissant',
'Price descending' => 'Prix décroissant',
'Price' => 'Prix',
'Proceed checkout' => 'Payer',
'Product Empty Button' => 'Ajouter mon premier produit',
'Product Empty Message' => 'C\'est très simple d\'ajouter un produit dans l\'adminsitration.
<ol>
<li>N\'oubliez pas de sélectionner <strong>NEW</strong> dans l\'onglet Details afin de voir votre produit dans la section des nouveautés.</li>
<li>N\'oubliez pas de sélectionner <strong>SALE</strong> dans l\'onglet Details afin de voir votre produit dans la section des promotions.</li>
</ol>',
'Product Empty Message' => 'C\'est très simple d\'ajouter un produit dans l\'administration. <ol> <li>N\'oubliez pas de sélectionner <strong>NEW</strong> dans l\'onglet Details afin de voir votre produit dans la section des nouveautés.</li> <li>N\'oubliez pas de sélectionner <strong>SALE</strong> dans l\'onglet Details afin de voir votre produit dans la section des promotions.</li> </ol>',
'Product Empty Title' => 'Bonjour',
'Product Name' => 'Nom du produit',
'Product Offers' => 'Produits en promotion',
'products' => 'produits',
'Qty' => 'Qté',
'Quantity' => 'Quantité',
'Questions ? See or F.A.Q.' => 'Des questions ? Voir la F.A.Q.', // bizarre le 'see or '
'Questions ? See or F.A.Q.' => 'Des questions ? Voir la F.A.Q.',
'RSS' => 'RSS',
'Rating' => 'Avis',
'Ref.' => '',
'Register!' => 'S\'inscrire !',
'Ref.' => 'Ref.',
'Register' => 'S\'inscrire',
'Register!' => 'S\'inscrire !',
'Regular Price:' => 'Prix :',
'Related' => 'Liés', // voir le contexte pour l'accord
'Remove this address' => 'Supprimer cette adresse',
'Related' => 'Liés',
'Remove' => 'Supprimer',
'Search a product' => 'Chercher un produit',
'Search Result for' => 'Résultat de recherche pour',
'Remove this address' => 'Supprimer cette adresse',
'SELECT YOUR CURRENCY' => 'Sélectionnez votre devise',
'SELECT YOUR LANGUAGE' => 'Sélectionnez votre langue',
'Search' => 'Recherche',
'Search Result for' => 'Résultat de recherche pour',
'Search a product' => 'Chercher un produit',
'Search...' => 'Recherche…',
'Secure payment' => 'Paiement sécurisé',
'Secure Payment' => 'Paiement sécurisé',
'Secure payment' => 'Paiement sécurisé',
'Select Country' => 'Choisissez un pays',
'Select Title' => 'Civilité',
'Send us a message' => 'Envoyer nous un message',
'Send' => 'Envoyer',
'Send us a message' => 'Envoyer nous un message',
'Shipping Tax' => 'Frais de livraison',
'Show' => 'Voir',
'Sign In' => 'Se connecter',
@@ -179,32 +171,31 @@ return array(
'Sort By' => 'Trier par',
'Special Price:' => 'Prix en promotion :',
'Status' => 'Etat',
'Street Address'=>"Adresse",
'Subscribe' => 'Inscription',
'Tax Inclusive' => 'TVA incluse',
'Thank you for the trust you place in us.' => 'Merci pour votre confiance. ',
'Thanks !' => 'Merci !',
'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.' => '',
'Thanks for your message, we will contact as soon as possible.' => '',
'The page cannot be found' => '',
'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.' => 'Merci de votre inscription ! Nous vous tiendrons informé dès qu\'il y aura des nouveautés.',
'Thanks for your message, we will contact as soon as possible.' => 'Merci de votre message, nous vous contacterons dès que possible.',
'The page cannot be found' => 'La page ne peut pas être trouvée',
'Thelia V2' => 'Thelia v2',
'Toggle navigation' => 'Navigation alternative',
'Total' => 'Total',
'TTC' => 'TTC',
'Twitter' => 'Twitter',
'Unit Price' => 'Prix unitaire',
'Update Profile' => 'Mettre à jour votre profil',
'Update' => 'Mettre à jour',
'Update Profile' => 'Mettre à jour votre profil',
'Update Quantity' => 'Mettre à jour la quantité',
'Upsell Products' => 'Nous vous proposons également',
'Useful links' => 'Liens utiles',
'View' => 'Voir',
'View Cart' => 'Voir mon panier',
'View all' => ' Voir tout',
'View as' => 'Voir en tant que ',
'View Cart' => 'Voir mon panier',
'View it in your browser' => 'Visualiser le dans votre navigateur.',
'View order %ref as pdf document' => 'Ouvrir la commande %ref dans un pdf',
'View product' => 'Voir le produit',
'View' => 'Voir',
'Warning' => 'Attention',
'Yes' => 'Oui',
'Yes, I have a password :' => 'Oui, j\'ai déjà un mot de passe',
'Welcome to Thelia. This is a demo site built with Thelia V2 an E-Commerce solution based on Symfony 2.' => 'Bienvenue sur cette boutique Thelia. ce site est une version demo motorisée par la solution e-commerce Thelia v2 basée sur symfony 2.',
'You are here:' => 'Vous êtes ici :',
'You choose to pay by' => 'Vous avez choisi de payer par',
'You don\'t have orders yet.' => 'Vous n\'avez pas encore de commande.',
@@ -215,4 +206,8 @@ return array(
'Your Cart' => 'Votre panier',
'Your email address' => 'Votre adresse e-mail',
'Your order will be confirmed by us upon receipt of your payment.' => 'Votre commande sera confirmée à réception de votre pavement.',
'Youtube' => 'Youtube',
'instead of' => 'au lieu de',
'missing or invalid data' => 'Information éronnée ou incomplète',
'per page' => 'par page',
);