diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index bb91f96b5..a03e40fab 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -16,13 +16,14 @@ - bMancone - bumbu - Burhan -- Cédric Mouleyre - Caleydon Media - cam.lafit - Captain FLAM - Captain-FLAM - ccauw +- Cédric Mouleyre - ChristopheBoucaut +- CINS - cippest - cmouleyre - Corentin Delcourt @@ -34,42 +35,50 @@ - David Gasperoni - Davy Rolink - djfm +- dlage - dMetzger - (d)oekia - Dragan Skrbic -- DrÿSs' - dreammeup - DrySs +- DrÿSs +- DrÿSs' - dSevere - Edouard Gaulué - emily-d - Fabio Chelly - fBrignoli - fram +- Francois Gaillard - François Gaillard +- Fran?s Gaillard - fSerny - Gabriel Schwardy - gBrunier - gCharmes - gPoulain +- gr4devel - Grégoire Bélorgey - Gregory Roussac - gRoussac - Guillaume DELOINCE +- ha99y - hAitmansour - Ha!*!*y - indesign47 - inem0o - ivancasasempere -- Jérôme Nadaud - jBreux +- jeckyl - jeromenadaud - Jerome Nadaud +- Jérôme Nadaud - jessylenne - jmCollin - jObregon - Jonathan Danse - joseantgv +- Julien - Kevin Granger - kpodemski - Krystian Podemski @@ -77,8 +86,11 @@ - lCherifi - ldecoker - lLefevre +- LOIC ROSSET ltd +- makk1ntosh - marcinsz101 - Marco Cervellin +- matiasiglesias - Mats Rynge - MatthieuB - Maxence @@ -101,32 +113,39 @@ - PhpMadman - Pierre - Piotr Kaczor -- Piotr Moćko +- Piotr Mocko - PrestaEdit - prestarocket +- Prestaspirit - pxls -- Rémi Gaillard - Raphaël Malié - raulgundin +- Rémi Gaillard - rGaillard - Rimas Kudelis - rMalie - rMontagne +- romainberger - root - runningz -- Sébastien -- Sébastien Bocahu +- sagaradonis - Samy Rabih - Sarah Lorenzini - Seb +- Sébastien +- Sébastien Bocahu - Seynaeve - Shagshag +- sjousse - sLorenzini +- smartdatasoft +- soufyan - soware - Staging - sThiebaut - Sylvain WITMEYER - tDidierjean +- unknown - vAugagneur - vChabot - Vincent Augagneur @@ -138,3 +157,5 @@ - Xavier - Xavier POITAU - Yoozio +- zimmi1 + diff --git a/admin-dev/index.php b/admin-dev/index.php index f5fcc246d..33da0908a 100644 --- a/admin-dev/index.php +++ b/admin-dev/index.php @@ -27,6 +27,9 @@ $timer_start = microtime(true); define('_PS_ADMIN_DIR_', getcwd()); +if (!defined('PS_ADMIN_DIR')) + define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); + require(_PS_ADMIN_DIR_.'/../config/config.inc.php'); require(_PS_ADMIN_DIR_.'/functions.php'); diff --git a/admin-dev/init.php b/admin-dev/init.php index 441433a2a..74e960149 100644 --- a/admin-dev/init.php +++ b/admin-dev/init.php @@ -49,9 +49,12 @@ try AdminTab::$currentIndex = $currentIndex; $iso = $context->language->iso_code; - include(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php'); - include(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php'); - include(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php'); + if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php')) + include(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php'); + if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php')) + include(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php'); + if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php')) + include(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php'); /* Server Params */ $protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl index b19611d31..9fe9b9030 100644 --- a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl @@ -40,7 +40,7 @@ {foreach from=$ranges key=r item=range} -   {$currency_sign} {/foreach} @@ -53,7 +53,7 @@ {if $smarty.foreach.ranges.first}   {else} - {/if} {/foreach} diff --git a/admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl index e2503c9a6..96908c212 100755 --- a/admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl @@ -58,7 +58,7 @@

{l s='Members of this customer group'}

-

{l s='Limited to the 100th first customers.'} {l s='Please use filters to narrow your search.'}

+

{l s='Limited to the first 100 customers.'} {l s='Please use filters to narrow your search.'}

{$customerList} -{/block} \ No newline at end of file +{/block} diff --git a/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl index c867b6c6d..09a50329f 100644 --- a/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl @@ -59,7 +59,7 @@ {if count($files_to_import)} {/if} @@ -67,20 +67,31 @@ Uplaod{l s='Upload'}
- {l s='Click to view our sample import csv files.'} - +
+ {l s='Click to view our sample import csv files.'} + +
+
+ {l s='Click to view your csv files.'} + +
 
@@ -108,12 +119,12 @@
- + {l s='e.g. '}"1;Ipod;129.90;5"
- + {l s='e.g. '}"Ipod;red.jpg,blue.jpg,green.jpg;129.90"
@@ -205,7 +216,7 @@ else { $(".import_supply_orders_details").hide(); - $('input[name=multiple_value_separator]').val(','); + $('input[name=multiple_value_separator]').val('{if isset($multiple_value_separator_selected)}{$multiple_value_separator_selected}{else},{/if}'); } if ($("#entity > option:selected").val() == 1) $("label[for=match_ref], #match_ref, label[for=regenerate], #regenerate").show(); diff --git a/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl index a7c20b5d8..97abf07a2 100644 --- a/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl @@ -25,7 +25,7 @@ {extends file="helpers/view/view.tpl"} {block name="override_tpl"} {if $add_permission eq '1'} {if isset($logged_on_addons)} @@ -63,8 +63,7 @@
- - +
diff --git a/admin-dev/themes/default/template/controllers/modules/list.tpl b/admin-dev/themes/default/template/controllers/modules/list.tpl index cef266630..8fcd8cabc 100644 --- a/admin-dev/themes/default/template/controllers/modules/list.tpl +++ b/admin-dev/themes/default/template/controllers/modules/list.tpl @@ -47,7 +47,7 @@
-

{$module->displayName} +

{$module->displayName}{$module->name} {if isset($module->type) && $module->type == 'addonsMustHave'} {l s='Must Have'} {else} @@ -77,7 +77,7 @@

{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else} {/if}

- {if isset($module->message) && (!isset($module->type) || ($module->type != 'addonsMustHave' || $module->type !== 'addonsNative'))}
{$module->message}
{/if} + {if isset($module->message) && (empty($module->name) === false) && (!isset($module->type) || ($module->type != 'addonsMustHave' || $module->type !== 'addonsNative'))}
{$module->message}
{/if}
{if !isset($module->not_on_disk)} {$module->optionsHtml} diff --git a/admin-dev/themes/default/template/controllers/orders/form.tpl b/admin-dev/themes/default/template/controllers/orders/form.tpl index c1fd0afff..34a5d7cec 100755 --- a/admin-dev/themes/default/template/controllers/orders/form.tpl +++ b/admin-dev/themes/default/template/controllers/orders/form.tpl @@ -38,6 +38,11 @@ var defaults_order_state = new Array(); var customization_errors = false; var pic_dir = '{$pic_dir}'; + var currency_format = 5; + var currency_sign = ''; + var currency_blank = false; + var priceDisplayPrecision = 2; + {foreach from=$defaults_order_state key='module' item='id_order_state'} defaults_order_state['{$module}'] = '{$id_order_state}'; {/foreach} @@ -505,7 +510,6 @@ } displaySummary(res); resetBind(); - updateCurrencySign(); } }); } @@ -652,11 +656,12 @@ var id_product = Number(this.id_product); var id_product_attribute = Number(this.id_product_attribute); cart_quantity[Number(this.id_product)+'_'+Number(this.id_product_attribute)+'_'+Number(this.id_customization)] = this.cart_quantity; - cart_content += ''+this.name+'
'+this.attributes_small+''+this.reference+' '; + cart_content += ''+this.name+'
'+this.attributes_small+''+this.reference+''; cart_content += (!this.id_customization ? '

