Merge pull request #413 from roadster31/coupon-types

Coupon types
This commit is contained in:
Manuel Raynaud
2014-05-19 10:50:53 +02:00
126 changed files with 19922 additions and 463 deletions

View File

@@ -61,6 +61,7 @@ return array(
'Amount' => 'Amount',
'An error occured' => 'An error occured',
'And' => 'And',
'Applies to products in categories :' => 'Applies to products in categories :',
'Apply' => 'Apply',
'Associated countries' => 'Associated countries',
'Associations' => 'Associations',
@@ -210,6 +211,7 @@ return array(
'Customer' => 'Customer',
'Customer export' => 'Customer export',
'Customer informations' => 'Customer information',
'Customer is' => 'Customer is',
'Customers' => 'Customers',
'Customers list' => 'Customers list',
'Cutomer Name' => 'Cutomer Name',
@@ -218,6 +220,7 @@ return array(
'Date of last order' => 'Date of last order',
'Days before expiration' => 'Days before expiration',
'Deactivate %title module' => 'Deactivate %title module',
'Decimal places' => 'Decimal places',
'Default' => 'Default',
'Default address' => 'Default address',
'Define here this product\'s accessories' => 'Define here this product\'s accessories',
@@ -281,6 +284,7 @@ return array(
'Details' => 'Details',
'Disabled' => 'Disabled',
'Discount' => 'Discount',
'Discount amount' => 'Discount amount',
'Do not use a product template' => 'Do not use a product template',
'Do you really want to add this attribute to all product templates ?' => 'Do you really want to add this attribute to all product templates ?',
'Do you really want to add this feature to all product templates ?' => 'Do you really want to add this feature to all product templates ?',
@@ -492,6 +496,8 @@ return array(
'Folders in %fold' => 'Folders in %fold',
'Format: %fmt' => 'Format: %fmt ',
'Format: %fmt, e.g. %date' => 'Format: %fmt, e.g. %date',
'Free shipping for methods :' => 'Free shipping for methods :',
'Free shipping to countries :' => 'Free shipping to countries :',
'French 19.6% VAT is a tax which add a 19.6% tax to the product price.' => 'French 19.6% VAT is a tax which add a 19.6% tax to the product price.',
'French 19.6% VAT with ecotax is the applicance of the ecotax (on the product price) then the applicance of the 19.6% tax (on the product price + the ecotax amount).' => 'French 19.6% VAT with ecotax is the applicance of the ecotax (on the product price) then the applicance of the 19.6% tax (on the product price + the ecotax amount).',
'From' => 'From',
@@ -570,7 +576,7 @@ return array(
'Manage resource rights' => 'Manage resource rights',
'Manage taxes' => 'Manage taxes',
'Manage the tax rule taxes appliance order' => 'Manage the tax rule taxes appliance order',
'Maximum usage count :' => 'Maximum usage count :',
'Maximum usage count :' => 'Number of usages left:',
'Message created on %date_create. Last modification: %date_change' => 'Message created on %date_create. Last modification: %date_change',
'Message level' => 'Message level',
'Messages which have a level greater or equal to the selected level will be added to the log destinations. ' => 'Messages which have a level greater or equal to the selected level will be added to the log destinations. ',
@@ -682,6 +688,7 @@ return array(
'Product title' => 'Product title',
'Product weight' => 'Product weight',
'Products' => 'Products',
'Products are :' => 'Products are :',
'Products in %cat' => 'Products in %cat',
'Profil' => 'Profile',
'Profile' => 'Profile',
@@ -760,6 +767,8 @@ return array(
'Send files' => 'Send files',
'Sequential number of log line' => 'Sequential number of log line',
'Set as default tax rule' => 'Set as default tax rule',
'Sets the separator for the decimal point' => 'Sets the separator for the decimal point',
'Sets the thousands separator.' => 'Sets the thousands separator.',
'Shipping configuration' => 'Shipping configuration',
'Shipping configuration of delivery module "%title"' => 'Shipping configuration of delivery module "%title"',
'Shipping zone' => 'Shipping zone',
@@ -826,7 +835,10 @@ return array(
'The mailing template in text-only format.' => 'The mailing template in text-only format.',
'The page you\'ve requested was not found. Please check the page address, and try again.' => 'The page you\'ve requested was not found. Please check the page address, and try again.',
'The rate from Euro (Price in Euro * rate = Price in this currency)' => 'The rate from Euro (Price in Euro * rate = Price in this currency)',
'The selected categories :' => 'The selected categories :',
'The selected countries :' => 'Les pays sélectionnés :',
'The selected customer :' => 'The selected customer :',
'The selected products :' => 'The selected products :',
'The server returned a "404 Not Found"' => 'The server returned a "404 Not Found"',
'The symbol, such as $, £, €...' => 'The symbol, such as $, £, €...',
'The syntax used is identical to the PHP <a href="http://www.php.net/date" target="_other">date()</a> function' => 'The syntax used is identical to the PHP <a href="http://www.php.net/date" target="_other">date()</a> function',
@@ -919,9 +931,12 @@ return array(
'Update rates' => 'Update rates',
'Update tax rule taxes' => 'Update tax rule taxes',
'Update this image' => 'Update this image',
'Usage count' => 'Usage count',
'Usage count' => 'Usages left',
'Usages left' => 'Usages left',
'Use Ctrl+click to select (or deselect) more that one category' => 'Use Ctrl+click to select (or deselect) more that one category',
'Use Ctrl+click to select (or deselect) more that one country' => 'Utiliser Ctrl+clic pour sélectionner (ou dé-sélectionner) plusieurs pays.',
'Use Ctrl+click to select (or deselect) more that one product' => 'Use Ctrl+click to select (or deselect) more that one product',
'Use Ctrl+click to select (or deselect) more that one shipping method' => 'Use Ctrl+click to select (or deselect) more that one shipping method',
'Use Ctrl+click to select more than one value. You can also <a href="#" class="clear_feature_value" data-id="%id">clear selected values</a>.' => 'Use Ctrl+click to select more than one value. You can also <a href="#" class="clear_feature_value" data-id="%id">clear selected values</a>.',
'Use HTML message defined below' => 'Use HTML message defined below',
'Use Text message defined below' => 'Use Text message defined below',
@@ -980,6 +995,7 @@ return array(
'deactivate' => 'deactivate',
'deactivation' => 'deactivation',
'delete image' => 'delete image',
'eg: . or ,' => 'eg: . or ,',
'en_US' => 'en_US',
'firstname & lastname' => 'firstname & lastname',
'hour in hh:mm:ss format' => 'hour in hh:mm:ss format',

View File

@@ -210,6 +210,7 @@ return array(
'Customer' => 'Client',
'Customer export' => 'Export client',
'Customer informations' => 'Informations client',
'Customer is' => 'Le client',
'Customers' => 'Clients',
'Customers list' => 'Liste des clients',
'Cutomer Name' => 'Nom du client',
@@ -218,6 +219,7 @@ return array(
'Date of last order' => 'Date de la dernière commande',
'Days before expiration' => 'Jours restants avant expiration',
'Deactivate %title module' => 'Désactiver le module %title',
'Decimal places' => 'Nombre de chiffres après la virgule',
'Default' => 'Défaut',
'Default address' => 'Adresse par défaut',
'Define here this product\'s accessories' => 'Choisir ici les accessoires pour ce produit',
@@ -490,7 +492,10 @@ return array(
'Folder title' => 'Titre du dossier',
'Folders' => 'Dossiers',
'Folders in %fold' => 'Dossier dans %fold',
'Format: %fmt' => 'Format: %fmt ',
'Format: %fmt, e.g. %date' => 'Format: %fmt, ex. %date ',
'Free shipping for methods :' => 'Livraison gratuite avec les modes de transport:',
'Free shipping to countries :' => 'Livraison gratuite vers les pays',
'French 19.6% VAT is a tax which add a 19.6% tax to the product price.' => 'La TVA française de 20% est une taxe qui ajoute 20% au prix du produit.',
'French 19.6% VAT with ecotax is the applicance of the ecotax (on the product price) then the applicance of the 19.6% tax (on the product price + the ecotax amount).' => 'La TVA française de 20% avec écotaxe est l\'application de l\'écotaxe (sur le prix du produit) puis l\'application de la taxe de20% (sur le prix du produit + le montant écotaxe).',
'From' => 'De',
@@ -633,6 +638,7 @@ return array(
'Period' => 'Période',
'Phone' => 'Téléphone',
'Phone number' => 'Numéro de téléphone',
'Please enter the date using the %fmt format' => 'Veuillez saisir la date en utilisdant le format %fmt',
'Please retry' => 'Merci de réessayer',
'Please save this coupon first to define coupon conditions' => 'Enregistrez ce nouveau code promo pour définir les conditions d\'utilisation',
'Please select a condition' => 'Choisissez une condition',
@@ -680,6 +686,7 @@ return array(
'Product title' => 'Titre du produit',
'Product weight' => 'Poids du produit',
'Products' => 'Produits',
'Products are :' => 'Les produits sont :',
'Products in %cat' => 'Produits dans %cat',
'Profil' => 'Profil',
'Profile' => 'Profil',
@@ -758,6 +765,8 @@ return array(
'Send files' => 'Envoyer des fichiers',
'Sequential number of log line' => 'Sequential number of log line',
'Set as default tax rule' => 'Configurer en tant que règle par défaut',
'Sets the separator for the decimal point' => 'Séparateur décimal',
'Sets the thousands separator.' => 'Séparateur de milliers',
'Shipping configuration' => 'Configuration du transport',
'Shipping configuration of delivery module "%title"' => 'Configuration des zones de livraison du module "%title" ',
'Shipping zone' => 'Zone de livraison',
@@ -773,6 +782,8 @@ return array(
'Short description :' => 'Description courte : ',
'Show logs' => 'Voir les logs',
'Some of your translations are not saved. Continue anyway ?' => 'Certaines des traductions ne sont pas sauvegardées. Souhaitez-vous continuer ?',
'Something goes wrong, please try again' => 'Une erreur s\'est produite, merci de ré-essayer.',
'Something goes wrong, please try again.' => 'Une erreur s\'est produite, merci de ré-essayer.',
'Sorry, attribute ID=%id was not found.' => 'Désolé, la déclinaison ID=%id n\'a pas été trouvé',
'Sorry, country ID=%id was not found.' => 'Désolé, le pays ID=%id n\'a pas été trouvé',
'Sorry, currency ID=%id was not found.' => 'Désolé, le devise ID=%id n\'a pas été trouvé',
@@ -822,6 +833,10 @@ return array(
'The mailing template in text-only format.' => 'Le template de mailing en format text-only.',
'The page you\'ve requested was not found. Please check the page address, and try again.' => 'La page désirée n\'existe pas. Merci de vérifier votre adresse et réessayer',
'The rate from Euro (Price in Euro * rate = Price in this currency)' => 'Le taux à partir de l\'Euro (Prix en Euro * taux = Prix dans la devise)',
'The selected categories :' => 'Dans les catégories sélectionnées :',
'The selected countries :' => 'Les propduits sélectionnés',
'The selected customer :' => 'Les clients sélectionnés',
'The selected products :' => 'Les produits sélectionnés',
'The server returned a "404 Not Found"' => 'Le serveur a retourné une erreur "404 Not Found"',
'The symbol, such as &#36;, £, &euro;...' => 'Symbole tel que $, £, €',
'The syntax used is identical to the PHP <a href="http://www.php.net/date" target="_other">date()</a> function' => 'La syntaxe utilisé est la même que la fonction <a href="http://www.php.net/date" target="_other">date()</a> de PHP',
@@ -836,7 +851,6 @@ return array(
'Thelia Shipping zones' => 'Zone de livraison de Thelia',
'Thelia System Variables' => 'Variables Thelia',
'Thelia caches flushing' => 'Vidage des caches Thelia',
'Thelia configuration' => 'Configuration thelia',
'Thelia contributions' => 'Contributions de Thelia',
'Thelia core' => 'Coeur de Thelia',
'Thelia informations' => 'Informations Thelia',
@@ -846,7 +860,6 @@ return array(
'Thelia product templates' => 'Gabarits de produit Thelia',
'Thelia support forum' => 'Forum de Thelia',
'Thelia system variables' => 'Variables Thelia',
'Thelia tools' => 'Outils Thelia',
'Thelia, the open source e-commerce solution' => 'Thelia, la solution e-commerce libre',
'There are no shipping zones attached to this module.' => 'Ce module de transport n\'est associé à aucune zone de livraison',
'There is currently no active module here.' => 'Il n\'y a aucun module actif ici',
@@ -918,6 +931,10 @@ return array(
'Update this image' => 'Modifier cette image',
'Usage count' => 'Nombre d\'utilisations',
'Usages left' => 'Utulisations restantes',
'Use Ctrl+click to select (or deselect) more that one category' => 'Ctrl+Clic permet de sélectionner ou dé-sélectionner plus d\'une catégorie',
'Use Ctrl+click to select (or deselect) more that one country' => 'Ctrl+Clic permet de sélectionner ou dé-sélectionner plus d\'un pays',
'Use Ctrl+click to select (or deselect) more that one product' => 'Ctrl+Clic permet de sélectionner ou dé-sélectionner plus d\'un produit',
'Use Ctrl+click to select (or deselect) more that one shipping method' => 'Ctrl+Clic permet de sélectionner ou dé-sélectionner plus d\'un mode de transport',
'Use Ctrl+click to select more than one value. You can also <a href="#" class="clear_feature_value" data-id="%id">clear selected values</a>.' => 'Utilisez Ctrl+clic pour choisir plus d\'une valeur. Vous pouvez aussi <a href="#" class="clear_feature_value" data-id="%id">tout désélectionner</a>.',
'Use HTML message defined below' => 'Utiliser le message HTML définie ci-dessous',
'Use Text message defined below' => 'Utiliser la version texte définie ci-dessous',
@@ -930,6 +947,7 @@ return array(
'Username :' => 'Nom d\'utilisateur : ',
'Using a domain or subdomain for each language' => 'Utiliser un domaine ou un sous domaine pour chaque langue',
'Valid on special offers' => 'Valide pour les offres spéciales',
'Validity start date' => 'Valable à partir de ',
'Value' => 'Valeur',
'Variable created on %date_create. Last modification: %date_change' => 'Variable créée le %date_create. Dernière modification: %date_change',
'Variable name' => 'Nom de la variable',
@@ -971,11 +989,11 @@ return array(
'company' => 'entreprise',
'customer ref' => 'référence client',
'd-m-Y' => 'd-m-Y',
'date form' => 'formulaire de date',
'date in yyyy-mm-dd format' => 'date in yyyy-mm-dd format',
'deactivate' => 'désactiver',
'deactivation' => 'désactivation',
'delete image' => 'Supprimer l\'image',
'eg: . or ,' => 'Par exemple . ou ,',
'en_US' => 'en_US',
'firstname & lastname' => 'Prénom & nom',
'hour in hh:mm:ss format' => 'hour in hh:mm:ss format',
@@ -988,7 +1006,6 @@ return array(
'short description' => 'description court',
'tax rules' => 'règles de taxe',
'taxes' => 'taxes',
'time form' => 'formulaire de temps',
'title' => 'titre',
'tracking reference' => 'Reference Tracking',
'uncheck all' => 'tout décocher',

View File

@@ -65,7 +65,7 @@
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="2">
<span class="help-block">{intl l='Sets the number of decimal points'}</span>
<span class="help-block">{intl l='Decimal places'}</span>
</div>
{/form_field}

View File

@@ -279,29 +279,36 @@ $(function($){
$.couponManager.onUsageUnlimitedChange = function() {
var $isUnlimited = $('#is-unlimited');
var $maxUsage = $('#max-usage');
if ($maxUsage.val() == -1) {
if ($('#max-usage').val() == -1) {
$isUnlimited.prop('checked', true);
$maxUsage.hide();
$('#max-usage-label').hide();
$('#max-usage-data').hide();
} else {
$isUnlimited.prop('checked', false);
$maxUsage.show();
$('#max-usage-label').show();
$('#max-usage-data').show();
}
$isUnlimited.change(function(){
var $this = $(this);
if ($this.is(':checked')) {
$('#max-usage').hide().val('-1');
$('#max-usage-label').hide();
if ($(this).is(':checked')) {
$('#max-usage-data').hide();
$('#max-usage').val('-1');
} else {
$('#max-usage').show().val('');
$('#max-usage-label').show();
$('#max-usage').val('');
$('#max-usage-data').show();
}
});
};
// Shipping conditions
$('#is-removing-postage').change(function(ev) {
if ($(this).is(':checked')) {
$('.free-postage-conditions').stop().slideDown();
}
else {
$('.free-postage-conditions').stop().slideUp();
}
})
$.couponManager.onUsageUnlimitedChange();
$('#is-removing-postage').change();
});

View File

@@ -6,7 +6,7 @@
<div class="form-group">
<label for="{$categories_field_name}-value">{intl l="The selected categories :"}</label>
<select required multiple size="5" class="form-control" id="{$categories_field_name}-value" name="{$categories_field_name}[value][]">
{loop type="category-tree" category=0 name="list-of-categories"}
{loop type="category-tree" category=0 name="list-of-categories" backend_context=1}
<option style="padding-left: {$LEVEL * 20}px" value="{$ID}" {if in_array($ID, $values)}selected="selected"{/if}>{$TITLE}</option>
{/loop}
</select>

View File

@@ -6,7 +6,7 @@
<div class="form-group">
<label for="{$products_field_name}-value">{intl l="The selected products :"}</label>
<select required multiple size="5" class="form-control" id="{$products_field_name}-value" name="{$products_field_name}[value][]">
{loop type="product" name="list-of-products" order="alpha"}
{loop type="product" name="list-of-products" order="alpha" backend_context=1}
<option value="{$ID}" {if in_array($ID, $values)}selected="selected"{/if}>{$TITLE}</option>
{/loop}
</select>

View File

@@ -6,7 +6,7 @@
<div class="form-group">
<label for="{$countries_field_name}-value">{intl l="The selected countries :"}</label>
<select required multiple size="5" class="form-control" id="{$countries_field_name}-value" name="{$countries_field_name}[value][]">
{loop type="country" name="list-of-countries" order="alpha"}
{loop type="country" name="list-of-countries" order="alpha" backend_context=1}
<option style="padding-left: {$LEVEL * 20}px" value="{$ID}" {if in_array($ID, $values)}selected="selected"{/if}>{$TITLE}</option>
{/loop}
</select>

View File

@@ -6,7 +6,7 @@
<div class="form-group">
<label for="{$customers_field_name}-value">{intl l="The selected customer :"}</label>
<select required multiple size="5" class="form-control" id="{$customers_field_name}-value" name="{$customers_field_name}[value][]">
{loop type="customer" name="list-of-customers" order="lastname,firstname" current="0" backend_context="1"}
{loop type="customer" name="list-of-customers" order="lastname,firstname" current="0" backend_context=1}
<option value="{$ID}" {if in_array($ID, $values)}selected="selected"{/if}>{$LASTNAME} {$FIRSTNAME} {$REF}</option>
{/loop}
</select>

View File

@@ -85,20 +85,11 @@
</div>
{/form_field}
{form_field form=$form field='isRemovingPostage'}
<div class="form-group {if $error}has-error{/if}">
<label for="is-removing-postage" class="checkbox control-label">
<input id="is-removing-postage" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
{if $error}{$message}{/if}
{intl l='Provides free shipping'}
</label>
</div>
{/form_field}
{form_field form=$form field='expirationDate'}
<div class="form-group {if $error}has-error{/if}">
<label for="expiration-date" class="control-label">{intl l='Expiration date * :'}</label>
<input required type="date" id="expiration-date" name="{$name}" class="form-control" value="{if $defaultDate}{$defaultDate}{else}{$value}{/if}" placeholder="{intl l='Format: %fmt, e.g. %date' fmt=$dateFormat date={$smarty.now|date_format:$dateFormat}}">
{* Do not use 'date' input type, as some browsers enforce RFC339 date formats, which is not what we want *}
<input required type="text" id="expiration-date" name="{$name}" class="form-control" value="{if $defaultDate}{$defaultDate}{else}{$value}{/if}" placeholder="{intl l='Format: %fmt, e.g. %date' fmt=$dateFormat date={$smarty.now|date_format:$dateFormat}}">
{if $error}{$message}{/if}
</div>
{/form_field}
@@ -110,12 +101,65 @@
<input id="is-unlimited" type="checkbox" name="is-unlimited" {if $value == '' || $value == -1}checked="checked"{/if}>
{intl l='Unlimited number of uses'}
</label>
<label id="max-usage-label" for="max-usage" class="control-label">{intl l='Maximum usage count :'}</label>
<input id="max-usage" type="text" class="form-control" name="{$name}" value="{if $value == ''}-1{else}{$value}{/if}" placeholder="{intl l='Usage count'}">
{if $error}{$message}{/if}
</div>
{/form_field}
<div class="well well-sm" id="max-usage-data">
{form_field form=$form field='maxUsage'}
<div class="form-group {if $error}has-error{/if}">
<label id="max-usage-label" for="max-usage" class="control-label">{intl l='Maximum usage count :'}</label>
<input id="max-usage" type="text" class="form-control" name="{$name}" value="{if $value == ''}-1{else}{$value}{/if}" placeholder="{intl l='Usage count'}">
{if $error}{$message}{/if}
</div>
{/form_field}
{form_field form=$form field='perCustomerUsageCount'}
<div class="form-group {if $error}has-error{/if}" style="margin-bottom: 0;">
{foreach $choices as $choice}
<label class="radio-inline">
<input type="radio" name="{$name}" value="{$choice->value}" {if $value == $choice->data}checked="checked"{/if}>
{$choice->label}
</label>
{/foreach}
</div>
{/form_field}
</div>
{form_field form=$form field='isRemovingPostage'}
<div class="form-group {if $error}has-error{/if}">
<label for="is-removing-postage" class="checkbox control-label">
<input id="is-removing-postage" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
{if $error}{$message}{/if}
{intl l='Provides free shipping'}
</label>
</div>
{/form_field}
<div class="free-postage-conditions well well-sm" " style="display: none">
{form_field form=$form field='freeShippingForCountries'}
<div class="form-group {if $error}has-error{/if}">
<label for="for-countries-only">{intl l="Free shipping to countries :"}</label>
<select multiple size="5" class="form-control" id="for-countries-only" name="{$name}">
{foreach $choices as $choice}
<option value="{$choice->value}" {if in_array($choice->value, $value)}selected="selected"{/if}>{$choice->label}</option>
{/foreach}
</select>
<span class="label-help-block">{intl l='Use Ctrl+click to select (or deselect) more that one country'}</span>
</div>
{/form_field}
{form_field form=$form field='freeShippingForModules'}
<div class="form-group {if $error}has-error{/if}" style="margin-bottom: 0;">
<label for="for-modules-only">{intl l="Free shipping for methods :"}</label>
<select multiple size="5" class="form-control" id="for-modules-only" name="{$name}">
{foreach $choices as $choice}
<option value="{$choice->value}" {if in_array($choice->value, $value)}selected="selected"{/if}>{$choice->label}</option>
{/foreach}
</select>
<span class="label-help-block">{intl l='Use Ctrl+click to select (or deselect) more that one shipping method'}</span>
</div>
{/form_field}
</div>
</div>
<div class="col-md-3">

View File

@@ -224,7 +224,7 @@
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="2">
<span class="help-block">{intl l='Sets the number of decimal points'}</span>
<span class="help-block">{intl l='Decimal places'}</span>
</div>
{/form_field}