' : ''); cart_content += (!this.id_customization ? '
' : ''); cart_content += (!this.id_customization ? '
' : ''); - cart_content += ''+this.total+' '; + cart_content += '' + formatCurrency(parseFloat(this.total.replace(',', '.')), currency_format, currency_sign, currency_blank) + ''; + if (this.id_customization && this.id_customization != 0) { $.each(this.customized_datas[this.id_product][this.id_product_attribute][id_address_delivery], function() { @@ -712,6 +717,11 @@ function displaySummary(jsonSummary) { + currency_format = jsonSummary.currency.format; + currency_sign = jsonSummary.currency.sign; + currency_blank = jsonSummary.currency.blank; + priceDisplayPrecision = jsonSummary.currency.decimals ? 2 : 0; + updateCartProducts(jsonSummary.summary.products, jsonSummary.summary.gift_products, jsonSummary.cart.id_address_delivery); updateCartVouchers(jsonSummary.summary.discounts); updateAddressesList(jsonSummary.addresses, jsonSummary.cart.id_address_delivery, jsonSummary.cart.id_address_invoice); @@ -737,20 +747,19 @@ $('#free_shipping').removeAttr('checked'); $('#gift_message').html(jsonSummary.cart.gift_message); - if(!changed_shipping_price) - $('#shipping_price').html(''+jsonSummary.summary.total_shipping+''); + if (!changed_shipping_price) + $('#shipping_price').html('' + formatCurrency(parseFloat(jsonSummary.summary.total_shipping), currency_format, currency_sign, currency_blank) + ''); shipping_price_selected_carrier = jsonSummary.summary.total_shipping; - - $('#total_vouchers').html(jsonSummary.summary.total_discounts_tax_exc); - $('#total_shipping').html(jsonSummary.summary.total_shipping_tax_exc); - $('#total_taxes').html(jsonSummary.summary.total_tax); - $('#total_without_taxes').html(jsonSummary.summary.total_price_without_tax); - $('#total_with_taxes').html(jsonSummary.summary.total_price); - $('#total_products').html(jsonSummary.summary.total_products); + + $('#total_vouchers').html(formatCurrency(parseFloat(jsonSummary.summary.total_discounts_tax_exc.replace(',', '.')), currency_format, currency_sign, currency_blank)); + $('#total_shipping').html(formatCurrency(parseFloat(jsonSummary.summary.total_shipping_tax_exc.replace(',', '.')), currency_format, currency_sign, currency_blank)); + $('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax.replace(',', '.')), currency_format, currency_sign, currency_blank)); + $('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price_without_tax.replace(',', '.')), currency_format, currency_sign, currency_blank)); + $('#total_with_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price.replace(',', '.')), currency_format, currency_sign, currency_blank)); + $('#total_products').html(formatCurrency(parseFloat(jsonSummary.summary.total_products.replace(',', '.')), currency_format, currency_sign, currency_blank)); id_currency = jsonSummary.cart.id_currency; $('#id_currency option').removeAttr('selected'); $('#id_currency option[value="'+id_currency+'"]').attr('selected', true); - updateCurrencySign(); id_lang = jsonSummary.cart.id_lang; $('#id_lang option').removeAttr('selected'); $('#id_lang option[value="'+id_lang+'"]').attr('selected', true); @@ -778,21 +787,21 @@ qty: qty, id_customer: id_customer, id_cart: id_cart, - }, + }, success : function(res) { - displaySummary(res); - var errors = ''; - if(res.errors.length) - { - $.each(res.errors, function() { - errors += this+'
'; - }); - $('#products_err').show(); - } - else - $('#products_err').hide(); - $('#products_err').html(errors); + displaySummary(res); + var errors = ''; + if (res.errors.length) + { + $.each(res.errors, function() { + errors += this + '
'; + }); + $('#products_err').show(); + } + else + $('#products_err').hide(); + $('#products_err').html(errors); } }); } @@ -888,11 +897,6 @@ }); } - function updateCurrencySign() - { - $('.currency_sign').html(currencies[id_currency]); - } - function sendMailToCustomer() { $.ajax({ @@ -1008,7 +1012,7 @@
-

{l s='Search a customer by tapping the first letters of his/her name'}

+

{l s='Search a customer by typing the first letters of his/her name'}

{l s='Add new customer'} @@ -1023,7 +1027,7 @@
-

{l s='Search a product by tapping the first letters of his/her name.'}

+

{l s='Search a product by typing the first letters of his/her name.'}

@@ -1208,7 +1212,7 @@

-    +

@@ -1232,12 +1236,12 @@

    -
  • {l s='Total products'}
  • -
  • {l s='Total vouchers'}
  • -
  • {l s='Total shipping'}
  • -
  • {l s='Total taxes'}
  • -
  • {l s='Total without taxes'}
  • -
  • {l s='Total with taxes'}
  • +
  • {l s='Total products'}
  • +
  • {l s='Total vouchers'}
  • +
  • {l s='Total shipping'}
  • +
  • {l s='Total taxes'}
  • +
  • {l s='Total without taxes'}
  • +
  • {l s='Total with taxes'}
diff --git a/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl index 5e8d4e00d..98e1aeda6 100755 --- a/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl @@ -41,7 +41,7 @@
- +
{/if} {/block} diff --git a/admin-dev/themes/default/template/helpers/form/form.tpl b/admin-dev/themes/default/template/helpers/form/form.tpl index ed77b5c40..8543ee688 100644 --- a/admin-dev/themes/default/template/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/helpers/form/form.tpl @@ -192,7 +192,7 @@ {/if} {elseif $input.type == 'radio'} {foreach $input.values as $value} -