Merge branch 'release' into development
This commit is contained in:
@@ -24,18 +24,6 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
/* Send the proper status code in HTTP headers */
|
||||
header('HTTP/1.1 404 Not Found');
|
||||
header('Status: 404 Not Found');
|
||||
|
||||
if (in_array(substr($_SERVER['REQUEST_URI'], -3), array('png', 'jpg', 'gif')))
|
||||
{
|
||||
require_once(dirname(__FILE__).'/config/settings.inc.php');
|
||||
header('Location: '.__PS_BASE_URI__.'img/404.gif');
|
||||
exit;
|
||||
}
|
||||
elseif (in_array(substr($_SERVER['REQUEST_URI'], -3), array('.js', 'css')))
|
||||
die('');
|
||||
|
||||
require_once(dirname(__FILE__).'/config/config.inc.php');
|
||||
Tools::displayFileAsDeprecated();
|
||||
Controller::getController('PageNotFoundController')->run();
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
*/
|
||||
|
||||
define('_PS_ADMIN_DIR_', getcwd());
|
||||
require(dirname(__FILE__).'/../config/config.inc.php');
|
||||
require(dirname(__FILE__).'/functions.php');
|
||||
require(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||
require(_PS_ADMIN_DIR_.'/functions.php');
|
||||
|
||||
// For retrocompatibility with "tab" parameter
|
||||
if (!isset($_GET['controller']) && isset($_GET['tab']))
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
define('_PS_ADMIN_DIR_', getcwd());
|
||||
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||
/* Getting cookie or logout */
|
||||
require_once(dirname(__FILE__).'/init.php');
|
||||
require_once(_PS_ADMIN_DIR_.'/init.php');
|
||||
|
||||
$context = Context::getContext();
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
define('_PS_ADMIN_DIR_', getcwd());
|
||||
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||
/* Getting cookie or logout */
|
||||
require_once(dirname(__FILE__).'/init.php');
|
||||
require_once(_PS_ADMIN_DIR_.'/init.php');
|
||||
|
||||
$query = Tools::getValue('q', false);
|
||||
if (!$query OR $query == '' OR strlen($query) < 1)
|
||||
|
||||
@@ -33,15 +33,15 @@ if (!Context::getContext()->employee->isLoggedBack())
|
||||
$tabAccess = Profile::getProfileAccess(Context::getContext()->employee->id_profile, Tab::getIdFromClassName('AdminBackup'));
|
||||
|
||||
if ($tabAccess['view'] !== '1')
|
||||
die (Tools::displayError('You do not have permission to view here'));
|
||||
die (Tools::displayError('You do not have permission to view this.'));
|
||||
|
||||
$backupdir = realpath(_PS_ADMIN_DIR_ . '/backups/');
|
||||
|
||||
if ($backupdir === false)
|
||||
die (Tools::displayError('"Backup" directory does not exist.'));
|
||||
die (Tools::displayError('A "Backup" directory does not exist.'));
|
||||
|
||||
if (!$backupfile = Tools::getValue('filename'))
|
||||
die (Tools::displayError('No file specified'));
|
||||
die (Tools::displayError('No file has been specified.'));
|
||||
|
||||
// Check the realpath so we can validate the backup file is under the backup directory
|
||||
$backupfile = realpath($backupdir.'/'.$backupfile);
|
||||
@@ -58,7 +58,7 @@ else
|
||||
$fp = @fopen($backupfile, 'r');
|
||||
|
||||
if ($fp === false)
|
||||
die (Tools::displayError('Unable to open backup file').' "'.addslashes($backupfile).'"');
|
||||
die (Tools::displayError('Unable to open backup file(s).').' "'.addslashes($backupfile).'"');
|
||||
|
||||
// Add the correct headers, this forces the file is saved
|
||||
header('Content-Type: '.$contentType);
|
||||
@@ -70,4 +70,4 @@ $ret = @fpassthru($fp);
|
||||
fclose($fp);
|
||||
|
||||
if ($ret === false)
|
||||
die (Tools::displayError('Unable to display backup file').' "'.addslashes($backupfile).'"');
|
||||
die (Tools::displayError('Unable to display backup file(s).').' "'.addslashes($backupfile).'"');
|
||||
@@ -25,8 +25,8 @@
|
||||
*/
|
||||
|
||||
define('_PS_ADMIN_DIR_', getcwd());
|
||||
require_once(dirname(__FILE__).'/../config/config.inc.php');
|
||||
require_once(dirname(__FILE__).'/init.php');
|
||||
require_once(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||
require_once(_PS_ADMIN_DIR_.'/init.php');
|
||||
|
||||
if (isset($_GET['img']) AND Validate::isMd5($_GET['img']) AND isset($_GET['name']) AND Validate::isGenericName($_GET['name']) AND file_exists(_PS_UPLOAD_DIR_.$_GET['img']))
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
define('_PS_ADMIN_DIR_', getcwd());
|
||||
include_once(dirname(__FILE__).'/../config/config.inc.php');
|
||||
include_once(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||
|
||||
$module = Tools::getValue('module');
|
||||
$render = Tools::getValue('render');
|
||||
|
||||
@@ -250,7 +250,7 @@ function checkingTab($tab)
|
||||
{
|
||||
if (isset(AdminTab::$tabParenting[$tab]))
|
||||
Tools::redirectAdmin('?tab='.AdminTab::$tabParenting[$tab].'&token='.Tools::getAdminTokenLite(AdminTab::$tabParenting[$tab]));
|
||||
echo sprintf(Tools::displayError('Page %s cannot be found.'),$tab);
|
||||
echo sprintf(Tools::displayError('Page %s cannot be found..'),$tab);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@
|
||||
*/
|
||||
|
||||
define('_PS_ADMIN_DIR_', getcwd());
|
||||
require(dirname(dirname(__FILE__)).'/config/config.inc.php');
|
||||
require(_PS_ADMIN_DIR_.'/config/config.inc.php');
|
||||
Controller::getController('GetFileController')->run();
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
define('_PS_ADMIN_DIR_', getcwd());
|
||||
include_once(dirname(__FILE__).'/../config/config.inc.php');
|
||||
include_once(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||
|
||||
$module = Tools::getValue('module');
|
||||
$render = Tools::getValue('render');
|
||||
|
||||
+2
-2
@@ -27,8 +27,8 @@
|
||||
$timer_start = microtime(true);
|
||||
define('_PS_ADMIN_DIR_', getcwd());
|
||||
|
||||
require(dirname(__FILE__).'/../config/config.inc.php');
|
||||
require(dirname(__FILE__).'/functions.php');
|
||||
require(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||
require(_PS_ADMIN_DIR_.'/functions.php');
|
||||
|
||||
//small test to clear cache after upgrade
|
||||
if (Configuration::get('PS_UPGRADE_CLEAR_CACHE'))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
define('_PS_ADMIN_DIR_', getcwd());
|
||||
include(dirname(__FILE__).'/../config/config.inc.php');
|
||||
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||
Context::getContext()->shop->setContext(Shop::CONTEXT_ALL);
|
||||
|
||||
if (substr(_COOKIE_KEY_, 34, 8) != Tools::getValue('token'))
|
||||
|
||||
@@ -199,7 +199,7 @@ a.module_toggle_all{color: #268CCD;}
|
||||
|
||||
/*toolbarBox*/
|
||||
.toolbar-placeholder {position:relative}
|
||||
.toolbarBox {background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 5px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;-o-border-radius:3px;position:relative;width: auto !important;}
|
||||
.toolbarBox {background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 5px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;-o-border-radius:3px;position:relative}
|
||||
.toolbarBox .pageTitle { margin-left:10px; line-height:48px}
|
||||
.toolbarBox .pageTitle h3 {font-size: 1.6em; font-weight: normal; line-height: 52px; margin: 0; padding: 0; text-shadow:0 1px 0 #fff;}
|
||||
.toolbarBox ul.cc_button {float:right;margin:0 5px 0 0;padding:0;}
|
||||
@@ -243,7 +243,7 @@ a.module_toggle_all{color: #268CCD;}
|
||||
.toolbarReduced {margin-right:221px}
|
||||
#modules_list_button {width:211px;height:63px;border:none;position:absolute;top:0;right:0;background-image:url('../img/modules_list_button.png');font-size: 1.6em;cursor:pointer;padding-left:45px}
|
||||
|
||||
#modules_list_container {
|
||||
.toolbarBox #modules_list_container {
|
||||
background: none repeat scroll 0 0 #FFF;
|
||||
border: solid 1px #CCC;
|
||||
display: block;
|
||||
@@ -252,7 +252,7 @@ a.module_toggle_all{color: #268CCD;}
|
||||
width: 300px;
|
||||
position: absolute;
|
||||
right: 13px;
|
||||
top: 83px;
|
||||
top: 63px;
|
||||
z-index: 100;
|
||||
padding: 10px;
|
||||
box-shadow: 1px 5px 5px #CCCCCC;
|
||||
@@ -261,29 +261,29 @@ a.module_toggle_all{color: #268CCD;}
|
||||
opacity: 1;
|
||||
|
||||
}
|
||||
#modules_list_container #modules_list_container_content
|
||||
.toolbarBox #modules_list_container #modules_list_container_content
|
||||
{
|
||||
max-height: 500px;
|
||||
overflow: auto;
|
||||
|
||||
}
|
||||
|
||||
#modules_list_container #modules_list_container_tab {margin-top: 10px;width: auto;height: auto; }
|
||||
#modules_list_container #modules_list_container_tab table {width: 100%;border-spacing: 0px; }
|
||||
#modules_list_container #modules_list_container_tab tr { height: auto}
|
||||
#modules_list_container #modules_list_container_tab tr.rowalt {background-color: #EEE}
|
||||
#modules_list_container #modules_list_container_tab #tab_module_switch {margin-bottom: 10px;}
|
||||
#modules_list_container #modules_list_loader {margin-top: 10px}
|
||||
#modules_list_container .nav-tabs-modules:after {clear:both}
|
||||
#modules_list_container .nav-tabs-modules > li {height: 19px;float:left}
|
||||
#modules_list_container .nav-tabs-modules > li > a {
|
||||
.toolbarBox #modules_list_container #modules_list_container_tab {margin-top: 10px;width: auto;height: auto; }
|
||||
.toolbarBox #modules_list_container #modules_list_container_tab table {width: 100%;border-spacing: 0px; }
|
||||
.toolbarBox #modules_list_container #modules_list_container_tab tr { height: auto}
|
||||
.toolbarBox #modules_list_container #modules_list_container_tab tr.rowalt {background-color: #EEE}
|
||||
.toolbarBox #modules_list_container #modules_list_container_tab #tab_module_switch {margin-bottom: 10px;}
|
||||
.toolbarBox #modules_list_container #modules_list_loader {margin-top: 10px}
|
||||
.toolbarBox #modules_list_container .nav-tabs-modules:after {clear: both;}
|
||||
.toolbarBox #modules_list_container .nav-tabs-modules > li {height: 19px;}
|
||||
.toolbarBox #modules_list_container .nav-tabs-modules > li > a {
|
||||
padding-right: 12px;
|
||||
padding-left: 12px;
|
||||
margin-right: 2px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
#modules_list_container .nav-tabs-modules > li > a {
|
||||
.toolbarBox #modules_list_container .nav-tabs-modules > li > a {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 7px;
|
||||
border: 1px solid transparent;
|
||||
@@ -293,15 +293,15 @@ a.module_toggle_all{color: #268CCD;}
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
#modules_list_container .nav-tabs-modules > li > a:hover {
|
||||
.toolbarBox #modules_list_container .nav-tabs-modules > li > a:hover {
|
||||
border-color: #C0C0C0;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#modules_list_container .nav-tabs-modules > li > a {border: 1px solid #ddd;border-bottom:none;}
|
||||
.toolbarBox #modules_list_container .nav-tabs-modules > li > a {border: 1px solid #ddd;border-bottom:none;}
|
||||
|
||||
#modules_list_container .nav-tabs-modules > .active > a,
|
||||
#modules_list_container .nav-tabs-modules > .active > a:hover {
|
||||
.toolbarBox #modules_list_container .nav-tabs-modules > .active > a,
|
||||
.toolbarBox #modules_list_container .nav-tabs-modules > .active > a:hover {
|
||||
color: #555555;
|
||||
cursor: default;
|
||||
background-color: #EEE;
|
||||
@@ -312,7 +312,7 @@ a.module_toggle_all{color: #268CCD;}
|
||||
|
||||
|
||||
|
||||
div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:500;width:90% !important;margin:auto}
|
||||
div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:500;margin:auto}
|
||||
|
||||
/*button upload files*/
|
||||
#content .qq-upload-button {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</div>
|
||||
|
||||
<div class="warn width2" style="float: left;">
|
||||
<p>{l s='How to restore a database Backup in 10 easy steps:'}</p>
|
||||
<p>{l s='How to restore a database backup in 10 easy steps:'}</p>
|
||||
<ol style="font-size: 11px; font-weight: normal; line-height: 20px;">
|
||||
<li>{l s='Set "Enable Shop" to "No" in the "Maintenance" page under the "Preferences" menu.'}</li>
|
||||
<li>{l s='Download the backup from the list below or from your FTP server (in the folder "admin/backups").'}</li>
|
||||
@@ -61,7 +61,7 @@
|
||||
<li>{l s='Unless you enabled the "Drop existing tables" option, you must delete all tables from your current database.'}</li>
|
||||
<li>{l s='At the top of the screen, please select the "Import" tab'}</li>
|
||||
<li>{l s='Click on the "Browse" button and select the backup file from your hard drive.'}</li>
|
||||
<li>{l s='Check the max. allowed filesize (e.g. Max: 16MB)'}<br />{l s='If your backup file exceeds this limit, contact your hosting provider for assistence. '}</li>
|
||||
<li>{l s='Check the maximum filesize allowed (e.g. Max: 16MB)'}<br />{l s='If your backup file exceeds this limit, contact your hosting provider for assistence. '}</li>
|
||||
<li>{l s='Click on the "Go" button and please wait patiently for the import process to conclude. This may take several minutes.'}</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
|
||||
<div class="warn width2" style="float: left;">
|
||||
<p>{l s='How to restore a database Backup in 10 easy steps:'}</p>
|
||||
<p>{l s='How to restore a database backup in 10 easy steps:'}</p>
|
||||
<ol style="font-size: 11px; font-weight: normal; line-height: 20px;">
|
||||
<li>{l s='Set "Enable Shop" to "No" in the "Maintenance" page under the "Preferences" menu.'}</li>
|
||||
<li>{l s='Download the backup from the list below or from your FTP server (in the folder "admin/backups").'}</li>
|
||||
@@ -69,7 +69,7 @@
|
||||
<li>{l s='Unless you enabled the "Drop existing tables" option, you must delete all tables from your current database.'}</li>
|
||||
<li>{l s='At the top of the screen, please select the "Import" tab'}</li>
|
||||
<li>{l s='Click on the "Browse" button and select the backup file from your hard drive.'}</li>
|
||||
<li>{l s='Check the max. allowed filesize (e.g. Max: 16MB)'}<br />{l s='If your backup file exceeds this limit, contact your hosting provider for assistence. '}</li>
|
||||
<li>{l s='Check the maximum filesize allowed (e.g. Max: 16MB)'}<br />{l s='If your backup file exceeds this limit, contact your hosting provider for assistence. '}</li>
|
||||
<li>{l s='Click on the "Go" button and please wait patiently for the import process to conclude. This may take several minutes.'}</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
<label>{l s='Total available'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="quantity" value="{$currentTab->getFieldValue($currentObject, 'quantity')|intval}" />
|
||||
<p class="preference_description">{l s='The cart rule will be applied to the first X customers only.'}</p>
|
||||
<p class="preference_description">{l s='The cart rule will be applied to the first "X" customers only.'}</p>
|
||||
</div>
|
||||
<label>{l s='Total available for each user.'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="quantity_per_user" value="{$currentTab->getFieldValue($currentObject, 'quantity_per_user')|intval}" />
|
||||
<p class="preference_description">{l s='A customer will only be able to use the cart rule X time(s).'}</p>
|
||||
<p class="preference_description">{l s='A customer will only be able to use the cart rule "X" time(s).'}</p>
|
||||
</div>
|
||||
{if $countries.unselected|@count + $countries.selected|@count > 1}
|
||||
<br />
|
||||
@@ -98,7 +98,7 @@
|
||||
<p><strong>{l s='Unselected carriers'}</strong></p>
|
||||
<select id="carrier_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$carriers.unselected item='carrier'}
|
||||
<option value="{$carrier.id_carrier|intval}"> {$carrier.name|escape}</option>
|
||||
<option value="{$carrier.id_reference|intval}"> {$carrier.name|escape}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a
|
||||
@@ -112,7 +112,7 @@
|
||||
<p><strong>{l s='Selected carriers'}</strong></p>
|
||||
<select name="carrier_select[]" id="carrier_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$carriers.selected item='carrier'}
|
||||
<option value="{$carrier.id_carrier|intval}"> {$carrier.name|escape}</option>
|
||||
<option value="{$carrier.id_reference|intval}"> {$carrier.name|escape}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a
|
||||
|
||||
@@ -20,17 +20,17 @@
|
||||
{if $currentObject->id}<input type="hidden" name="id_cart_rule" value="{$currentObject->id|intval}" />{/if}
|
||||
<input type="hidden" id="currentFormTab" name="currentFormTab" value="informations" />
|
||||
<div id="cart_rule_informations" class="cart_rule_tab">
|
||||
<h4>{l s='Cart rule information'}</h4>
|
||||
<h4>{l s='Cart-rule information'}</h4>
|
||||
<div class="separation"></div>
|
||||
{include file='controllers/cart_rules/informations.tpl'}
|
||||
</div>
|
||||
<div id="cart_rule_conditions" class="cart_rule_tab">
|
||||
<h4>{l s='Cart rule conditions'}</h4>
|
||||
<h4>{l s='Cart-rule conditions'}</h4>
|
||||
<div class="separation"></div>
|
||||
{include file='controllers/cart_rules/conditions.tpl'}
|
||||
</div>
|
||||
<div id="cart_rule_actions" class="cart_rule_tab">
|
||||
<h4>{l s='Cart rule actions'}</h4>
|
||||
<h4>{l s='Cart-rule actions'}</h4>
|
||||
<div class="separation"></div>
|
||||
{include file='controllers/cart_rules/actions.tpl'}
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<input type="radio" name="highlight" id="highlight_off" value="0" {if !$currentTab->getFieldValue($currentObject, 'highlight')|intval}checked="checked"{/if} />
|
||||
<label class="t" for="highlight_off"> <img src="../img/admin/disabled.gif" alt="{l s='No'}" title="{l s='No'}" style="cursor:pointer" /></label>
|
||||
<p class="preference_description">
|
||||
{l s='If the voucher is not yet in the cart, it will be displayed under the cart in the cart summary.'}
|
||||
{l s='If the voucher is not yet in the cart, it will be displayed in the cart summary.'}
|
||||
</p>
|
||||
</div>
|
||||
<label>{l s='Partial use'}</label>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<input type="hidden" name="product_rule_{$product_rule_group_id|intval}[]" value="{$product_rule_id}" />
|
||||
<input type="hidden" name="product_rule_{$product_rule_group_id|intval}_{$product_rule_id|intval}_type" value="{$product_rule_type|escape}" />
|
||||
{* Everything is on a single line in order to avoid a empty space between the [ ] and the word *}
|
||||
[{if $product_rule_type == 'products'}{l s='Products:'}{elseif $product_rule_type == 'categories'}{l s='Categories:'}{elseif $product_rule_type == 'manufacturers'}{l s='Manufacturers:'}{elseif $product_rule_type == 'suppliers'}{l s='Suppliers:'}{elseif $product_rule_type == 'attributes'}{l s='Attributes'}{/if}]
|
||||
[{if $product_rule_type == 'products'}{l s='Products:'}{elseif $product_rule_type == 'categories'}{l s='Categories:'}{elseif $product_rule_type == 'manufacturers'}{l s='Manufacturers:'}{elseif $product_rule_type == 'suppliers'}{l s='Suppliers'}{elseif $product_rule_type == 'attributes'}{l s='Attributes'}{/if}]
|
||||
</td>
|
||||
<td>
|
||||
{l s='The product(s) are matching on of these'}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<option value="attributes">{l s='Attributes'}</option>
|
||||
<option value="categories">{l s='Categories:'}</option>
|
||||
<option value="manufacturers">{l s='Manufacturers:'}</option>
|
||||
<option value="suppliers">{l s='Suppliers:'}</option>
|
||||
<option value="suppliers">{l s='Suppliers'}</option>
|
||||
</select>
|
||||
<a href="javascript:addProductRule({$product_rule_group_id|intval});">
|
||||
<input type="button" class="button" value="OK" />
|
||||
|
||||
@@ -138,13 +138,13 @@
|
||||
{/if}
|
||||
{/foreach}
|
||||
<tr class="cart_total_product">
|
||||
<td colspan="5">{l s='Total products:'}</td>
|
||||
<td colspan="5">{l s='Total cost of products:'}</td>
|
||||
<td class="price bold right">{displayWtPriceWithCurrency price=$total_products currency=$currency}</td>
|
||||
</tr>
|
||||
|
||||
{if $total_discounts != 0}
|
||||
<tr class="cart_total_voucher">
|
||||
<td colspan="5">{l s='Total vouchers:'}</td>
|
||||
<td colspan="5">{l s='Total value of vouchers:'}</td>
|
||||
<td class="price-discount bold right">{displayWtPriceWithCurrency price=$total_discounts currency=$currency}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
@@ -156,7 +156,7 @@
|
||||
{/if}
|
||||
{if $cart->getOrderTotal(true, Cart::ONLY_SHIPPING) > 0}
|
||||
<tr class="cart_total_delivery">
|
||||
<td colspan="5">{l s='Total shipping:'}</td>
|
||||
<td colspan="5">{l s='Total cost of shipping:'}</td>
|
||||
<td class="price bold right">{displayWtPriceWithCurrency price=$total_shipping currency=$currency}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@
|
||||
{else}
|
||||
<a href="{$currentIndex}&token={$token}&id_customer_thread={$id_customer_thread}&viewcustomer_thread" class="button">
|
||||
{$total_thread}
|
||||
{if $total_thread > 1}{l s='new messages'}{else}{l s='new message'}{/if}
|
||||
{if $total_thread > 1}{l s='New messages'}{else}{l s='New message'}{/if}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@
|
||||
</p>
|
||||
|
||||
<div id="message_forward_email" style="display:none">
|
||||
<b>{l s='Email:'}</b> <input type="text" name="email" />
|
||||
<b>{l s='Email'}</b> <input type="text" name="email" />
|
||||
</div>
|
||||
|
||||
<div id="message_forward" style="display:none;margin-bottom:10px">
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<dl>
|
||||
<dt>{l s='Customer ID:'}</dd>
|
||||
<dd><a href="index.php?tab=AdminCustomers&id_customer={$message.id_customer}&viewcustomer&token={getAdminToken tab='AdminCustomers'}" title="{l s='View customer'}">
|
||||
{$message.id_customer} <img src="../img/admin/search.gif" alt="{l s='view'}" />
|
||||
{$message.id_customer} <img src="../img/admin/search.gif" alt="{l s='View'}" />
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -73,7 +73,7 @@
|
||||
<dt>{l s='File attachment'}</dt>
|
||||
<dd><a href="index.php?tab=AdminCustomerThreads&id_customer_thread={$message.id_customer_thread}&viewcustomer_thread&token={getAdminToken tab='AdminCustomerThreads'}&filename={$message.file_name}"
|
||||
title="{l s='View file'}">
|
||||
<img src="../img/admin/search.gif" alt="{l s='view'}" />
|
||||
<img src="../img/admin/search.gif" alt="{l s='View'}" />
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -83,7 +83,7 @@
|
||||
<dl>
|
||||
<dt>{l s='Order #'}</dt>
|
||||
<dd><a href="index.php?tab=AdminOrders&id_order={$message.id_order}&vieworder&token={getAdminToken tab='AdminOrders'}" title="{l s='View order'}">
|
||||
{$message.id_order} <img src="../img/admin/search.gif" alt="{l s='view'}" />
|
||||
{$message.id_order} <img src="../img/admin/search.gif" alt="{l s='View'}" />
|
||||
</a></dd>
|
||||
</dl>
|
||||
{/if}
|
||||
@@ -92,7 +92,7 @@
|
||||
<dl>
|
||||
<dt>{l s='Product #'}</dt>
|
||||
<dd><a href="index.php?tab=AdminProducts&id_product={$message.id_product}&updateproduct&token={getAdminToken tab='AdminProducts'}" title="{l s='View order'}">
|
||||
{$message.id_product} <img src="../img/admin/search.gif" alt="{l s='view'}" />
|
||||
{$message.id_product} <img src="../img/admin/search.gif" alt="{l s='View'}" />
|
||||
</a></dd>
|
||||
</dl>
|
||||
{/if}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<br /><br />
|
||||
{l s='ID:'} {$customer->id|string_format:"%06d"}<br />
|
||||
{l s='Registration date:'} {$registration_date}<br />
|
||||
{l s='Last visit:'} {if $customer_stats['last_visit']}{$last_visit}{else}{l s='never'}{/if}<br />
|
||||
{l s='Last visit:'} {if $customer_stats['last_visit']}{$last_visit}{else}{l s='Never'}{/if}<br />
|
||||
{if $count_better_customers != '-'}{l s='Rank: #'} {$count_better_customers}<br />{/if}
|
||||
{if $shop_is_feature_active}{l s='Shop:'} {$name_shop}<br />{/if}
|
||||
</div>
|
||||
@@ -84,17 +84,17 @@
|
||||
{l s='Language:'} {if isset($customerLanguage)}{$customerLanguage->name}{else}{l s='undefined'}{/if}<br />
|
||||
{l s='Newsletter:'} {if $customer->newsletter}<img src="../img/admin/enabled.gif" />{else}<img src="../img/admin/disabled.gif" />{/if}<br />
|
||||
{l s='Opt in:'} {if $customer->optin}<img src="../img/admin/enabled.gif" />{else}<img src="../img/admin/disabled.gif" />{/if}<br />
|
||||
{l s='Age:'} {$customer_stats['age']} {if isset($customer->birthday['age'])}({$customer_birthday}){else}{l s='unknown'}{/if}<br /><br />
|
||||
{l s='Age:'} {$customer_stats['age']} {if isset($customer->birthday['age'])}({$customer_birthday}){else}{l s='Unknown'}{/if}<br /><br />
|
||||
{l s='Last update:'} {$last_update}<br />
|
||||
{l s='Status:'} {if $customer->active}<img src="../img/admin/enabled.gif" />{else}<img src="../img/admin/disabled.gif" />{/if}
|
||||
|
||||
{if $customer->isGuest()}
|
||||
<div>
|
||||
{l s='This customer is registered as.'} <b>{l s='guest'}</b>
|
||||
{l s='This customer is registered as.'} <b>{l s='Guest'}</b>
|
||||
{if !$customer_exists}
|
||||
<form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
|
||||
<input type="hidden" name="id_lang" value="{$id_lang}" />
|
||||
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform to customer account'}" /></p>
|
||||
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform to a customer account'}" /></p>
|
||||
{l s='This feature generates a random password before sending an email to your customer.'}
|
||||
</form>
|
||||
{else}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<form action="{$current}&token={$token}" method="post">
|
||||
<fieldset class="width4">
|
||||
<legend><img src="../img/admin/picture.gif" /> {l s='Regenerate thumbnails'}</legend><br />
|
||||
<label>{l s='Select image'}</label>
|
||||
<label>{l s='Select an image'}</label>
|
||||
<div class="margin-form">
|
||||
<select name="type" onchange="changeFormat(this)">
|
||||
<option value="all">{l s='All'}</option>
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
|
||||
{foreach $types AS $k => $type}
|
||||
<label class="second-select format_{$k}" style="display:none;">{l s='Select format'}</label>
|
||||
<label class="second-select format_{$k}" style="display:none;">{l s='Select a format'}</label>
|
||||
<div class="second-select margin-form format_{$k}" style="display:none;">
|
||||
<select class="second-select format_{$k}" name="format_{$k}">
|
||||
<option value="all">{l s='All'}</option>
|
||||
@@ -82,7 +82,7 @@
|
||||
<br />
|
||||
{if $safe_mode}
|
||||
<div class="warn">
|
||||
{l s='PrestaShop has detected that your server configuration is not compatible with the new storage system (directive "safe_mode" is activated). You should continue to use the existing system.'}
|
||||
{l s='PrestaShop has detected that your server configuration is not compatible with the new storage system (directive "safe_mode" is activated). You should therefore continue to use the existing system.'}
|
||||
</div>
|
||||
{else}
|
||||
<form action="{$current}&token={$token}" method="post">
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
console.log(truncateAuthorized);
|
||||
if (truncateAuthorized)
|
||||
{
|
||||
if (!confirm('{l s='Are you sure you want to delete' js=1}' + ' ' + $.trim($('#entity > option:selected').text().toLowerCase()) + '{l s='?' js=1}'))
|
||||
if (!confirm('{l s='Are you sure that you would like to delete this' js=1}' + ' ' + $.trim($('#entity > option:selected').text().toLowerCase()) + '{l s='?' js=1}'))
|
||||
{
|
||||
e.preventDefault();
|
||||
}
|
||||
@@ -126,7 +126,7 @@
|
||||
<a href="#upload_file_import" id="upload_file_import_link" class="button"><img src="../img/admin/add.gif" alt="Uplaod" title="Upload" />{l s='Upload'}</a>
|
||||
</div>
|
||||
<div style="width:50%; margin: 0 auto;">
|
||||
<a href="#" onclick="$('#sample_files_import').slideToggle(); return false;">{l s='Click to see our samples import csv files.'}</a>
|
||||
<a href="#" onclick="$('#sample_files_import').slideToggle(); return false;">{l s='Click to view our sample import csv files.'}</a>
|
||||
<ul id="sample_files_import" style="display:none">
|
||||
<li><a href="../docs/csv_import/categories_import.csv">{l s='Sample Categories file'}</a></li>
|
||||
<li><a href="../docs/csv_import/products_import.csv">{l s='Sample Products file'}</a></li>
|
||||
@@ -190,14 +190,14 @@
|
||||
</div>
|
||||
<div class="space margin-form">
|
||||
<input type="submit" name="submitImportFile" value="{l s='Next step'}" class="button" {if empty($files_to_import)}disabled{/if}/>
|
||||
{if empty($files_to_import)}<span style="color:red;">{l s='You must upload a file for go to the next step.'}</span>{/if}
|
||||
{if empty($files_to_import)}<span style="color:red;">{l s='You must upload a file in order to proceed to the next step'}</span>{/if}
|
||||
</div>
|
||||
<div class="warn import_products_categories" style="margin-top: 20px;">
|
||||
<p>{l s='Note that the category import does not support categories of the same name.'}</p>
|
||||
<p>{l s='Note that you can have several products with the same reference.'}</p>
|
||||
</div>
|
||||
<div class="warn import_supply_orders_details" style="margin-top: 20px; display:none">
|
||||
<p>{l s='Importing Supply Order Details will first reset the products ordered, if any.'}</p>
|
||||
<p>{l s='Importing Supply Order Details will reset products ordered, if there are any.'}</p>
|
||||
</div>
|
||||
{if !count($files_to_import)}
|
||||
<div class="warn" style="margin-top: 20px;">
|
||||
@@ -222,7 +222,7 @@
|
||||
</div>
|
||||
|
||||
<div class="clear">
|
||||
<br /><br />{l s='*Required field'}
|
||||
<br /><br />{l s='* Required field'}
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</script>
|
||||
|
||||
<fieldset>
|
||||
<legend><img src="../img/t/AdminInformation.gif" alt="" />{l s='Configuration Information'}</legend>
|
||||
<legend><img src="../img/t/AdminInformation.gif" alt="" />{l s='Configuration information'}</legend>
|
||||
<p>{l s='This information must be provided when you report an issue on our bug tracker or forum.'}</p>
|
||||
</fieldset>
|
||||
<br />
|
||||
@@ -113,7 +113,7 @@
|
||||
<hr />
|
||||
<h3>{l s='Store information'}</h3>
|
||||
<p>
|
||||
<b>{l s='Prestashop version'}:</b> {$shop.ps|escape:'htmlall':'UTF-8'}
|
||||
<b>{l s='PrestaShop version'}:</b> {$shop.ps|escape:'htmlall':'UTF-8'}
|
||||
</p>
|
||||
<p>
|
||||
<b>{l s='Shop URL'}:</b> {$shop.url|escape:'htmlall':'UTF-8'}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
var langPackOk = "<img src=\"{$smarty.const._PS_IMG_}admin/information.png\" alt=\"\" /> {l s='A language pack is available for this ISO.'}";
|
||||
var langPackVersion = "{l s='The Prestashop version compatible with this language and your system is:'}";
|
||||
var langPackInfo = "{l s='After creating the language, you can import the content of the language pack, which you can download under "Localization -- Translations."'}";
|
||||
var noLangPack = "<img src=\"{$smarty.const._PS_IMG_}admin/information.png\" alt=\"\" /> {l s='No language pack available on prestashop.com for this ISO code'}";
|
||||
var noLangPack = "<img src=\"{$smarty.const._PS_IMG_}admin/information.png\" alt=\"\" /> {l s='No language pack is available on prestashop.com for this ISO code'}";
|
||||
var download = "{l s='Download'}";
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<h2>{$manufacturer->name}</h2>
|
||||
|
||||
<h3>{l s='Total addresses:'} {count($addresses)}</h3>
|
||||
<h3>{l s='Total addresses'} {count($addresses)}</h3>
|
||||
<hr />
|
||||
|
||||
{if !count($addresses)}
|
||||
@@ -60,7 +60,7 @@
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<h3>{l s='Total products:'} {count($products)}</h3>
|
||||
<h3>{l s='Total products'} {count($products)}</h3>
|
||||
{foreach $products AS $product}
|
||||
<hr />
|
||||
{if !$product->hasAttributes()}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<th>{l s='Description'}</th>
|
||||
<th>{l s='Status'}</th>
|
||||
<th>{l s='Tab'}</th>
|
||||
<th>{l s='Categories:'}</th>
|
||||
<th>{l s='Categories'}</th>
|
||||
<th>{l s='Interest'}</th>
|
||||
<th>{l s='Favorite'}</th>
|
||||
<th> </th>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="filter-module" id="addons_login_div">
|
||||
<p>{l s='Do you have a %s account?' sprintf='<a href="http://addons.prestashop.com/">PrestaShop Addons</a>'}</p>
|
||||
<form id="addons_login_form" method="post">
|
||||
<label>{l s='Login to Addons'} :</label> <input type="text" value="" id="username_addons" autocomplete="off" class="ac_input">
|
||||
<label>{l s='Addons Login'} :</label> <input type="text" value="" id="username_addons" autocomplete="off" class="ac_input">
|
||||
<label>{l s= 'Password Addons'} :</label> <input type="password" value="" id="password_addons" autocomplete="off" class="ac_input">
|
||||
<input type="submit" class="button" id="addons_login_button" value="{l s='Log in'}">
|
||||
<br /><span id="addons_loading" style="color:red"></span>
|
||||
@@ -64,7 +64,7 @@
|
||||
<div class="filter-module">
|
||||
<form id="filternameForm" method="post">
|
||||
<input type="text" value="" name="filtername" autocomplete="off" class="ac_input">
|
||||
<input type="submit" class="button" value="{l s='Search:'}">
|
||||
<input type="submit" class="button" value="{l s='Search'}">
|
||||
</form>
|
||||
<form method="post">
|
||||
<div class="select-filter">
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<!--start sidebar module-->
|
||||
<div class="sidebar">
|
||||
<div class="categorieTitle">
|
||||
<h3>{l s='Categories:'}</h3>
|
||||
<h3>{l s='Categories'}</h3>
|
||||
<div class="subHeadline"> </div>
|
||||
<ul class="categorieList">
|
||||
<li {if isset($categoryFiltered.favorites)}style="background-color:#EBEDF4"{/if} class="categoryModuleFilterLink">
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</colgroup>
|
||||
<tr class="nodrag nodrop"><th colspan="5"> {if $hook['module_count'] && $can_move}
|
||||
<input type="checkbox" id="Ghook{$hook['id_hook']}" style="margin-right: 2px;" onclick="hookCheckboxes({$hook['id_hook']}, 0, this)"/>
|
||||
{/if}{$hook['title']} - <span style="color: red">{$hook['module_count']}</span> {if $hook['module_count'] > 1}{l s='modules'}{else}{l s='module'}{/if}
|
||||
{/if}{$hook['title']} - <span style="color: red">{$hook['module_count']}</span> {if $hook['module_count'] > 1}{l s='Modules'}{else}{l s='Module'}{/if}
|
||||
|
||||
{if !empty($hook['description'])}
|
||||
<span style="font-size:0.8em; font-weight: normal">[{$hook['description']}]</span>
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="5" class="center">
|
||||
<h3>{l s='No document is available'}</h3>
|
||||
<h3>{l s='No documents are available'}</h3>
|
||||
{if isset($invoice_management_active) && $invoice_management_active}
|
||||
<p><a class="button" href="{$current_index}&viewOrder&submitGenerateInvoice&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">{l s='Generate invoice'}</a></p>
|
||||
{/if}
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
<input type="hidden" id="add_product_product_id" name="add_product[product_id]" value="0" />
|
||||
{l s='Product:'} <input type="text" id="add_product_product_name" value="" size="42" />
|
||||
<div id="add_product_product_attribute_area" style="margin-top: 5px;display: none;">
|
||||
{l s='Combinations:'} <select name="add_product[product_attribute_id]" id="add_product_product_attribute_id"></select>
|
||||
{l s='Combinations'} <select name="add_product[product_attribute_id]" id="add_product_product_attribute_id"></select>
|
||||
</div>
|
||||
<div id="add_product_product_warehouse_area" style="margin-top: 5px; display: none;">
|
||||
{l s='Warehouse:'} <select id="add_product_warehouse" name="add_product_warehouse">
|
||||
{l s='Warehouse'} <select id="add_product_warehouse" name="add_product_warehouse">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
@@ -64,7 +64,7 @@
|
||||
<tr id="new_invoice" style="display:none;background-color:#e9f1f6;">
|
||||
<td colspan="10">
|
||||
<h3>{l s='New invoice information'}</h3>
|
||||
<label>{l s='Carrier:'}</label>
|
||||
<label>{l s='Carrier'}</label>
|
||||
<div class="margin-form">
|
||||
{$carrier->name}
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Date:'}</th>
|
||||
<th>{l s='Date'}</th>
|
||||
<th>{l s='Type'}</th>
|
||||
<th>{l s='Carrier'}</th>
|
||||
<th>{l s='Weight'}</th>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var id_currency = '';
|
||||
var id_lang = '';
|
||||
var txt_show_carts = '{l s='Show carts and orders for this customer.'}';
|
||||
var txt_hide_carts = '{l s='Hide carts and orders for this customer'}';
|
||||
var txt_hide_carts = '{l s='Hide carts and orders for this customer.'}';
|
||||
var defaults_order_state = new Array();
|
||||
var customization_errors = false;
|
||||
var pic_dir = '{$pic_dir}';
|
||||
@@ -560,7 +560,7 @@
|
||||
customization_errors = false;
|
||||
$('#products_found').show();
|
||||
products_found += '<label>{l s='Product:'}</label><select id="id_product" onclick="display_product_attributes();display_product_customizations();">';
|
||||
attributes_html += '<label>{l s='Combination:'}</label>';
|
||||
attributes_html += '<label>{l s='Combination'}</label>';
|
||||
$.each(res.products, function() {
|
||||
products_found += '<option '+(this.combinations.length > 0 ? 'rel="'+this.qty_in_stock+'"' : '')+' value="'+this.id_product+'">'+this.name+(this.combinations.length == 0 ? ' - '+this.formatted_price : '')+'</option>';
|
||||
attributes_html += '<select class="id_product_attribute" id="ipa_'+this.id_product+'" style="display:none;">';
|
||||
@@ -971,7 +971,6 @@
|
||||
},
|
||||
success : function(res)
|
||||
{
|
||||
displaySummary(res);
|
||||
updateDeliveryOption();
|
||||
}
|
||||
});
|
||||
@@ -983,7 +982,7 @@
|
||||
|
||||
<fieldset id="customer_part">
|
||||
<legend><img src="../img/admin/tab-customers.gif" />{l s='Customer'}</legend>
|
||||
<label>{l s='Search customers:'}</label>
|
||||
<label>{l s='Search customers'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" id="customer" value="" />
|
||||
<p>{l s='Search a customer by tapping the first letters of his/her name'}</p>
|
||||
@@ -997,7 +996,7 @@
|
||||
<form action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&submitAdd{$table}=1" method="post" autocomplete="off">
|
||||
<fieldset id="products_part" style="display:none;"><legend><img src="../img/t/AdminCatalog.gif" />{l s='Cart'}</legend>
|
||||
<div>
|
||||
<label>{l s='Search a product:'} </label>
|
||||
<label>{l s='Search for a product'} </label>
|
||||
<div class="margin-form">
|
||||
<input type="hidden" value="" id="id_cart" name="id_cart" />
|
||||
<input type="text" id="product" value="" />
|
||||
@@ -1021,7 +1020,7 @@
|
||||
</body>
|
||||
</html>
|
||||
</iframe>
|
||||
<p><label for="qty">{l s='Quantity:'}</label><input type="text" name="qty" id="qty" value="1" /> <b>{l s='In stock:'}</b> <span id="qty_in_stock"></span></p>
|
||||
<p><label for="qty">{l s='Quantity:'}</label><input type="text" name="qty" id="qty" value="1" /> <b>{l s='In stock'}</b> <span id="qty_in_stock"></span></p>
|
||||
<div class="margin-form">
|
||||
<p><input type="submit" onclick="addProduct();return false;" class="button" id="submitAddProduct" value="{l s='Add to cart'}"/></p>
|
||||
</div>
|
||||
@@ -1054,7 +1053,7 @@
|
||||
<p><b>{l s='The prices are without taxes.'}</b></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><label for="id_currency">{l s='Currency:'}</label>
|
||||
<p><label for="id_currency">{l s='Currency'}</label>
|
||||
<script type="text/javascript">
|
||||
{foreach from=$currencies item='currency'}
|
||||
currencies['{$currency.id_currency}'] = '{$currency.sign}';
|
||||
@@ -1067,7 +1066,7 @@
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="id_lang">{l s='Language:'}</label>
|
||||
<label for="id_lang">{l s='Language'}</label>
|
||||
<select id="id_lang" name="id_lang">
|
||||
{foreach from=$langs item='lang'}
|
||||
<option value="{$lang.id_lang}">{$lang.name}</option>
|
||||
@@ -1080,7 +1079,7 @@
|
||||
<p><a href="#" id="show_old_carts" class="button"></a></p>
|
||||
<div id="old_carts_orders">
|
||||
<div id="nonOrderedCarts">
|
||||
<h3>{l s='Carts:'}</h3>
|
||||
<h3>{l s='Carts'}</h3>
|
||||
<table cellspacing="0" cellpadding="0" class="table width5">
|
||||
<colgroup>
|
||||
<col width="10px">
|
||||
@@ -1101,7 +1100,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id="lastOrders">
|
||||
<h3>{l s='Orders:'}</h3>
|
||||
<h3>{l s='Orders'}</h3>
|
||||
<table cellspacing="0" cellpadding="0" class="table width5">
|
||||
<colgroup>
|
||||
<col width="10px">
|
||||
@@ -1159,14 +1158,14 @@
|
||||
<legend><img src="../img/t/AdminAddresses.gif" />{l s='Addresses'}</legend>
|
||||
<div id="addresses_err" class="warn" style="display:none;"></div>
|
||||
<div id="address_delivery">
|
||||
<h3>{l s='Delivery:'}</h3>
|
||||
<h3>{l s='Delivery'}</h3>
|
||||
<select id="id_address_delivery" name="id_address_delivery">
|
||||
</select>
|
||||
<div id="address_delivery_detail">
|
||||
</div>
|
||||
</div>
|
||||
<div id="address_invoice">
|
||||
<h3>{l s='Invoice:'}</h3>
|
||||
<h3>{l s='Invoice'}</h3>
|
||||
<select id="id_address_invoice" name="id_address_invoice">
|
||||
</select>
|
||||
<div id="address_invoice_detail">
|
||||
@@ -1176,20 +1175,20 @@
|
||||
</fieldset>
|
||||
<br />
|
||||
<fieldset id="carriers_part" style="display:none;">
|
||||
<legend><img src="../img/t/AdminCarriers.gif" />{l s='Shipping:'}</legend>
|
||||
<legend><img src="../img/t/AdminCarriers.gif" />{l s='Shipping'}</legend>
|
||||
<div id="carriers_err" style="display:none;" class="warn"></div>
|
||||
<div id="carrier_form">
|
||||
<div>
|
||||
<p>
|
||||
<label>{l s='Delivery option:'} </label>
|
||||
<label>{l s='Delivery option'} </label>
|
||||
<select name="delivery_option" id="delivery_option">
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="shipping_price">{l s='Shipping price:'}</label> <span id="shipping_price" name="shipping_price"></span> <span class="currency_sign"></span>
|
||||
<label for="shipping_price">{l s='Shipping price'}</label> <span id="shipping_price" name="shipping_price"></span> <span class="currency_sign"></span>
|
||||
</p>
|
||||
<p>
|
||||
<label for="free_shipping">{l s='Free shipping:'}</label>
|
||||
<label for="free_shipping">{l s='Free shipping'}</label>
|
||||
<input type="checkbox" id="free_shipping" name="free_shipping" value="1" />
|
||||
</p>
|
||||
</div>
|
||||
@@ -1199,7 +1198,7 @@
|
||||
{/if}
|
||||
{if $gift_wrapping}
|
||||
<p><input type="checkbox" name="order_gift" id="order_gift" value="1" /> <label for="order_gift">{l s='Gift'}</label></p>
|
||||
<p><label for="gift_message">{l s='Gift message:'}</label><textarea id="gift_message" cols="40" rows="4"></textarea></p>
|
||||
<p><label for="gift_message">{l s='Gift message'}</label><textarea id="gift_message" cols="40" rows="4"></textarea></p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1210,16 +1209,16 @@
|
||||
<div id="send_email_feedback"></div>
|
||||
<div id="cart_summary" style="clear:both;float:left;">
|
||||
<ul>
|
||||
<li><span class="total_cart">{l s='Total products:'}</span><span id="total_products"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total vouchers:'}</span><span id="total_vouchers"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total shipping:'}</span><span id="total_shipping"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total taxes:'}</span><span id="total_taxes"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total without taxes:'}</span><span id="total_without_taxes"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total with taxes:'}</span><span id="total_with_taxes"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total products'}</span><span id="total_products"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total vouchers'}</span><span id="total_vouchers"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total shipping'}</span><span id="total_shipping"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total taxes'}</span><span id="total_taxes"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total without taxes'}</span><span id="total_without_taxes"></span><span class="currency_sign"></span></li>
|
||||
<li><span class="total_cart">{l s='Total with taxes'}</span><span id="total_with_taxes"></span><span class="currency_sign"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="order_message_right">
|
||||
<label for="order_message">{l s='Order message:'}</label>
|
||||
<label for="order_message">{l s='Order message'}</label>
|
||||
<div class="margin-form">
|
||||
<textarea name="order_message" id="order_message" rows="3" cols="45"></textarea>
|
||||
</div>
|
||||
@@ -1229,7 +1228,7 @@
|
||||
<div class="margin-form">
|
||||
<a target="_blank" id="go_order_process" href="" class="button">{l s='Go on payment page to process the payment.'}</a>
|
||||
</div>
|
||||
<label>{l s='Payment:'}</label>
|
||||
<label>{l s='Payment'}</label>
|
||||
<div class="margin-form">
|
||||
<select name="payment_module_name" id="payment_module_name">
|
||||
{foreach from=$payment_modules item='module'}
|
||||
@@ -1237,7 +1236,7 @@
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<label>{l s='Order status:'}</label>
|
||||
<label>{l s='Order status'}</label>
|
||||
<div class="margin-form">
|
||||
<select name="id_order_state" id="id_order_state">
|
||||
{foreach from=$order_states item='order_state'}
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
</div>
|
||||
<div class="metadata-command">
|
||||
<dl>
|
||||
<dt>{l s='Date:'} </dt>
|
||||
<dt>{l s='Date'} </dt>
|
||||
<dd>{dateFormat date=$order->date_add full=true}</dd>
|
||||
|</dl>
|
||||
<dl>
|
||||
@@ -100,7 +100,7 @@
|
||||
<dd id="product_number">{sizeof($products)}</dd>
|
||||
|</dl>
|
||||
<dl>
|
||||
<dt>{l s='Total:'}</dt>
|
||||
<dt>{l s='Total'}</dt>
|
||||
<dd class="total_paid">{displayPrice price=$order->total_paid_tax_incl currency=$currency->id}</dd>
|
||||
</dl>
|
||||
<div class="clear"></div>
|
||||
@@ -162,7 +162,7 @@
|
||||
{if (!Customer::customerExists($customer->email))}
|
||||
<form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
|
||||
<input type="hidden" name="id_lang" value="{$order->id_lang}" />
|
||||
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform guest into customer'}" /></p>
|
||||
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" /></p>
|
||||
{l s='This feature will generate a random password and send an email to the customer.'}
|
||||
</form>
|
||||
{else}
|
||||
@@ -185,9 +185,9 @@
|
||||
{foreach from=$sources item=source}
|
||||
<li>
|
||||
{dateFormat date=$source['date_add'] full=true}<br />
|
||||
<b>{l s='From:'}</b>{if $source['http_referer'] != ''}<a href="{$source['http_referer']}">{parse_url($source['http_referer'], $smarty.const.PHP_URL_HOST)|regex_replace:'/^www./':''}</a>{else}-{/if}<br />
|
||||
<b>{l s='To:'}</b> <a href="http://{$source['request_uri']}">{$source['request_uri']|truncate:100:'...'}</a><br />
|
||||
{if $source['keywords']}<b>{l s='Keywords:'}</b> {$source['keywords']}<br />{/if}<br />
|
||||
<b>{l s='From'}</b>{if $source['http_referer'] != ''}<a href="{$source['http_referer']}">{parse_url($source['http_referer'], $smarty.const.PHP_URL_HOST)|regex_replace:'/^www./':''}</a>{else}-{/if}<br />
|
||||
<b>{l s='To'}</b> <a href="http://{$source['request_uri']}">{$source['request_uri']|truncate:100:'...'}</a><br />
|
||||
{if $source['keywords']}<b>{l s='Keywords'}</b> {$source['keywords']}<br />{/if}<br />
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
@@ -266,8 +266,8 @@
|
||||
|
||||
{if (!$order->valid && sizeof($currencies) > 1)}
|
||||
<form method="post" action="{$currentIndex}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
||||
<p class="warn">{l s='Don\'t forget to update your conversion rate before make this change.'}</p>
|
||||
<label>{l s='Don\'t forget to update your conversion rate before make this change.'}</label>
|
||||
<p class="warn">{l s='Don\'t forget to update your conversion rate before making this change.'}</p>
|
||||
<label>{l s='Don\'t forget to update your conversion rate before making this change.'}</label>
|
||||
<select name="new_currency">
|
||||
{foreach from=$currencies item=currency_change}
|
||||
{if $currency_change['id_currency'] != $order->id_currency}
|
||||
@@ -282,13 +282,13 @@
|
||||
|
||||
{if count($order->getOrderPayments()) > 0}
|
||||
<p class="error" style="{if round($orders_total_paid_tax_incl, 2) == round($total_paid, 2) || $currentState->id == 6}display: none;{/if}">
|
||||
{l s='Warning:'} {displayPrice price=$total_paid currency=$currency->id}
|
||||
{l s='Warning'} {displayPrice price=$total_paid currency=$currency->id}
|
||||
{l s='paid instead of'} <span class="total_paid">{displayPrice price=$orders_total_paid_tax_incl currency=$currency->id}</span>
|
||||
|
||||
{foreach $order->getBrother() as $brother_order}
|
||||
{if $brother_order@first}
|
||||
{if count($order->getBrother()) == 1}
|
||||
<br />{l s='This warning also concerns the order '}
|
||||
<br />{l s='This warning also concerns order '}
|
||||
{else}
|
||||
<br />{l s='This warning also concerns the next orders:'}
|
||||
{/if}
|
||||
@@ -339,7 +339,7 @@
|
||||
<tr class="payment_information" style="display: none;">
|
||||
<td colspan="6">
|
||||
<p>
|
||||
<b>{l s='Card Number:'}</b>
|
||||
<b>{l s='Card Number'}</b>
|
||||
{if $payment->card_number}
|
||||
{$payment->card_number}
|
||||
{else}
|
||||
@@ -348,7 +348,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>{l s='Card Brand:'}</b>
|
||||
<b>{l s='Card Brand'}</b>
|
||||
{if $payment->card_brand}
|
||||
{$payment->card_brand}
|
||||
{else}
|
||||
@@ -357,7 +357,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>{l s='Card Expiration:'}</b>
|
||||
<b>{l s='Card Expiration'}</b>
|
||||
{if $payment->card_expiration}
|
||||
{$payment->card_expiration}
|
||||
{else}
|
||||
@@ -366,7 +366,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>{l s='Card Holder:'}</b>
|
||||
<b>{l s='Card Holder'}</b>
|
||||
{if $payment->card_holder}
|
||||
{$payment->card_holder}
|
||||
{else}
|
||||
@@ -378,7 +378,7 @@
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="6" class="center">
|
||||
<h3>{l s='No payment available'}</h3>
|
||||
<h3>{l s='No payments are available'}</h3>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
@@ -422,10 +422,10 @@
|
||||
<!-- Shipping block -->
|
||||
{if !$order->isVirtual()}
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/delivery.gif" /> {l s='Shipping:'}</legend>
|
||||
<legend><img src="../img/admin/delivery.gif" /> {l s='Shipping'}</legend>
|
||||
|
||||
<div class="clear" style="float: left; margin-right: 10px;">
|
||||
<span>{l s='Recycled packaging:'}</span>
|
||||
<span>{l s='Recycled packaging'}</span>
|
||||
{if $order->recyclable}
|
||||
<img src="../img/admin/enabled.gif" />
|
||||
{else}
|
||||
@@ -433,13 +433,13 @@
|
||||
{/if}
|
||||
</div>
|
||||
<div style="float: left;">
|
||||
<span>{l s='Gift-wrapping:'}</span>
|
||||
<span>{l s='Gift wrapping'}</span>
|
||||
{if $order->gift}
|
||||
<img src="../img/admin/enabled.gif" />
|
||||
</div>
|
||||
<div style="clear: left; margin: 0px 42px 0px 42px; padding-top: 2px;">
|
||||
{if $order->gift_message}
|
||||
<div style="border: 1px dashed #999; padding: 5px; margin-top: 8px;"><b>{l s='Message:'}</b><br />{$order->gift_message|nl2br}</div>
|
||||
<div style="border: 1px dashed #999; padding: 5px; margin-top: 8px;"><b>{l s='Message'}</b><br />{$order->gift_message|nl2br}</div>
|
||||
{/if}
|
||||
{else}
|
||||
<img src="../img/admin/disabled.gif" />
|
||||
@@ -661,7 +661,7 @@
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"> </td>
|
||||
</tr>
|
||||
<tr id="total_shipping">
|
||||
<td><b>{l s='Shipping:'}</b></td>
|
||||
<td><b>{l s='Shipping'}</b></td>
|
||||
<td class="amount" align="right">{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;">{$currency->prefix}<input type="text" size="3" name="partialRefundShippingCost" value="0" />{$currency->suffix}</td>
|
||||
</tr>
|
||||
@@ -780,7 +780,7 @@
|
||||
{/if}
|
||||
{l s='At'} <i>{dateFormat date=$message['date_add']}
|
||||
</i> {l s='from'} <b>{if ($message['elastname']|escape:'htmlall':'UTF-8')}{$message['efirstname']|escape:'htmlall':'UTF-8'} {$message['elastname']|escape:'htmlall':'UTF-8'}{else}{$message['cfirstname']|escape:'htmlall':'UTF-8'} {$message['clastname']|escape:'htmlall':'UTF-8'}{/if}</b>
|
||||
{if ($message['private'] == 1)}<span style="color:red; font-weight:bold;">{l s='Private:'}</span>{/if}
|
||||
{if ($message['private'] == 1)}<span style="color:red; font-weight:bold;">{l s='Private'}</span>{/if}
|
||||
<p>{$message['message']|escape:'htmlall':'UTF-8'|nl2br}</p>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
<label>{l s='File'}</label>
|
||||
<label>{l s='File:'}</label>
|
||||
<div class="margin-form">
|
||||
<p><input type="file" name="attachment_file" /></p>
|
||||
<p class="preference_description">{l s='Upload a file from your computer'} ({$PS_ATTACHMENT_MAXIMUM_SIZE|string_format:"%.2f"} {l s='MB max.'})</p>
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
{/foreach}
|
||||
</script>
|
||||
<h4>{l s='Add or modify combinations for this product.'}</h4>
|
||||
<div class="separation"></div> {l s='or use the'}
|
||||
<div class="separation"></div> {l s='Or use the'}
|
||||
<a class="button bt-icon confirm_leave" href="index.php?tab=AdminAttributeGenerator&id_product={$product->id}&attributegenerator&token={$token_generator}"><img src="../img/admin/appearance.gif" alt="combinations_generator" class="middle" title="{l s='Product combinations generator'}" /><span>{l s='Product combinations generator'}</span></a>
|
||||
{l s='in order to automatically create a set of combinations'}
|
||||
{l s='in order to automatically create a set of combinations.'}
|
||||
{if $combination_exists}
|
||||
<div class="warn" style="display:block">
|
||||
<ul>
|
||||
@@ -131,7 +131,7 @@
|
||||
<td style="padding-bottom:5px;">
|
||||
{if $currency->format % 2 != 0}{$currency->sign}{/if}
|
||||
<input type="text" size="6" name="attribute_wholesale_price" id="attribute_wholesale_price" value="" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
|
||||
{if $currency->format % 2 == 0} {$currency->sign} {/if}<span id="attribute_wholesale_price_blank">({l s='leave blank if the price does not change'})</span>
|
||||
{if $currency->format % 2 == 0} {$currency->sign} {/if}<span id="attribute_wholesale_price_blank">({l s='Leave blank if the price does not change'})</span>
|
||||
<span style="display:none" id="attribute_wholesale_price_full">({l s='Overrides wholesale price on "Information" tab'})</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<p class="clear" style="padding:10px 0 0 0">
|
||||
<a style="cursor:pointer" class="button"
|
||||
onmousedown="updateFriendlyURLByName();">{l s='Generate'}</a>
|
||||
{l s='Friendly URL. From the product name.'}<br /><br />
|
||||
{l s='friendly URL from the product name.'}<br /><br />
|
||||
{l s='The product link will look like this:'}
|
||||
{$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url">{$product->link_rewrite[$default_language]}</span>.html</p>
|
||||
</td>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<input type="hidden" name="submitted_tabs[]" value="Shipping" />
|
||||
<h4 class="tab">1. {l s='Info.'}</h4>
|
||||
<h4>{l s='Shipping:'}</h4>
|
||||
<h4>{l s='Shipping'}</h4>
|
||||
|
||||
{if isset($display_common_field) && $display_common_field}
|
||||
<div class="hint" style="display: block">{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}</div>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<p>{l s='Please choose the suppliers associated with this product. Please select a default supplier, as well.'}</p>
|
||||
<a class="button bt-icon confirm_leave" href="{$link->getAdminLink('AdminSuppliers')|escape:'htmlall':'UTF-8'}&addsupplier">
|
||||
<img src="../img/admin/add.gif" alt="{l s='Create a new supplier.'}" title="{l s='Create a new supplier.'}" /><span>{l s='Create a new supplier.'}</span>
|
||||
<img src="../img/admin/add.gif" alt="{l s='Create a new supplier'}" title="{l s='Create a new supplier'}" /><span>{l s='Create a new supplier'}</span>
|
||||
</a>
|
||||
<table cellpadding="5" style="width:100%">
|
||||
<tbody>
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<br class="clear" />
|
||||
<label>{l s='Search:'}</label>
|
||||
<label>{l s='Search'}</label>
|
||||
<div class="margin-left">
|
||||
<input type="text" size="34" id="filterProduct" name="filterProduct" onkeyup="fillProducts();" />
|
||||
</div>
|
||||
|
||||
+5
-5
@@ -37,7 +37,7 @@
|
||||
<div id="condition_list">
|
||||
<h3>{l s='Conditions'}</h3>
|
||||
<div class="row">
|
||||
<label for="id_category">{l s='Category:'}</label>
|
||||
<label for="id_category">{l s='Category'}</label>
|
||||
<div class="margin-form">
|
||||
<select id="id_category" name="id_category">
|
||||
{foreach from=$categories item='category'}
|
||||
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label for="id_manufacturer">{l s='Manufacturer:'}</label>
|
||||
<label for="id_manufacturer">{l s='Manufacturer'}</label>
|
||||
<div class="margin-form">
|
||||
<select id="id_manufacturer" name="id_manufacturer">
|
||||
{foreach from=$manufacturers item='manufacturer'}
|
||||
@@ -67,7 +67,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label for="id_supplier">{l s='Supplier:'}</label>
|
||||
<label for="id_supplier">{l s='Supplier'}</label>
|
||||
<div class="margin-form">
|
||||
<select id="id_supplier" name="id_supplier">
|
||||
{foreach from=$suppliers item='supplier'}
|
||||
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label for="id_attribute">{l s='Attributes:'}</label>
|
||||
<label for="id_attribute">{l s='Attributes'}</label>
|
||||
<div class="margin-form">
|
||||
<select id="id_attribute_group">
|
||||
{foreach from=$attributes_group item='attribute_group'}
|
||||
@@ -105,7 +105,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label for="id_attribute">{l s='Features:'}</label>
|
||||
<label for="id_attribute">{l s='Features'}</label>
|
||||
<div class="margin-form">
|
||||
<select id="id_feature">
|
||||
{foreach from=$features item='feature'}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
{if !$product->hasAttributes()}
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table" style="">
|
||||
<tr>
|
||||
<th width="450">{l s='Name:'} {$product->name}</th>
|
||||
<th width="450">{l s='Name'} {$product->name}</th>
|
||||
{if !empty($product->product_supplier_reference)}<th width="190">{l s='Supplier Reference:'} {$product->product_supplier_reference}</th>{/if}
|
||||
{if !empty($product->product_supplier_price_te)}<th width="190">{l s='Wholesale price:'} {$product->product_supplier_price_te}</th>{/if}
|
||||
{if !empty($product->reference)}<th width="150">{l s='Reference:'} {$product->reference}</th>{/if}
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/translation.gif" />{l s='Modify translations'}</legend>
|
||||
{l s='Here you can modify translations for every line of copy inside PrestaShop.'}<br />
|
||||
{l s='First, select a section (such as Back Office or Modules), then click the flag representing the language you want to edit.'}<br /><br />
|
||||
{l s='Here you can modify translations for every line of code inside PrestaShop.'}<br />
|
||||
{l s='First, select a section (such as Back Office or Installed modules), and then click the flag representing the language you want to edit.'}<br /><br />
|
||||
<form method="get" action="index.php" id="typeTranslationForm">
|
||||
<input type="hidden" name="controller" value="AdminTranslations" />
|
||||
<input type="hidden" name="lang" id="translation_lang" value="0" />
|
||||
@@ -117,7 +117,7 @@
|
||||
<form action="{$url_submit}" method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend>
|
||||
<img src="../img/admin/import.gif" />{l s='Import a language pack manually.'}
|
||||
<img src="../img/admin/import.gif" />{l s='Import a language pack manually'}
|
||||
</legend>
|
||||
<div id="submitImportContent">
|
||||
<p>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
|
||||
<b>{$limit_warning['post.max_vars']}</b> {l s='for suhosin.post.max_vars.'}<br/>
|
||||
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
|
||||
{l s='Please ask your hosting provider to increase the suhosin post and request a limit of'}
|
||||
{l s='Please ask your hosting provider to increase the suhosin limit to'}
|
||||
{else}
|
||||
{l s='Warning! Your PHP configuration limits the maximum number of fields allowed in a form:'}<br/>
|
||||
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@
|
||||
|
||||
<b>{$limit_warning['post.max_vars']}</b> {l s='for suhosin.post.max_vars.'}<br/>
|
||||
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
|
||||
{l s='Please ask your hosting provider to increase the suhosin post and request a limit of'}
|
||||
{l s='Please ask your hosting provider to increase the suhosin limit to'}
|
||||
{else}
|
||||
{l s='Warning! Your PHP configuration limits the maximum number of fields allowed in a form:'}
|
||||
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
<div class="hint" style="display:block;">
|
||||
<ul style="margin-left:30px;list-style-type:disc;">
|
||||
<li>{l s='Click on the titles to open fieldsets'}.</li>
|
||||
<li>{l s='Click on titles to open fieldsets'}.</li>
|
||||
<li>{l s='Some sentences to translate use this syntax: %s... These are variables, and PrestaShop take care of replacing them before displaying your translation. You must leave these in your translations, and place them appropriately in your sentence.' sprintf='%d, %s, %1$s, %2$d'}</li>
|
||||
</ul>
|
||||
</div><br /><br />
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@
|
||||
|
||||
<b>{$limit_warning['post.max_vars']}</b> {l s='for suhosin.post.max_vars.'}<br/>
|
||||
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
|
||||
{l s='Please ask your hosting provider to increase the suhosin post and request a limit of'}
|
||||
{l s='Please ask your hosting provider to increase the suhosin limit to'}
|
||||
{else}
|
||||
{l s='Warning! Your PHP configuration limits the maximum number of fields allowed in a form:'}<br/>
|
||||
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<div class="hint" style="display:block;">
|
||||
<ul style="margin-left:30px;list-style-type:disc;">
|
||||
<li>{l s='Click on the titles to open fieldsets'}.</li>
|
||||
<li>{l s='Click on titles to open fieldsets'}.</li>
|
||||
<li>{l s='Some sentences to translate use this syntax: %s... These are variables, and PrestaShop take care of replacing them before displaying your translation. You must leave these in your translations, and place them appropriately in your sentence.' sprintf='%d, %s, %1$s, %2$d'}</li>
|
||||
</ul>
|
||||
</div><br /><br />
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@
|
||||
|
||||
<b>{$limit_warning['post.max_vars']}</b> {l s='for suhosin.post.max_vars.'}<br/>
|
||||
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
|
||||
{l s='Please ask your hosting provider to increase the suhosin post and request a limit of'}
|
||||
{l s='Please ask your hosting provider to increase the suhosin limit to'}
|
||||
{else}
|
||||
{l s='Warning! Your PHP configuration limits the maximum number of fields allowed in a form:'}<br/>
|
||||
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
<div class="hint" style="display:block;">
|
||||
<ul style="margin-left:30px;list-style-type:disc;">
|
||||
<li>{l s='Click on the titles to open fieldsets'}.</li>
|
||||
<li>{l s='Click on titles to open fieldsets'}.</li>
|
||||
<li>{l s='Some sentences to translate use this syntax: %s... These are variables, and PrestaShop take care of replacing them before displaying your translation. You must leave these in your translations, and place them appropriately in your sentence.' sprintf='%d, %s, %1$s, %2$d'}</li>
|
||||
</ul>
|
||||
</div><br /><br />
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<td>{$currency->name} ({$currency->sign})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{l s='Products:'}</td>
|
||||
<td>{l s='Products'}</td>
|
||||
<td>{$warehouse_num_products} {l s='References:'}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<input type="hidden" name="{$input.name}" id="{$input.name}" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" />
|
||||
{else}
|
||||
{if $input.name == 'id_state'}
|
||||
<div id="contains_states" {if $contains_states}style="display:none;"{/if}>
|
||||
<div id="contains_states" {if !$contains_states}style="display:none;"{/if}>
|
||||
{/if}
|
||||
{block name="label"}
|
||||
{if isset($input.label)}<label>{$input.label} </label>{/if}
|
||||
@@ -318,7 +318,7 @@
|
||||
{if isset($input.required) && $input.required && $input.type != 'radio'} <sup>*</sup>{/if}
|
||||
{/block}{* end block input *}
|
||||
{block name="description"}
|
||||
{if isset($input.desc)}
|
||||
{if isset($input.desc) && !empty($input.desc)}
|
||||
<p class="preference_description">
|
||||
{if is_array($input.desc)}
|
||||
{foreach $input.desc as $p}
|
||||
|
||||
@@ -82,7 +82,9 @@
|
||||
{elseif isset($params.image)}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.icon)}
|
||||
<img src="../img/admin/{$tr[$key]['src']}" alt="{$tr[$key]['alt']}" title="{$tr[$key]['alt']}" />
|
||||
{if is_array($tr[$key])}
|
||||
<img src="../img/admin/{$tr[$key]['src']}" alt="{$tr[$key]['alt']}" title="{$tr[$key]['alt']}" />
|
||||
{/if}
|
||||
{elseif isset($params.price)}
|
||||
{$tr.$key}
|
||||
{elseif isset($params.float)}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*}
|
||||
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if} {if isset($tab_modules_list)}toolbarReduced{/if}">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{block name=toolbarBox}
|
||||
<ul class="cc_button">
|
||||
{foreach from=$toolbar_btn item=btn key=k}
|
||||
@@ -33,6 +33,15 @@
|
||||
<span class="process-icon-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if} {if isset($btn.class)}{$btn.class}{/if}" ></span>
|
||||
<div {if isset($btn.force_desc) && $btn.force_desc == true } class="locked" {/if}>{$btn.desc}</div>
|
||||
</a>
|
||||
{if $k == 'modules-list'}
|
||||
<div id="modules_list_container" style="display:none">
|
||||
<div style="float:right;top:-5px">
|
||||
<a href="#" onclick="$('#modules_list_container').slideUp();return false;"><img alt="X" src="../img/admin/close.png"></a>
|
||||
</div>
|
||||
<div id="modules_list_loader"><img src="../img/loader.gif" alt="" border="0"></div>
|
||||
<div id="modules_list_container_tab" style="display:none;"></div>
|
||||
</div>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
@@ -108,51 +117,13 @@
|
||||
}
|
||||
{/block}
|
||||
}
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
{/block}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">
|
||||
{if $title}
|
||||
{foreach $title as $key => $item name=title}
|
||||
{* Use strip_tags because if the string already has been through htmlentities using escape will break it *}
|
||||
<span class="breadcrumb item-{$key} ">{$item|strip_tags}
|
||||
{if !$smarty.foreach.title.last}
|
||||
<img alt=">" style="margin-right:5px" src="../img/admin/separator_breadcrumb.png" />
|
||||
{/if}
|
||||
</span>
|
||||
{/foreach}
|
||||
{else}
|
||||
|
||||
{if isset($tab_modules_open)}
|
||||
if ({$tab_modules_open})
|
||||
openModulesList();
|
||||
{/if}
|
||||
</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
{if isset($tab_modules_list)}
|
||||
<button id="modules_list_button">
|
||||
{l s='Modules list'}
|
||||
</button>
|
||||
<div class="clear"> </div>
|
||||
<div id="modules_list_container" style="display:none">
|
||||
<div style="float:right;top:-5px">
|
||||
<a href="#" onclick="$('#modules_list_container').slideUp();return false;"><img alt="X" src="../img/admin/close.png"></a>
|
||||
</div>
|
||||
<div id="modules_list_loader"><img src="../img/loader.gif" alt="" border="0"></div>
|
||||
<div id="modules_list_container_tab" style="display:none"></div>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
//<![CDATA[
|
||||
{if isset($tab_modules_open)}
|
||||
if ({$tab_modules_open})
|
||||
openModulesList();
|
||||
{/if}
|
||||
|
||||
{if isset($tab_modules_list)}
|
||||
$('#modules_list_button').bind('click', function (){
|
||||
});
|
||||
{if isset($tab_modules_list)}
|
||||
$('.process-icon-modules-list').parent('a').unbind().bind('click', function (){
|
||||
openModulesList();
|
||||
});
|
||||
|
||||
@@ -187,8 +158,28 @@
|
||||
}
|
||||
return false;
|
||||
}
|
||||
{/if}
|
||||
//]]>
|
||||
</script>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
//]]>
|
||||
</script>
|
||||
{/block}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">
|
||||
{if $title}
|
||||
{foreach $title as $key => $item name=title}
|
||||
{* Use strip_tags because if the string already has been through htmlentities using escape will break it *}
|
||||
<span class="breadcrumb item-{$key} ">{$item|strip_tags}
|
||||
{if !$smarty.foreach.title.last}
|
||||
<img alt=">" style="margin-right:5px" src="../img/admin/separator_breadcrumb.png" />
|
||||
{/if}
|
||||
</span>
|
||||
{/foreach}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -142,7 +142,7 @@ class Autoload
|
||||
do
|
||||
{
|
||||
$integrity_is_ok = false;
|
||||
file_put_contents($filename, $content);
|
||||
file_put_contents($filename, $content, LOCK_EX);
|
||||
if ($loop_protection++ > 10)
|
||||
break;
|
||||
|
||||
@@ -154,7 +154,7 @@ class Autoload
|
||||
|
||||
if (!$integrity_is_ok)
|
||||
{
|
||||
file_put_contents($filename, '<?php return array(); ?>');
|
||||
file_put_contents($filename, '<?php return array(); ?>', LOCK_EX);
|
||||
// Cannot use PrestaShopException in this context
|
||||
die('Your file '.$filename.' is corrupted. Please remove this file, a new one will be regenerated automatically');
|
||||
}
|
||||
|
||||
+1
-1
@@ -1195,7 +1195,7 @@ class CarrierCore extends ObjectModel
|
||||
$carrier_list = $available_carrier_list;
|
||||
|
||||
if (isset($warehouse_carrier_list))
|
||||
$carrier_list = array_intersect($carrier_list, $warehouse_carrier_list);
|
||||
$carrier_list = array_intersect($carrier_list, $warehouse_carrier_list);
|
||||
|
||||
if ($product->width > 0 || $product->height > 0 || $product->depth > 0 || $product->weight > 0)
|
||||
{
|
||||
|
||||
+1
-1
@@ -1701,7 +1701,7 @@ class CartCore extends ObjectModel
|
||||
if (!$this->allow_seperated_package)
|
||||
$key = 'in_stock';
|
||||
else
|
||||
$key = (!$product['out_of_stock']) ? 'in_stock' : 'out_of_stock';
|
||||
$key = $product['in_stock'] ? 'in_stock' : 'out_of_stock';
|
||||
|
||||
if (empty($product['carrier_list']))
|
||||
$product['carrier_list'] = array(0);
|
||||
|
||||
+10
-6
@@ -445,8 +445,9 @@ class CartRuleCore extends ObjectModel
|
||||
$id_cart_rule = (int)Db::getInstance()->getValue('
|
||||
SELECT crc.id_cart_rule
|
||||
FROM '._DB_PREFIX_.'cart_rule_carrier crc
|
||||
INNER JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crc.id_carrier AND c.deleted = 0)
|
||||
WHERE crc.id_cart_rule = '.(int)$this->id.'
|
||||
AND crc.id_carrier = '.(int)$context->cart->id_carrier);
|
||||
AND c.id_carrier = '.(int)$context->cart->id_carrier);
|
||||
if (!$id_cart_rule)
|
||||
return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with this carrier');
|
||||
}
|
||||
@@ -762,10 +763,11 @@ class CartRuleCore extends ObjectModel
|
||||
else
|
||||
{
|
||||
$data = Db::getInstance()->executeS('
|
||||
SELECT crc.id_cart_rule, crc.id_carrier
|
||||
SELECT crc.id_cart_rule, c.id_carrier
|
||||
FROM '._DB_PREFIX_.'cart_rule_carrier crc
|
||||
INNER JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crc.id_carrier AND c.deleted = 0)
|
||||
WHERE crc.id_cart_rule = '.(int)$this->id.'
|
||||
AND crc.id_carrier = '.(int)$context->cart->id_carrier);
|
||||
AND c.id_carrier = '.(int)$context->cart->id_carrier);
|
||||
|
||||
if ($data)
|
||||
foreach ($data as $cart_rule)
|
||||
@@ -1032,9 +1034,10 @@ class CartRuleCore extends ObjectModel
|
||||
SELECT t.*'.($i18n ? ', tl.*' : '').', IF(crt.id_'.$type.' IS NULL, 0, 1) as selected
|
||||
FROM `'._DB_PREFIX_.$type.'` t
|
||||
'.($i18n ? 'LEFT JOIN `'._DB_PREFIX_.$type.'_lang` tl ON (t.id_'.$type.' = tl.id_'.$type.' AND tl.id_lang = '.(int)Context::getContext()->language->id.')' : '').'
|
||||
LEFT JOIN (SELECT id_'.$type.' FROM `'._DB_PREFIX_.'cart_rule_'.$type.'` WHERE id_cart_rule = '.(int)$this->id.') crt ON t.id_'.$type.' = crt.id_'.$type.'
|
||||
LEFT JOIN (SELECT id_'.$type.' FROM `'._DB_PREFIX_.'cart_rule_'.$type.'` WHERE id_cart_rule = '.(int)$this->id.') crt ON t.id_'.($type == 'carrier' ? 'reference' : $type).' = crt.id_'.$type.'
|
||||
WHERE 1 '.($active_only ? ' AND t.active = 1' : '').
|
||||
$shop_list.
|
||||
$shop_list
|
||||
.(in_array($type, array('carrier', 'shop')) ? ' AND t.deleted = 0' : '').
|
||||
' ORDER BY name ASC',
|
||||
false);
|
||||
while ($row = Db::getInstance()->nextRow($resource))
|
||||
@@ -1081,6 +1084,7 @@ class CartRuleCore extends ObjectModel
|
||||
FROM '._DB_PREFIX_.'cart_rule cr
|
||||
LEFT JOIN '._DB_PREFIX_.'cart_rule_shop crs ON cr.id_cart_rule = crs.id_cart_rule
|
||||
LEFT JOIN '._DB_PREFIX_.'cart_rule_carrier crca ON cr.id_cart_rule = crca.id_cart_rule
|
||||
'.($context->cart->id_carrier ? 'INNER JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crca.id_carrier AND c.deleted = 0)' : '').'
|
||||
LEFT JOIN '._DB_PREFIX_.'cart_rule_country crco ON cr.id_cart_rule = crco.id_cart_rule
|
||||
WHERE cr.active = 1
|
||||
AND cr.code = ""
|
||||
@@ -1093,7 +1097,7 @@ class CartRuleCore extends ObjectModel
|
||||
)
|
||||
AND (
|
||||
cr.carrier_restriction = 0
|
||||
'.($context->cart->id_carrier ? 'OR crca.id_carrier = '.(int)$context->cart->id_carrier : '').'
|
||||
'.($context->cart->id_carrier ? 'OR c.id_carrier = '.(int)$context->cart->id_carrier : '').'
|
||||
)
|
||||
AND (
|
||||
cr.shop_restriction = 0
|
||||
|
||||
@@ -1161,7 +1161,7 @@ class CategoryCore extends ObjectModel
|
||||
UPDATE `'._DB_PREFIX_.'category` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_shop` cs
|
||||
ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')
|
||||
SET cs.`position` = '.(int)$i.'
|
||||
SET cs.`position` = '.(int)($i+1).'
|
||||
WHERE c.`id_parent` = '.(int)$id_category_parent.'
|
||||
AND c.`id_category` = '.(int)$result[$i]['id_category'];
|
||||
$return &= Db::getInstance()->execute($sql);
|
||||
|
||||
@@ -47,6 +47,7 @@ class ConfigurationTestCore
|
||||
'upload' => false,
|
||||
'gd' => false,
|
||||
'mysql_support' => false,
|
||||
'sessions' => false,
|
||||
'config_dir' => 'config',
|
||||
'cache_dir' => 'cache',
|
||||
'sitemap' => 'sitemap.xml',
|
||||
@@ -305,6 +306,13 @@ class ConfigurationTestCore
|
||||
return function_exists('mcrypt_encrypt');
|
||||
}
|
||||
|
||||
public static function test_sessions()
|
||||
{
|
||||
if (!$path = @ini_get('session.save_path'))
|
||||
return true;
|
||||
|
||||
return is_writable($path);
|
||||
}
|
||||
public static function test_dom()
|
||||
{
|
||||
return extension_loaded('Dom');
|
||||
|
||||
+13
-12
@@ -45,18 +45,6 @@ class DispatcherCore
|
||||
* @var array List of default routes
|
||||
*/
|
||||
public $default_routes = array(
|
||||
'layered_rule' => array(
|
||||
'controller' => 'category',
|
||||
'rule' => '{id}-{rewrite}{/:selected_filters}',
|
||||
'keywords' => array(
|
||||
'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'),
|
||||
/* Selected filters is used by the module blocklayered */
|
||||
'selected_filters' => array('regexp' => '.*', 'param' => 'selected_filters'),
|
||||
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
|
||||
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
|
||||
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
|
||||
),
|
||||
),
|
||||
'category_rule' => array(
|
||||
'controller' => 'category',
|
||||
'rule' => '{id}-{rewrite}',
|
||||
@@ -136,6 +124,19 @@ class DispatcherCore
|
||||
'tags' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
|
||||
),
|
||||
),
|
||||
// Must be after the product and category rules in order to avoid conflict
|
||||
'layered_rule' => array(
|
||||
'controller' => 'category',
|
||||
'rule' => '{id}-{rewrite}{/:selected_filters}',
|
||||
'keywords' => array(
|
||||
'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'),
|
||||
/* Selected filters is used by the module blocklayered */
|
||||
'selected_filters' => array('regexp' => '.*', 'param' => 'selected_filters'),
|
||||
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
|
||||
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
|
||||
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -292,54 +292,45 @@ class LocalizationPackCore
|
||||
foreach ($xml->languages->language as $data)
|
||||
{
|
||||
$attributes = $data->attributes();
|
||||
if (Language::getIdByIso($attributes['iso_code']))
|
||||
continue;
|
||||
$native_lang = Language::getLanguages();
|
||||
$native_iso_code = array();
|
||||
foreach ($native_lang as $lang)
|
||||
$native_iso_code[] = $lang['iso_code'];
|
||||
// if we are not in an installation context or if the pack is not available in the local directory
|
||||
if (!$install_mode || !in_array((string)$attributes['iso_code'], $native_iso_code))
|
||||
if (Language::getIdByIso($attributes['iso_code']) && !$install_mode)
|
||||
continue;
|
||||
|
||||
$errno = 0;
|
||||
$errstr = '';
|
||||
if (!$lang_pack_link = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$attributes['iso_code']))
|
||||
$this->_errors[] = Tools::displayError('Archive cannot be downloaded from prestashop.com.');
|
||||
elseif (!$lang_pack = Tools::jsonDecode($lang_pack_link))
|
||||
$this->_errors[] = Tools::displayError('Error occurred when language was checked according to your Prestashop version.');
|
||||
elseif ($content = Tools::file_get_contents('http://translations.prestashop.com/download/lang_packs/gzip/'.$lang_pack->version.'/'.$attributes['iso_code'].'.gzip'))
|
||||
{
|
||||
$errno = 0;
|
||||
$errstr = '';
|
||||
if (!@fsockopen('api.prestashop.com', 80, $errno, $errstr, 5))
|
||||
$this->_errors[] = Tools::displayError('Archive cannot be downloaded from prestashop.com.');
|
||||
elseif (!($lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$attributes['iso_code']))))
|
||||
$this->_errors[] = Tools::displayError('Error occurred when language was checked according to your Prestashop version.');
|
||||
elseif ($content = Tools::file_get_contents('http://translations.prestashop.com/download/lang_packs/gzip/'.$lang_pack->version.'/'.$attributes['iso_code'].'.gzip'))
|
||||
$file = _PS_TRANSLATIONS_DIR_.$attributes['iso_code'].'.gzip';
|
||||
if (file_put_contents($file, $content))
|
||||
{
|
||||
$file = _PS_TRANSLATIONS_DIR_.$attributes['iso_code'].'.gzip';
|
||||
if (file_put_contents($file, $content))
|
||||
$gz = new Archive_Tar($file, true);
|
||||
$files_list = $gz->listContent();
|
||||
|
||||
if (!$gz->extract(_PS_TRANSLATIONS_DIR_.'../', false))
|
||||
{
|
||||
$gz = new Archive_Tar($file, true);
|
||||
$files_list = $gz->listContent();
|
||||
|
||||
if (!$gz->extract(_PS_TRANSLATIONS_DIR_.'../', false))
|
||||
{
|
||||
$this->_errors[] = Tools::displayError('Cannot decompress the translation file for the following language: ').(string)$attributes['iso_code'];
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
AdminTranslationsController::checkAndAddMailsFiles($attributes['iso_code'], $files_list);
|
||||
AdminTranslationsController::addNewTabs($attributes['iso_code'], $files_list);
|
||||
}
|
||||
|
||||
if (!Language::checkAndAddLanguage((string)$attributes['iso_code']))
|
||||
{
|
||||
$this->_errors[] = Tools::displayError('An error occurred while creating the language: ').(string)$attributes['iso_code'];
|
||||
return false;
|
||||
}
|
||||
|
||||
@unlink($file);
|
||||
$this->_errors[] = Tools::displayError('Cannot decompress the translation file for the following language: ').(string)$attributes['iso_code'];
|
||||
return false;
|
||||
}
|
||||
else
|
||||
$this->_errors[] = Tools::displayError('Server does not have permissions for writing.');
|
||||
{
|
||||
AdminTranslationsController::checkAndAddMailsFiles($attributes['iso_code'], $files_list);
|
||||
AdminTranslationsController::addNewTabs($attributes['iso_code'], $files_list);
|
||||
}
|
||||
if (!Language::checkAndAddLanguage((string)$attributes['iso_code']))
|
||||
{
|
||||
$this->_errors[] = Tools::displayError('An error occurred while creating the language: ').(string)$attributes['iso_code'];
|
||||
return false;
|
||||
}
|
||||
@unlink($file);
|
||||
}
|
||||
else
|
||||
$this->_errors[] = Tools::displayError('Server does not have permissions for writing.');
|
||||
}
|
||||
}
|
||||
|
||||
// change the default language if there is only one language in the localization pack
|
||||
if (!count($this->_errors) && $install_mode && isset($attributes['iso_code']) && count($xml->languages->language) == 1)
|
||||
$this->iso_code_lang = $attributes['iso_code'];
|
||||
|
||||
+17
-19
@@ -129,20 +129,24 @@ class MediaCore
|
||||
}
|
||||
|
||||
|
||||
public static function packJS($js_content)
|
||||
public static function packJS($js_files)
|
||||
{
|
||||
if (!empty($js_content))
|
||||
if (count($js_files))
|
||||
{
|
||||
require_once(_PS_TOOL_DIR_.'js_minify/jsmin.php');
|
||||
try {
|
||||
$js_content = JSMin::minify($js_content);
|
||||
} catch (Exception $e) {
|
||||
if (_PS_MODE_DEV_)
|
||||
try
|
||||
{
|
||||
require_once(_PS_TOOL_DIR_.'closure/closure.php');
|
||||
$closure = new PhpClosure($js_files);
|
||||
return $closure->getCompiledCode();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
if (_PS_MODE_DEV_ === true)
|
||||
echo $e->getMessage();
|
||||
return $js_content;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return $js_content;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function minifyCSS($css_content, $fileuri = false, &$import_url = array())
|
||||
@@ -535,16 +539,10 @@ class MediaCore
|
||||
// aggregate and compress js files content, write new caches files
|
||||
if ($js_files_date > $compressed_js_file_date)
|
||||
{
|
||||
$content = '';
|
||||
foreach ($js_files_infos as $file_infos)
|
||||
{
|
||||
if (file_exists($file_infos['path']))
|
||||
$content .= file_get_contents($file_infos['path']).';';
|
||||
else
|
||||
$compressed_js_files_not_found[] = $file_infos['path'];
|
||||
}
|
||||
$content = Media::packJS($content);
|
||||
|
||||
$content = Media::packJS($js_files_infos);
|
||||
if ($content === false)
|
||||
return false;
|
||||
|
||||
if (!empty($compressed_js_files_not_found))
|
||||
$content = '/* WARNING ! file(s) not found : "'.
|
||||
implode(',', $compressed_js_files_not_found).
|
||||
|
||||
+1
-1
@@ -382,7 +382,7 @@ class SearchCore
|
||||
{
|
||||
// Adjust the limit to get only "whole" products, in every languages (and at least one)
|
||||
$max_possibilities = $total_languages * count(Shop::getShops(true));
|
||||
$limit = max(1, floor($limit / $max_possibilities) * $max_possibilities);
|
||||
$limit = max($max_possibilities, floor($limit / $max_possibilities) * $max_possibilities);
|
||||
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT p.id_product, pl.id_lang, pl.id_shop, pl.name pname, p.reference, p.ean13, p.upc,
|
||||
|
||||
+8
-15
@@ -1799,20 +1799,14 @@ exit;
|
||||
*/
|
||||
public static function displayAsDeprecated($message = null)
|
||||
{
|
||||
if (_PS_DISPLAY_COMPATIBILITY_WARNING_)
|
||||
{
|
||||
$backtrace = debug_backtrace();
|
||||
$callee = next($backtrace);
|
||||
if ($message)
|
||||
trigger_error($message, E_USER_WARNING);
|
||||
else
|
||||
{
|
||||
trigger_error('Function <b>'.$callee['function'].'()</b> is deprecated in <b>'.$callee['file'].'</b> on line <b>'.$callee['line'].'</b><br />', E_USER_WARNING);
|
||||
$message = 'The function '.$callee['function'].' (Line '.$callee['line'].') is deprecated and will be removed in the next major version.';
|
||||
}
|
||||
$class = isset($callee['class']) ? $callee['class'] : null;
|
||||
Logger::addLog($message, 3, $class);
|
||||
}
|
||||
if ($message === null)
|
||||
$message = 'The function '.$callee['function'].' (Line '.$callee['line'].') is deprecated and will be removed in the next major version.';
|
||||
$error = 'Function <b>'.$callee['function'].'()</b> is deprecated in <b>'.$callee['file'].'</b> on line <b>'.$callee['line'].'</b><br />';
|
||||
|
||||
Tools::throwDeprecated($error, $message, $class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1824,9 +1818,8 @@ exit;
|
||||
$callee = next($backtrace);
|
||||
$error = 'Parameter <b>'.$parameter.'</b> in function <b>'.$callee['function'].'()</b> is deprecated in <b>'.$callee['file'].'</b> on line <b>'.$callee['Line'].'</b><br />';
|
||||
$message = 'The parameter '.$parameter.' in function '.$callee['function'].' (Line '.$callee['Line'].') is deprecated and will be removed in the next major version.';
|
||||
|
||||
trigger_error($message, E_WARNING);
|
||||
$class = isset($callee['class']) ? $callee['class'] : null;
|
||||
|
||||
Tools::throwDeprecated($error, $message, $class);
|
||||
}
|
||||
|
||||
@@ -1836,8 +1829,8 @@ exit;
|
||||
$callee = current($backtrace);
|
||||
$error = 'File <b>'.$callee['file'].'</b> is deprecated<br />';
|
||||
$message = 'The file '.$callee['file'].' is deprecated and will be removed in the next major version.';
|
||||
|
||||
$class = isset($callee['class']) ? $callee['class'] : null;
|
||||
|
||||
Tools::throwDeprecated($error, $message, $class);
|
||||
}
|
||||
|
||||
@@ -1845,7 +1838,7 @@ exit;
|
||||
{
|
||||
if (_PS_DISPLAY_COMPATIBILITY_WARNING_)
|
||||
{
|
||||
// trigger_error($error, E_USER_WARNING);
|
||||
trigger_error($error, E_USER_WARNING);
|
||||
Logger::addLog($message, 3, $class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,7 +477,7 @@ class AdminControllerCore extends Controller
|
||||
if (isset($value[0]) && !empty($value[0]))
|
||||
{
|
||||
if (!Validate::isDate($value[0]))
|
||||
$this->errors[] = Tools::displayError('\'From:\' date format is invalid (YYYY-MM-DD)');
|
||||
$this->errors[] = Tools::displayError('The \'From\' date format is invalid (YYYY-MM-DD)');
|
||||
else
|
||||
$sql_filter .= ' AND '.pSQL($key).' >= \''.pSQL(Tools::dateFrom($value[0])).'\'';
|
||||
}
|
||||
@@ -485,7 +485,7 @@ class AdminControllerCore extends Controller
|
||||
if (isset($value[1]) && !empty($value[1]))
|
||||
{
|
||||
if (!Validate::isDate($value[1]))
|
||||
$this->errors[] = Tools::displayError('\'To:\' date format is invalid (YYYY-MM-DD)');
|
||||
$this->errors[] = Tools::displayError('The \'To\' date format is invalid (YYYY-MM-DD)');
|
||||
else
|
||||
$sql_filter .= ' AND '.pSQL($key).' <= \''.pSQL(Tools::dateTo($value[1])).'\'';
|
||||
}
|
||||
@@ -563,7 +563,7 @@ class AdminControllerCore extends Controller
|
||||
$this->content = 'ok';
|
||||
}
|
||||
}
|
||||
$this->errors[] = Tools::displayError('An error occurred during image deletion (cannot load object).');
|
||||
$this->errors[] = Tools::displayError('An error occurred while attempting to delet the image. (cannot load object).');
|
||||
return $object;
|
||||
}
|
||||
|
||||
@@ -628,7 +628,7 @@ class AdminControllerCore extends Controller
|
||||
$res = $object->deleteImage();
|
||||
|
||||
if (!$res)
|
||||
$this->errors[] = Tools::displayError('Unable to delete associated images');
|
||||
$this->errors[] = Tools::displayError('Unable to delete associated images.');
|
||||
|
||||
$object->deleted = 1;
|
||||
if ($object->update())
|
||||
@@ -641,7 +641,7 @@ class AdminControllerCore extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting object.').
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting the object.').
|
||||
' <b>'.$this->table.'</b> '.
|
||||
Tools::displayError('(cannot load object)');
|
||||
}
|
||||
@@ -679,7 +679,7 @@ class AdminControllerCore extends Controller
|
||||
$this->beforeAdd($this->object);
|
||||
if (method_exists($this->object, 'add') && !$this->object->add())
|
||||
{
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating object.').
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating an object.').
|
||||
' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>';
|
||||
}
|
||||
/* voluntary do affectation here */
|
||||
@@ -760,7 +760,7 @@ class AdminControllerCore extends Controller
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating object.').
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating an object.').
|
||||
' <b>'.$this->table.'</b> ('.Db::getInstance()->getMsgError().')';
|
||||
}
|
||||
elseif ($this->postImage($object->id) && !count($this->errors) && $this->_redirect)
|
||||
@@ -787,7 +787,7 @@ class AdminControllerCore extends Controller
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating object.').
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating an object.').
|
||||
' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
}
|
||||
}
|
||||
@@ -814,7 +814,7 @@ class AdminControllerCore extends Controller
|
||||
|
||||
$object = new $this->className();
|
||||
if (!$object->addFieldsRequiredDatabase($fields))
|
||||
$this->errors[] = Tools::displayError('Error in updating required fields');
|
||||
$this->errors[] = Tools::displayError('An error occurred when attempting to update the required fields.');
|
||||
else
|
||||
$this->redirect_after = self::$currentIndex.'&conf=4&token='.$this->token;
|
||||
|
||||
@@ -834,10 +834,10 @@ class AdminControllerCore extends Controller
|
||||
$this->redirect_after = self::$currentIndex.'&conf=5'.$id_category.'&token='.$this->token;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status.');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.').
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').
|
||||
' <b>'.$this->table.'</b> '.
|
||||
Tools::displayError('(cannot load object)');
|
||||
|
||||
@@ -851,7 +851,7 @@ class AdminControllerCore extends Controller
|
||||
{
|
||||
if (!Validate::isLoadedObject($object = $this->loadObject()))
|
||||
{
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.').
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').
|
||||
' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
}
|
||||
elseif (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position')))
|
||||
@@ -1069,6 +1069,7 @@ class AdminControllerCore extends Controller
|
||||
'desc' => $this->l('Export')
|
||||
);
|
||||
}
|
||||
$this->addToolBarModulesListButton();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1088,7 +1089,7 @@ class AdminControllerCore extends Controller
|
||||
if (Validate::isLoadedObject($this->object))
|
||||
return $this->object;
|
||||
// throw exception
|
||||
$this->errors[] = Tools::displayError('Object cannot be loaded (not found)');
|
||||
$this->errors[] = Tools::displayError('The object cannot be loaded (or found)');
|
||||
return false;
|
||||
}
|
||||
elseif ($opt)
|
||||
@@ -1099,7 +1100,7 @@ class AdminControllerCore extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errors[] = Tools::displayError('Object cannot be loaded (identifier missing or invalid)');
|
||||
$this->errors[] = Tools::displayError('The object cannot be loaded (ithe dentifier is missing or invalid)');
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1413,7 +1414,7 @@ class AdminControllerCore extends Controller
|
||||
{
|
||||
if (!$this->viewAccess())
|
||||
{
|
||||
$this->errors[] = Tools::displayError('You do not have permission to view here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to view this.');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1466,6 +1467,7 @@ class AdminControllerCore extends Controller
|
||||
$this->filter_modules_list = $this->tab_modules_list['default_list'];
|
||||
elseif (is_array($this->tab_modules_list['slider_list']) && count($this->tab_modules_list['slider_list']))
|
||||
{
|
||||
$this->addToolBarModulesListButton();
|
||||
$this->context->smarty->assign(array(
|
||||
'tab_modules_list' => implode(',', $this->tab_modules_list['slider_list']),
|
||||
'admin_module_ajax_url' => $this->context->link->getAdminLink('AdminModules'),
|
||||
@@ -1474,6 +1476,15 @@ class AdminControllerCore extends Controller
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
protected function addToolBarModulesListButton()
|
||||
{
|
||||
if (is_array($this->tab_modules_list['slider_list']) && count($this->tab_modules_list['slider_list']))
|
||||
$this->toolbar_btn['modules-list'] = array(
|
||||
'href' => '#',
|
||||
'desc' => $this->l('Modules List')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* initialize the invalid doom page of death
|
||||
@@ -1876,7 +1887,7 @@ class AdminControllerCore extends Controller
|
||||
if ($this->tabAccess['delete'] === '1')
|
||||
$this->action = 'delete_image';
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete this.');
|
||||
}
|
||||
/* Delete object */
|
||||
elseif (isset($_GET['delete'.$this->table]))
|
||||
@@ -1884,7 +1895,7 @@ class AdminControllerCore extends Controller
|
||||
if ($this->tabAccess['delete'] === '1')
|
||||
$this->action = 'delete';
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete this.');
|
||||
}
|
||||
/* Change object statuts (active, inactive) */
|
||||
elseif ((isset($_GET['status'.$this->table]) || isset($_GET['status'])) && Tools::getValue($this->identifier))
|
||||
@@ -1892,7 +1903,7 @@ class AdminControllerCore extends Controller
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
$this->action = 'status';
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
/* Move an object */
|
||||
elseif (isset($_GET['position']))
|
||||
@@ -1900,7 +1911,7 @@ class AdminControllerCore extends Controller
|
||||
if ($this->tabAccess['edit'] == '1')
|
||||
$this->action = 'position';
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
elseif (Tools::getValue('submitAdd'.$this->table)
|
||||
|| Tools::getValue('submitAdd'.$this->table.'AndStay')
|
||||
@@ -1918,7 +1929,7 @@ class AdminControllerCore extends Controller
|
||||
$this->display = 'list';
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
// case 2: creating new entry
|
||||
else
|
||||
@@ -1932,7 +1943,7 @@ class AdminControllerCore extends Controller
|
||||
$this->display = 'list';
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to add here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to add this.');
|
||||
}
|
||||
}
|
||||
elseif (isset($_GET['add'.$this->table]))
|
||||
@@ -1943,13 +1954,13 @@ class AdminControllerCore extends Controller
|
||||
$this->display = 'add';
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to add here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to add this.');
|
||||
}
|
||||
elseif (isset($_GET['update'.$this->table]) && isset($_GET[$this->identifier]))
|
||||
{
|
||||
$this->display = 'edit';
|
||||
if ($this->tabAccess['edit'] !== '1')
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
elseif (isset($_GET['view'.$this->table]))
|
||||
{
|
||||
@@ -1959,7 +1970,7 @@ class AdminControllerCore extends Controller
|
||||
$this->action = 'view';
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to view here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to view this.');
|
||||
}
|
||||
elseif (isset($_GET['export'.$this->table]))
|
||||
{
|
||||
@@ -1976,7 +1987,7 @@ class AdminControllerCore extends Controller
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
$this->action = 'update_options';
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
elseif (Tools::isSubmit('submitFields') && $this->required_database && $this->tabAccess['add'] === '1' && $this->tabAccess['delete'] === '1')
|
||||
$this->action = 'update_fields';
|
||||
@@ -1991,7 +2002,7 @@ class AdminControllerCore extends Controller
|
||||
$this->boxes = Tools::getValue($this->table.'Box');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
break;
|
||||
}
|
||||
elseif (Tools::isSubmit('submitBulk'))
|
||||
@@ -2002,7 +2013,7 @@ class AdminControllerCore extends Controller
|
||||
$this->boxes = Tools::getValue($this->table.'Box');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2335,7 +2346,7 @@ class AdminControllerCore extends Controller
|
||||
if (($value = Tools::getValue($field)) == false && (string)$value != '0')
|
||||
if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture'))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %s is required.'),
|
||||
Tools::displayError('The %s field is required.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
||||
);
|
||||
|
||||
@@ -2354,7 +2365,7 @@ class AdminControllerCore extends Controller
|
||||
foreach ($rules['size'] as $field => $max_length)
|
||||
if (Tools::getValue($field) !== false && Tools::strlen(Tools::getValue($field)) > $max_length)
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %1$s is too long (%2$d chars max).'),
|
||||
Tools::displayError('The %1$s field is too long (%2$d chars max).'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name),
|
||||
$max_length
|
||||
);
|
||||
@@ -2382,7 +2393,7 @@ class AdminControllerCore extends Controller
|
||||
if (($value = Tools::getValue($field)) !== false && ($field != 'passwd'))
|
||||
if (!Validate::$function($value) && !empty($value))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %s is invalid.'),
|
||||
Tools::displayError('The %s field is invalid.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
||||
);
|
||||
|
||||
@@ -2391,12 +2402,12 @@ class AdminControllerCore extends Controller
|
||||
{
|
||||
if ($class_name == 'Employee' && !Validate::isPasswdAdmin($value))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %s is invalid.'),
|
||||
Tools::displayError('The %s field is invalid.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), 'passwd', $class_name)
|
||||
);
|
||||
elseif ($class_name == 'Customer' && !Validate::isPasswd($value))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %s is invalid.'),
|
||||
Tools::displayError('The %s field is invalid.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), 'passwd', $class_name)
|
||||
);
|
||||
}
|
||||
@@ -2408,7 +2419,7 @@ class AdminControllerCore extends Controller
|
||||
if (($value = Tools::getValue($field_lang.'_'.$language['id_lang'])) !== false && !empty($value))
|
||||
if (!Validate::$function($value))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %1$s (%2$s) is invalid.'),
|
||||
Tools::displayError('The %1$s field (%2$s) is invalid.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
||||
$language['name']
|
||||
);
|
||||
@@ -2625,11 +2636,11 @@ class AdminControllerCore extends Controller
|
||||
|
||||
// Evaluate the memory required to resize the image: if it's too much, you can't resize it.
|
||||
if (!ImageManager::checkImageMemoryLimit($tmp_name))
|
||||
$this->errors[] = Tools::displayError('This image cannot be loaded due to memory limit restrictions, please increase your memory_limit value on your server configuration.');
|
||||
$this->errors[] = Tools::displayError('Due to memory limit restrictions, this image cannot be loaded. Please increase your memory_limit value via your server\'s configuration settings. ');
|
||||
|
||||
// Copy new image
|
||||
if (empty($this->errors) && !ImageManager::resize($tmp_name, _PS_IMG_DIR_.$dir.$id.'.'.$this->imageType, (int)$width, (int)$height, ($ext ? $ext : $this->imageType)))
|
||||
$this->errors[] = Tools::displayError('An error occurred while uploading image.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while uploading the image.');
|
||||
|
||||
if (count($this->errors))
|
||||
return false;
|
||||
@@ -2681,7 +2692,7 @@ class AdminControllerCore extends Controller
|
||||
|
||||
if ($result)
|
||||
$this->redirect_after = self::$currentIndex.'&conf=2&token='.$this->token;
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting selection.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting this selection.');
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -327,15 +327,19 @@ abstract class ControllerCore
|
||||
foreach ($name as $plugin)
|
||||
{
|
||||
$plugin_path = Media::getJqueryPluginPath($plugin, $folder);
|
||||
$this->addJS($plugin_path['js']);
|
||||
$this->addCSS($plugin_path['css']);
|
||||
if(!empty($plugin_path['js']))
|
||||
$this->addJS($plugin_path['js']);
|
||||
if(!empty($plugin_path['css']))
|
||||
$this->addCSS($plugin_path['css']);
|
||||
}
|
||||
}
|
||||
else
|
||||
$plugin_path = Media::getJqueryPluginPath($name, $folder);
|
||||
|
||||
$this->addCSS($plugin_path['css']);
|
||||
$this->addJS($plugin_path['js']);
|
||||
if(!empty($plugin_path['css']))
|
||||
$this->addCSS($plugin_path['css']);
|
||||
if(!empty($plugin_path['js']))
|
||||
$this->addJS($plugin_path['js']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -452,7 +452,8 @@ class FrontControllerCore extends Controller
|
||||
$this->css_files = Media::cccCSS($this->css_files);
|
||||
//JS compressor management
|
||||
if (Configuration::get('PS_JS_THEME_CACHE'))
|
||||
$this->js_files = Media::cccJs($this->js_files);
|
||||
if ($js_files = Media::cccJs($this->js_files))
|
||||
$this->js_files = $js_files;
|
||||
}
|
||||
|
||||
// Call hook before assign of css_files and js_files in order to include correctly all css and javascript files
|
||||
@@ -515,7 +516,8 @@ class FrontControllerCore extends Controller
|
||||
$this->css_files = Media::cccCSS($this->css_files);
|
||||
//JS compressor management
|
||||
if (Configuration::get('PS_JS_THEME_CACHE'))
|
||||
$this->js_files = Media::cccJs($this->js_files);
|
||||
if ($js_files = Media::cccJs($this->js_files))
|
||||
$this->js_files = $js_files;
|
||||
}
|
||||
|
||||
$this->context->smarty->assign('css_files', $this->css_files);
|
||||
@@ -701,13 +703,13 @@ class FrontControllerCore extends Controller
|
||||
public function setMobileMedia()
|
||||
{
|
||||
$this->addjquery();
|
||||
$this->addJS(_THEME_MOBILE_JS_DIR_.'jquery.mobile-1.2.0.js');
|
||||
$this->addJS(_THEME_MOBILE_JS_DIR_.'jquery.mobile-1.3.0.min.js');
|
||||
$this->addJS(_THEME_MOBILE_JS_DIR_.'jqm-docs.js');
|
||||
$this->addJS(_PS_JS_DIR_.'tools.js');
|
||||
$this->addJS(_THEME_MOBILE_JS_DIR_.'global.js');
|
||||
$this->addjqueryPlugin('fancybox');
|
||||
|
||||
$this->addCSS(_THEME_MOBILE_CSS_DIR_.'jquery.mobile-1.2.0.min.css', 'all');
|
||||
$this->addCSS(_THEME_MOBILE_CSS_DIR_.'jquery.mobile-1.3.0.min.css', 'all');
|
||||
$this->addCSS(_THEME_MOBILE_CSS_DIR_.'jqm-docs.css', 'all');
|
||||
$this->addCSS(_THEME_MOBILE_CSS_DIR_.'global.css', 'all');
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ class HelperCore
|
||||
$use_shop_context = false)
|
||||
{
|
||||
$translations = array(
|
||||
'selected' => $this->l('selected'),
|
||||
'selected' => $this->l('Selected'),
|
||||
'Collapse All' => $this->l('Collapse All'),
|
||||
'Expand All' => $this->l('Expand All'),
|
||||
'Check All' => $this->l('Check All'),
|
||||
|
||||
@@ -39,7 +39,7 @@ class PDFGeneratorCore extends TCPDF
|
||||
public $content;
|
||||
public $font;
|
||||
|
||||
public $font_by_lang = array('ja' => 'cid0jp', 'ru' => 'freeserif', 'el' => 'freeserif', 'vn' => 'dejavusans', 'pl' => 'dejavusans');
|
||||
public $font_by_lang = array('ja' => 'cid0jp', 'bg' => 'freeserif', 'ru' => 'freeserif', 'el' => 'freeserif', 'vn' => 'dejavusans', 'pl' => 'dejavusans');
|
||||
|
||||
|
||||
public function __construct($use_cache = false)
|
||||
|
||||
@@ -367,9 +367,11 @@ class StockAvailableCore extends ObjectModel
|
||||
*/
|
||||
public function add($autodate = true, $null_values = false)
|
||||
{
|
||||
if (!parent::add($autodate, $null_values))
|
||||
if (!$result = parent::add($autodate, $null_values))
|
||||
return false;
|
||||
$this->postSave();
|
||||
|
||||
$result &= $this->postSave();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -378,9 +380,11 @@ class StockAvailableCore extends ObjectModel
|
||||
*/
|
||||
public function update($null_values = false)
|
||||
{
|
||||
if (!parent::update($null_values))
|
||||
if (!$result = parent::update($null_values))
|
||||
return false;
|
||||
return $this->postSave();
|
||||
|
||||
$result &= $this->postSave();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -134,7 +134,7 @@ class AdminAccessControllerCore extends AdminController
|
||||
if (_PS_MODE_DEMO_)
|
||||
throw new PrestaShopException(Tools::displayError('This functionality has been disabled.'));
|
||||
if ($this->tabAccess['edit'] != '1')
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit here.'));
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit this.'));
|
||||
|
||||
if (Tools::isSubmit('submitAddAccess'))
|
||||
{
|
||||
@@ -194,7 +194,7 @@ class AdminAccessControllerCore extends AdminController
|
||||
if (_PS_MODE_DEMO_)
|
||||
throw new PrestaShopException(Tools::displayError('This functionality has been disabled.'));
|
||||
if ($this->tabAccess['edit'] != '1')
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit here.'));
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit this.'));
|
||||
|
||||
if (Tools::isSubmit('changeModuleAccess'))
|
||||
{
|
||||
|
||||
@@ -126,7 +126,7 @@ class AdminAddressesControllerCore extends AdminController
|
||||
'name' => 'phone_mobile',
|
||||
'size' => 33,
|
||||
'required' => false,
|
||||
'desc' => sprintf($this->l('You must register at least one phone number %s'), '<sup>*</sup>')
|
||||
'desc' => Configuration::get('PS_ONE_PHONE_AT_LEAST')? sprintf($this->l('You must register at least one phone number %s'), '<sup>*</sup>') : ''
|
||||
),
|
||||
array(
|
||||
'type' => 'textarea',
|
||||
@@ -278,7 +278,7 @@ class AdminAddressesControllerCore extends AdminController
|
||||
{
|
||||
$temp_fields[] = array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Country:'),
|
||||
'label' => $this->l('Country'),
|
||||
'name' => 'id_country',
|
||||
'required' => false,
|
||||
'default_value' => (int)$this->context->country->id,
|
||||
@@ -318,7 +318,7 @@ class AdminAddressesControllerCore extends AdminController
|
||||
if (Validate::isLoadedObject($customer))
|
||||
$_POST['id_customer'] = $customer->id;
|
||||
else
|
||||
$this->errors[] = Tools::displayError('This e-mail address is not registered.');
|
||||
$this->errors[] = Tools::displayError('This email address is not registered.');
|
||||
}
|
||||
else if ($id_customer = Tools::getValue('id_customer'))
|
||||
{
|
||||
@@ -331,14 +331,14 @@ class AdminAddressesControllerCore extends AdminController
|
||||
else
|
||||
$this->errors[] = Tools::displayError('Unknown customer');
|
||||
if (Country::isNeedDniByCountryId(Tools::getValue('id_country')) && !Tools::getValue('dni'))
|
||||
$this->errors[] = Tools::displayError('Identification number is incorrect or has already been used.');
|
||||
$this->errors[] = Tools::displayError('The identification number is incorrect or has already been used.');
|
||||
|
||||
/* If the selected country does not contain states */
|
||||
$id_state = (int)Tools::getValue('id_state');
|
||||
$id_country = (int)Tools::getValue('id_country');
|
||||
$country = new Country((int)$id_country);
|
||||
if ($country && !(int)$country->contains_states && $id_state)
|
||||
$this->errors[] = Tools::displayError('You have selected a state for a country that does not contain states.');
|
||||
$this->errors[] = Tools::displayError('You\'ve selected a state for a country that does not contain states.');
|
||||
|
||||
/* If the selected country contains states, then a state have to be selected */
|
||||
if ((int)$country->contains_states && !$id_state)
|
||||
@@ -357,16 +357,19 @@ class AdminAddressesControllerCore extends AdminController
|
||||
$zip_regexp = str_replace('L', '[a-zA-Z]', $zip_regexp);
|
||||
$zip_regexp = str_replace('C', $country->iso_code, $zip_regexp);
|
||||
if (!preg_match($zip_regexp, $postcode))
|
||||
$this->errors[] = Tools::displayError('Your Postal Code/Zip Code is incorrect.').'<br />'.
|
||||
Tools::displayError('Must be typed as follows:').' '.
|
||||
$this->errors[] = Tools::displayError('Your Postal / Zip Code is incorrect.').'<br />'.
|
||||
Tools::displayError('It must be entered as follows:').' '.
|
||||
str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $zip_code_format)));
|
||||
}
|
||||
else if ($zip_code_format)
|
||||
$this->errors[] = Tools::displayError('Postal Code/Zip Code required.');
|
||||
$this->errors[] = Tools::displayError('A Postal / Zip Code required.');
|
||||
else if ($postcode && !preg_match('/^[0-9a-zA-Z -]{4,9}$/ui', $postcode))
|
||||
$this->errors[] = Tools::displayError('Your Postal Code/Zip Code is incorrect.');
|
||||
$this->errors[] = Tools::displayError('Your Postal / Zip Code is incorrect.');
|
||||
}
|
||||
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !Tools::getValue('phone') && !Tools::getValue('phone_mobile'))
|
||||
$this->errors[] = Tools::displayError('You must register at least one phone number.');
|
||||
|
||||
/* If this address come from order's edition and is the same as the other one (invoice or delivery one)
|
||||
** we delete its id_address to force the creation of a new one */
|
||||
if ((int)Tools::getValue('id_order'))
|
||||
|
||||
@@ -94,7 +94,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
'validation' => 'isInt',
|
||||
'cast' => 'intval',
|
||||
'type' => 'text',
|
||||
'suffix' => $this->l('Megabytes:'),
|
||||
'suffix' => $this->l('megabytes'),
|
||||
'default' => '2'
|
||||
),
|
||||
'PS_LIMIT_UPLOAD_FILE_VALUE' => array(
|
||||
@@ -103,7 +103,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
'validation' => 'isInt',
|
||||
'cast' => 'intval',
|
||||
'type' => 'text',
|
||||
'suffix' => $this->l('Megabytes:'),
|
||||
'suffix' => $this->l('megabytes'),
|
||||
'default' => '1'
|
||||
),
|
||||
'PS_LIMIT_UPLOAD_IMAGE_VALUE' => array(
|
||||
@@ -112,7 +112,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
'validation' => 'isInt',
|
||||
'cast' => 'intval',
|
||||
'type' => 'text',
|
||||
'suffix' => $this->l('Megabytes:'),
|
||||
'suffix' => $this->l('megabytes'),
|
||||
'default' => '1'
|
||||
),
|
||||
),
|
||||
|
||||
@@ -85,7 +85,7 @@ class AdminAttributeGeneratorControllerCore extends AdminController
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
$this->action = 'generate';
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to add here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to add this.');
|
||||
}
|
||||
parent::initProcess();
|
||||
}
|
||||
@@ -100,7 +100,7 @@ class AdminAttributeGeneratorControllerCore extends AdminController
|
||||
public function processGenerate()
|
||||
{
|
||||
if (!is_array(Tools::getValue('options')))
|
||||
$this->errors[] = Tools::displayError('Please choose at least 1 attribute.');
|
||||
$this->errors[] = Tools::displayError('Please select at least one attribute.');
|
||||
else
|
||||
{
|
||||
$tab = array_values(Tools::getValue('options'));
|
||||
@@ -134,7 +134,7 @@ class AdminAttributeGeneratorControllerCore extends AdminController
|
||||
Tools::redirectAdmin($this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)Tools::getValue('id_product').'&addproduct&key_tab=Combinations&conf=4');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('Unable to initialize parameters, combination is missing or object cannot be loaded.');
|
||||
$this->errors[] = Tools::displayError('Unable to initialize these parameters. A combination is missing or an object cannot be loaded.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
$this->lang = true;
|
||||
|
||||
if (!Validate::isLoadedObject($obj = new AttributeGroup((int)$id)))
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
|
||||
$this->fields_list = array(
|
||||
'id_attribute' => array(
|
||||
@@ -591,9 +591,9 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
if (Tools::getValue('updateattribute') || Tools::isSubmit('deleteattribute') || Tools::isSubmit('submitAddattribute'))
|
||||
{
|
||||
if ($this->tabAccess['edit'] !== '1')
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
else if (!$object = new Attribute((int)Tools::getValue($this->identifier)))
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
|
||||
if (Tools::getValue('position') !== false && Tools::getValue('id_attribute'))
|
||||
{
|
||||
@@ -606,7 +606,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
else if (Tools::isSubmit('deleteattribute') && Tools::getValue('id_attribute'))
|
||||
{
|
||||
if (!$object->delete())
|
||||
$this->errors[] = Tools::displayError('Failed to delete attribute.');
|
||||
$this->errors[] = Tools::displayError('Failed to delete the attribute.');
|
||||
else
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=1&token='.Tools::getAdminTokenLite('AdminAttributesGroups'));
|
||||
}
|
||||
@@ -640,13 +640,13 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
$object = new $this->className();
|
||||
if ($object->deleteSelection($_POST[$this->table.'Box']))
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=2'.'&token='.$this->token);
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting selection.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting this selection.');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete this.');
|
||||
// clean position after delete
|
||||
AttributeGroup::cleanPositions();
|
||||
}
|
||||
|
||||
@@ -166,21 +166,21 @@ class AdminCarriersControllerCore extends AdminController
|
||||
<li>'.$this->l('Fill in the fields and click "Save."').'</li>
|
||||
<li>'.
|
||||
$this->l('You need to set a price range -- or weight range -- for which the new carrier will be available.').' '.
|
||||
$this->l('Under the "Shipping" menu, click either "Price Ranges" or "Weight Ranges".').'
|
||||
$this->l('Under the "Shipping" menu, click either "Price ranges" or "Weight ranges.".').'
|
||||
</li>
|
||||
<li>'.$this->l('Click "Add New."').'</li>
|
||||
<li>'.
|
||||
$this->l('Select the name of the carrier before defining the price or weight range.').' '.
|
||||
$this->l('For example, the carrier can be made available for a weight range between 0 and 5lbs. Another carrier can have a range between 5 and 10lbs.').'
|
||||
</li>
|
||||
<li>'.$this->l('When you are done, click "Save."').'</li>
|
||||
<li>'.$this->l('When you\'re done, click "Save."').'</li>
|
||||
<li>'.$this->l('Click on the "Shipping" menu.').'</li>
|
||||
<li>'.
|
||||
$this->l('You need to set the fees that will be applied for this carrier.').' '.
|
||||
$this->l('At the bottom on the page -- in the "Fees" section -- select the name of the carrier.').'
|
||||
</li>
|
||||
<li>'.$this->l('For each zone, enter a price and then click "Save."').'</li>
|
||||
<li>'.$this->l('You\'re all set! The new carrier will be displayed to your customers.').'</li>
|
||||
<li>'.$this->l('You\'re all set! The new carrier will now be displayed to customers.').'</li>
|
||||
</ul>'
|
||||
);
|
||||
$this->_select = 'b.*';
|
||||
@@ -501,10 +501,10 @@ class AdminCarriersControllerCore extends AdminController
|
||||
Tools::redirectAdmin(self::$currentIndex.'&id_'.$this->table.'='.$current_carrier->id.'&conf=4&token='.$this->token);
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating object.').' <b>'.$this->table.'</b>';
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating an object.').' <b>'.$this->table.'</b>';
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
} catch (PrestaShopException $e) {
|
||||
$this->errors[] = $e->getMessage();
|
||||
}
|
||||
@@ -531,10 +531,10 @@ class AdminCarriersControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating object.').' <b>'.$this->table.'</b>';
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating an object.').' <b>'.$this->table.'</b>';
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to add here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to add this.');
|
||||
}
|
||||
}
|
||||
parent::postProcess();
|
||||
@@ -544,12 +544,12 @@ class AdminCarriersControllerCore extends AdminController
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
{
|
||||
if (Tools::getValue('id_carrier') == Configuration::get('PS_CARRIER_DEFAULT'))
|
||||
$this->errors[] = Tools::displayError('You cannot disable the default carrier, please change your default carrier first.');
|
||||
$this->errors[] = Tools::displayError('You cannot disable the default carrier, however you can change your defeault carrier. ');
|
||||
else
|
||||
parent::postProcess();
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -646,7 +646,7 @@ class AdminCarriersControllerCore extends AdminController
|
||||
{
|
||||
$carrier = new $this->className($id);
|
||||
if (!Validate::isLoadedObject($carrier))
|
||||
die (Tools::displayError('Object cannot be loaded'));
|
||||
die (Tools::displayError('The object cannot be loaded.'));
|
||||
$zones = Zone::getZones(false);
|
||||
foreach ($zones as $zone)
|
||||
if (count($carrier->getZone($zone['id_zone'])))
|
||||
|
||||
@@ -119,13 +119,13 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
|
||||
// Idiot-proof control
|
||||
if (strtotime(Tools::getValue('date_from')) > strtotime(Tools::getValue('date_to')))
|
||||
$this->errors[] = Tools::displayError('The voucher cannot end before it begins');
|
||||
$this->errors[] = Tools::displayError('The voucher cannot end before it begins.');
|
||||
if ((int)Tools::getValue('minimum_amount') < 0)
|
||||
$this->errors[] = Tools::displayError('Minimum amount cannot be lower than 0');
|
||||
$this->errors[] = Tools::displayError('The minimum amount cannot be lower than zero.');
|
||||
if ((float)Tools::getValue('reduction_percent') < 0 || (float)Tools::getValue('reduction_percent') > 100)
|
||||
$this->errors[] = Tools::displayError('Reduction percent must be between 0% and 100%');
|
||||
if ((int)Tools::getValue('reduction_amount') < 0)
|
||||
$this->errors[] = Tools::displayError('Reduction amount cannot be lower than 0');
|
||||
$this->errors[] = Tools::displayError('Reduction amount cannot be lower than zero.');
|
||||
if (Tools::getValue('code') && ($same_code = (int)CartRule::getIdByCode(Tools::getValue('code'))) && $same_code != Tools::getValue('id_cart_rule'))
|
||||
$this->errors[] = sprintf(Tools::displayError('This cart rule code is already used (conflict with cart rule %d)'), $same_code);
|
||||
}
|
||||
@@ -451,7 +451,7 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
);
|
||||
}
|
||||
else
|
||||
return array('found' => false, 'notfound' => Tools::displayError('No product found'));
|
||||
return array('found' => false, 'notfound' => Tools::displayError('No product has been found.'));
|
||||
}
|
||||
|
||||
public function ajaxProcessSearchProducts()
|
||||
|
||||
@@ -276,7 +276,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
if (!isset($_POST[$field_id]) || empty($_POST[$field_id]))
|
||||
{
|
||||
if ($customization_field['required'])
|
||||
$errors[] = Tools::displayError('Please fill in all required fields');
|
||||
$errors[] = Tools::displayError('Please fill in all the required fields.');
|
||||
continue;
|
||||
}
|
||||
if (!Validate::isMessage($_POST[$field_id]) || empty($_POST[$field_id]))
|
||||
@@ -288,20 +288,20 @@ class AdminCartsControllerCore extends AdminController
|
||||
if (!isset($_FILES[$field_id]) || !isset($_FILES[$field_id]['tmp_name']) || empty($_FILES[$field_id]['tmp_name']))
|
||||
{
|
||||
if ($customization_field['required'])
|
||||
$errors[] = Tools::displayError('Please fill in all required fields');
|
||||
$errors[] = Tools::displayError('Please fill in all the required fields.');
|
||||
continue;
|
||||
}
|
||||
if ($error = ImageManager::validateUpload($_FILES[$field_id], (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE')))
|
||||
$errors[] = $error;
|
||||
if (!($tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES[$field_id]['tmp_name'], $tmp_name))
|
||||
$errors[] = Tools::displayError('An error occurred during the image upload.');
|
||||
$errors[] = Tools::displayError('An error occurred during the image upload process.');
|
||||
$file_name = md5(uniqid(rand(), true));
|
||||
if (!ImageManager::resize($tmp_name, _PS_UPLOAD_DIR_.$file_name))
|
||||
continue;
|
||||
elseif (!ImageManager::resize($tmp_name, _PS_UPLOAD_DIR_.$file_name.'_small', (int)Configuration::get('PS_PRODUCT_PICTURE_WIDTH'), (int)Configuration::get('PS_PRODUCT_PICTURE_HEIGHT')))
|
||||
$errors[] = Tools::displayError('An error occurred during the image upload.');
|
||||
$errors[] = Tools::displayError('An error occurred during the image upload process.');
|
||||
elseif (!chmod(_PS_UPLOAD_DIR_.$file_name, 0777) || !chmod(_PS_UPLOAD_DIR_.$file_name.'_small', 0777))
|
||||
$errors[] = Tools::displayError('An error occurred during the image upload.');
|
||||
$errors[] = Tools::displayError('An error occurred during the image upload process.');
|
||||
else
|
||||
$this->context->cart->addPictureToProduct((int)$product->id, (int)$customization_field['id_customization_field'], Product::CUSTOMIZE_FILE, $file_name);
|
||||
unlink($tmp_name);
|
||||
@@ -324,7 +324,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
if (!$this->context->cart->id)
|
||||
return;
|
||||
if ($this->context->cart->OrderExists())
|
||||
$errors[] = Tools::displayError('An order has already been placed with this cart');
|
||||
$errors[] = Tools::displayError('An order has already been placed with this cart.');
|
||||
elseif (!($id_product = (int)Tools::getValue('id_product')) || !($product = new Product((int)$id_product, true, $this->context->language->id)))
|
||||
$errors[] = Tools::displayError('Invalid product');
|
||||
elseif (!($qty = Tools::getValue('qty')) || $qty == 0)
|
||||
@@ -336,17 +336,17 @@ class AdminCartsControllerCore extends AdminController
|
||||
if (($id_product_attribute = Tools::getValue('id_product_attribute')) != 0)
|
||||
{
|
||||
if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty((int)$id_product_attribute, (int)$qty))
|
||||
$errors[] = Tools::displayError('There is not enough product in stock');
|
||||
$errors[] = Tools::displayError('There is not enough product in stock.');
|
||||
}
|
||||
else
|
||||
if (!$product->checkQty((int)$qty))
|
||||
$errors[] = Tools::displayError('There is not enough product in stock');
|
||||
$errors[] = Tools::displayError('There is not enough product in stock.');
|
||||
if (!($id_customization = (int)Tools::getValue('id_customization', 0)) && !$product->hasAllRequiredCustomizableFields())
|
||||
$errors[] = Tools::displayError('Please fill in all required fields');
|
||||
$errors[] = Tools::displayError('Please fill in all the required fields.');
|
||||
$this->context->cart->save();
|
||||
}
|
||||
else
|
||||
$errors[] = Tools::displayError('Product can\'t be added to the cart');
|
||||
$errors[] = Tools::displayError('This product cannot be added to the cart');
|
||||
|
||||
if (!count($errors))
|
||||
{
|
||||
@@ -363,7 +363,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
elseif ($qty_upd < 0)
|
||||
{
|
||||
$minimal_qty = $id_product_attribute ? Attribute::getAttributeMinimalQty((int)$id_product_attribute) : $product->minimal_quantity;
|
||||
$errors[] = sprintf(Tools::displayError('You must add a minimum of %d quantity', false), $minimal_qty);
|
||||
$errors[] = sprintf(Tools::displayError('You must add a minimum quantity of %d', false), $minimal_qty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -452,9 +452,9 @@ class AdminCartsControllerCore extends AdminController
|
||||
$cart = Cart::getCartByOrderId($id_order);
|
||||
$new_cart = $cart->duplicate();
|
||||
if (!$new_cart || !Validate::isLoadedObject($new_cart['cart']))
|
||||
$errors[] = Tools::displayError('The order cannot be renewed');
|
||||
$errors[] = Tools::displayError('The order cannot be renewed.');
|
||||
else if (!$new_cart['success'])
|
||||
$errors[] = Tools::displayError('The order cannot be renewed');
|
||||
$errors[] = Tools::displayError('The order cannot be renewed.');
|
||||
else
|
||||
{
|
||||
$this->context->cart = $new_cart['cart'];
|
||||
|
||||
@@ -102,12 +102,46 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
if (($id_category = Tools::getvalue('id_category')) && $this->action != 'select_delete')
|
||||
$this->_category = new Category($id_category);
|
||||
else
|
||||
{
|
||||
if (Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP)
|
||||
$this->_category = new Category($this->context->shop->id_category);
|
||||
else if (count(Category::getCategoriesWithoutParent()) > 1 && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) != 1)
|
||||
elseif (count(Category::getCategoriesWithoutParent()) > 1 && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) != 1)
|
||||
$this->_category = Category::getTopCategory();
|
||||
else
|
||||
$this->_category = new Category(Configuration::get('PS_HOME_CATEGORY'));
|
||||
}
|
||||
|
||||
$count_categories_without_parent = count(Category::getCategoriesWithoutParent());
|
||||
$top_category = Category::getTopCategory();
|
||||
if (Tools::isSubmit('id_category'))
|
||||
$id_parent = $this->_category->id;
|
||||
elseif (!Shop::isFeatureActive() && $count_categories_without_parent > 1)
|
||||
$id_parent = $top_category->id;
|
||||
elseif (Shop::isFeatureActive() && $count_categories_without_parent == 1)
|
||||
$id_parent = Configuration::get('PS_HOME_CATEGORY');
|
||||
elseif (Shop::isFeatureActive() && $count_categories_without_parent > 1 && Shop::getContext() != Shop::CONTEXT_SHOP)
|
||||
{
|
||||
if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) == 1)
|
||||
$id_parent = $this->context->shop->id_category;
|
||||
else
|
||||
$id_parent = $top_category->id;
|
||||
}
|
||||
else
|
||||
$id_parent = $this->context->shop->id_category;
|
||||
|
||||
$this->_select = 'sa.position position';
|
||||
$this->_filter .= ' AND `id_parent` = '.(int)$id_parent.' ';
|
||||
|
||||
if (Shop::getContext() == Shop::CONTEXT_SHOP)
|
||||
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = '.(int)$this->context->shop->id.') ';
|
||||
else
|
||||
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = a.id_shop_default) ';
|
||||
|
||||
|
||||
// we add restriction for shop
|
||||
if (Shop::getContext() == Shop::CONTEXT_SHOP && Shop::isFeatureActive())
|
||||
$this->_where = ' AND sa.`id_shop` = '.(int)Context::getContext()->shop->id;
|
||||
|
||||
// if we are not in a shop context, we remove the position column
|
||||
if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP)
|
||||
unset($this->fields_list['position']);
|
||||
@@ -145,41 +179,12 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
$this->addRowAction('add');
|
||||
$this->addRowAction('view');
|
||||
|
||||
$count_categories_without_parent = count(Category::getCategoriesWithoutParent());
|
||||
$is_multishop = Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE');
|
||||
$top_category = Category::getTopCategory();
|
||||
|
||||
if (Tools::isSubmit('id_category'))
|
||||
$id_parent = $this->_category->id;
|
||||
else if (!$is_multishop && $count_categories_without_parent > 1)
|
||||
$id_parent = $top_category->id;
|
||||
else if ($is_multishop && $count_categories_without_parent == 1)
|
||||
$id_parent = Configuration::get('PS_HOME_CATEGORY');
|
||||
else if ($is_multishop && $count_categories_without_parent > 1 && Shop::getContext() != Shop::CONTEXT_SHOP)
|
||||
if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) == 1)
|
||||
$id_parent = $this->context->shop->id_category;
|
||||
else
|
||||
$id_parent = $top_category->id;
|
||||
else
|
||||
$id_parent = $this->context->shop->id_category;
|
||||
|
||||
$this->_select = 'sa.position position';
|
||||
$this->_filter .= ' AND `id_parent` = '.(int)$id_parent.' ';
|
||||
|
||||
if (Shop::getContext() == Shop::CONTEXT_SHOP)
|
||||
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = '.(int)$this->context->shop->id.') ';
|
||||
else
|
||||
$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = a.id_shop_default) ';
|
||||
|
||||
|
||||
// we add restriction for shop
|
||||
if (Shop::getContext() == Shop::CONTEXT_SHOP && $is_multishop)
|
||||
$this->_where = ' AND sa.`id_shop` = '.(int)Context::getContext()->shop->id;
|
||||
|
||||
$count_categories_without_parent = count(Category::getCategoriesWithoutParent());
|
||||
$categories_tree = $this->_category->getParentsCategories();
|
||||
|
||||
if (empty($categories_tree)
|
||||
&& ($this->_category->id != 1 || Tools::isSubmit('id_category'))
|
||||
&& (Shop::getContext() == Shop::CONTEXT_SHOP && !$is_multishop && $count_categories_without_parent > 1))
|
||||
&& (Shop::getContext() == Shop::CONTEXT_SHOP && !Shop::isFeatureActive() && $count_categories_without_parent > 1))
|
||||
$categories_tree = array(array('name' => $this->_category->name[$this->context->language->id]));
|
||||
|
||||
asort($categories_tree);
|
||||
@@ -299,7 +304,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
$this->display = 'add';
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
|
||||
parent::initProcess();
|
||||
@@ -594,7 +599,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
return false;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete this.');
|
||||
}
|
||||
|
||||
public function processDelete()
|
||||
@@ -603,7 +608,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
if ($this->tabAccess['delete'] === '1')
|
||||
{
|
||||
if ($category->isRootCategoryForAShop())
|
||||
$this->errors[] = Tools::displayError('You cannot remove this category because a shop uses this category as a root category.');
|
||||
$this->errors[] = Tools::displayError('You cannot remove this category because one of your shops uses it as a root category.');
|
||||
else if (parent::processDelete())
|
||||
{
|
||||
$this->setDeleteMode();
|
||||
@@ -614,7 +619,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
return false;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete this.');
|
||||
}
|
||||
|
||||
public function processFatherlessProducts($id_parent)
|
||||
@@ -647,9 +652,9 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
public function processPosition()
|
||||
{
|
||||
if ($this->tabAccess['edit'] !== '1')
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
else if (!Validate::isLoadedObject($object = new Category((int)Tools::getValue($this->identifier, Tools::getValue('id_category_to_move', 1)))))
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' <b>'.
|
||||
$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
if (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position')))
|
||||
$this->errors[] = Tools::displayError('Failed to update the position.');
|
||||
|
||||
@@ -98,7 +98,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
|
||||
$this->id_object = $id_cms_category;
|
||||
if (!CMSCategory::checkBeforeMove($id_cms_category, (int)Tools::getValue('id_parent')))
|
||||
{
|
||||
$this->errors[] = Tools::displayError('CMS Category cannot be moved here');
|
||||
$this->errors[] = Tools::displayError('The CMS Category cannot be moved here.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -120,14 +120,14 @@ class AdminCmsCategoriesControllerCore extends AdminController
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=5'.$identifier.'&token='.Tools::getValue('token'));
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status.');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.')
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.')
|
||||
.' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
/* Delete object */
|
||||
elseif (Tools::isSubmit('delete'.$this->table))
|
||||
@@ -155,19 +155,19 @@ class AdminCmsCategoriesControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting object.')
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting the object.')
|
||||
.' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete this.');
|
||||
}
|
||||
elseif (Tools::isSubmit('position'))
|
||||
{
|
||||
$object = new CMSCategory((int)Tools::getValue($this->identifier, Tools::getValue('id_cms_category_to_move', 1)));
|
||||
if ($this->tabAccess['edit'] !== '1')
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
elseif (!Validate::isLoadedObject($object))
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.')
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.')
|
||||
.' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
elseif (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position')))
|
||||
$this->errors[] = Tools::displayError('Failed to update the position.');
|
||||
@@ -196,14 +196,14 @@ class AdminCmsCategoriesControllerCore extends AdminController
|
||||
$token = Tools::getAdminTokenLite('AdminCmsContent');
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=2&token='.$token.'&id_cms_category='.(int)Tools::getValue('id_cms_category'));
|
||||
}
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting selection.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting this selection.');
|
||||
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete this.');
|
||||
}
|
||||
parent::postProcess();
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ class AdminCmsControllerCore extends AdminController
|
||||
),
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l(' Save '),
|
||||
'title' => $this->l('Save'),
|
||||
'class' => 'button'
|
||||
)
|
||||
);
|
||||
@@ -256,7 +256,7 @@ class AdminCmsControllerCore extends AdminController
|
||||
$cms = new CMS((int)Tools::getValue('id_cms'));
|
||||
$cms->cleanPositions($cms->id_cms_category);
|
||||
if (!$cms->delete())
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting object.')
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting the object.')
|
||||
.' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>';
|
||||
else
|
||||
Tools::redirectAdmin(self::$currentIndex.'&id_cms_category='.$cms->id_cms_category.'&conf=1&token='.Tools::getAdminTokenLite('AdminCmsContent'));
|
||||
@@ -276,14 +276,14 @@ class AdminCmsControllerCore extends AdminController
|
||||
$token = Tools::getAdminTokenLite('AdminCmsContent');
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=2&token='.$token.'&id_cms_category='.(int)Tools::getValue('id_cms_category'));
|
||||
}
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting selection.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting this selection.');
|
||||
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete this.');
|
||||
}
|
||||
elseif (Tools::isSubmit('submitAddcms') || Tools::isSubmit('submitAddcmsAndPreview'))
|
||||
{
|
||||
@@ -295,7 +295,7 @@ class AdminCmsControllerCore extends AdminController
|
||||
$cms = new CMS();
|
||||
$this->copyFromPost($cms, 'cms');
|
||||
if (!$cms->add())
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating object.')
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating an object.')
|
||||
.' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>';
|
||||
else
|
||||
$this->updateAssoShop($cms->id);
|
||||
@@ -305,7 +305,7 @@ class AdminCmsControllerCore extends AdminController
|
||||
$cms = new CMS($id_cms);
|
||||
$this->copyFromPost($cms, 'cms');
|
||||
if (!$cms->update())
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating object.')
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating an object.')
|
||||
.' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>';
|
||||
else
|
||||
$this->updateAssoShop($cms->id);
|
||||
@@ -340,9 +340,9 @@ class AdminCmsControllerCore extends AdminController
|
||||
elseif (Tools::isSubmit('way') && Tools::isSubmit('id_cms') && (Tools::isSubmit('position')))
|
||||
{
|
||||
if ($this->tabAccess['edit'] !== '1')
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
elseif (!Validate::isLoadedObject($object = $this->loadObject()))
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.')
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.')
|
||||
.' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
elseif (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position')))
|
||||
$this->errors[] = Tools::displayError('Failed to update the position.');
|
||||
@@ -359,14 +359,14 @@ class AdminCmsControllerCore extends AdminController
|
||||
if ($object->toggleStatus())
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=5&id_cms_category='.(int)$object->id_cms_category.'&token='.Tools::getValue('token'));
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status.');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.')
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.')
|
||||
.' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
/* Delete multiple CMS content */
|
||||
elseif (Tools::isSubmit('submitBulkdeletecms'))
|
||||
@@ -385,7 +385,7 @@ class AdminCmsControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to delete this.');
|
||||
}
|
||||
else
|
||||
parent::postProcess(true);
|
||||
|
||||
@@ -55,12 +55,12 @@ class AdminContactsControllerCore extends AdminController
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Title:'),
|
||||
'label' => $this->l('Title'),
|
||||
'name' => 'name',
|
||||
'size' => 33,
|
||||
'required' => true,
|
||||
'lang' => true,
|
||||
'desc' => $this->l('Contact name (e.g. Technical Support)'),
|
||||
'desc' => $this->l('Contact name (e.g. Customer Support)'),
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
|
||||
@@ -216,7 +216,7 @@ class AdminCountriesControllerCore extends AdminController
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Need zip/postal code'),
|
||||
'label' => $this->l('Need zip/postal code:'),
|
||||
'name' => 'need_zip_code',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
@@ -236,7 +236,7 @@ class AdminCountriesControllerCore extends AdminController
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Zip/post code format'),
|
||||
'label' => $this->l('Zip/post code format:'),
|
||||
'name' => 'zip_code_format',
|
||||
'class' => 'uppercase',
|
||||
'required' => true,
|
||||
@@ -270,7 +270,7 @@ class AdminCountriesControllerCore extends AdminController
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
'desc' => $this->l('Display this country to your customer (the country will always be displayed in the back office)')
|
||||
'desc' => $this->l('Display this country to your customers (the selected country will always be displayed in the Back Office)')
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
@@ -354,13 +354,13 @@ class AdminCountriesControllerCore extends AdminController
|
||||
if (!Tools::getValue('id_'.$this->table))
|
||||
{
|
||||
if (Validate::isLanguageIsoCode(Tools::getValue('iso_code')) && Country::getByIso(Tools::getValue('iso_code')))
|
||||
$this->errors[] = Tools::displayError('This ISO code already exists, you cannot create two country with the same ISO code');
|
||||
$this->errors[] = Tools::displayError('This ISO code already exists.You cannot create two countries with the same ISO code.');
|
||||
}
|
||||
else if (Validate::isLanguageIsoCode(Tools::getValue('iso_code')))
|
||||
{
|
||||
$id_country = Country::getByIso(Tools::getValue('iso_code'));
|
||||
if (!is_null($id_country) && $id_country != Tools::getValue('id_'.$this->table))
|
||||
$this->errors[] = Tools::displayError('This ISO code already exists, you cannot create two country with the same ISO code');
|
||||
$this->errors[] = Tools::displayError('This ISO code already exists.You cannot create two countries with the same ISO code.');
|
||||
}
|
||||
|
||||
if (!count($this->errors))
|
||||
|
||||
@@ -52,7 +52,7 @@ class AdminCurrenciesControllerCore extends AdminController
|
||||
'change' => array(
|
||||
'title' => $this->l('Currency rates'),
|
||||
'image' => '../img/admin/exchangesrate.gif',
|
||||
'description' => $this->l('Use PrestaShop\'s webservice to update your currency exchange rates. Please use caution, rates are provided as-is.'),
|
||||
'description' => $this->l('Use PrestaShop\'s webservice to update your currency exchange rates. Please use caution, however, rates are provided as-is.'),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Update currency rates'),
|
||||
'class' => 'button',
|
||||
@@ -135,11 +135,11 @@ class AdminCurrenciesControllerCore extends AdminController
|
||||
'size' => 3,
|
||||
'maxlength' => 11,
|
||||
'required' => true,
|
||||
'desc' => $this->l('Conversion rate from one unit of your shop\'s default currency (for example, 1€) to this currency. For example, if the default currency is euros and this currency is dollars, type \'1.20\'').' 1€ = $1.20',
|
||||
'desc' => $this->l('Conversion rates are calculated from one unit of your shop\'s default currency. For example, if the default currency is euros and your chosen currency is dollars, type "1.20"').' 1€ = $1.20',
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Conversion rate from one unit of your shop\'s default currency (for example, 1 Euro) to this currency. For example, if the default currency is Euros and this currency is Dollars, type \'1.20\''),
|
||||
'label' => $this->l('Currency format:'),
|
||||
'name' => 'format',
|
||||
'size' => 3,
|
||||
'maxlength' => 11,
|
||||
@@ -249,7 +249,7 @@ class AdminCurrenciesControllerCore extends AdminController
|
||||
return true;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting object.').'
|
||||
$this->errors[] = Tools::displayError('An error occurred while deleting the object.').'
|
||||
<b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
|
||||
return false;
|
||||
@@ -265,7 +265,7 @@ class AdminCurrenciesControllerCore extends AdminController
|
||||
return true;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.').'
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').'
|
||||
<b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
|
||||
return false;
|
||||
@@ -342,10 +342,10 @@ class AdminCurrenciesControllerCore extends AdminController
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
$this->action = 'exchangeRates';
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
if (Tools::isSubmit('submitAddcurrency') && !Tools::getValue('id_currency') && Currency::exists(Tools::getValue('iso_code'), Tools::getValue('iso_code_num')))
|
||||
$this->errors[] = Tools::displayError('This currency already exist.');
|
||||
$this->errors[] = Tools::displayError('This currency already exists.');
|
||||
parent::initProcess();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class AdminCustomerPreferencesControllerCore extends AdminController
|
||||
),
|
||||
'PS_PASSWD_TIME_FRONT' => array(
|
||||
'title' => $this->l('Regenerate password'),
|
||||
'desc' => $this->l('Minimum time requirted to to regenerate a password.'),
|
||||
'desc' => $this->l('Minimum time required to regenerate a password.'),
|
||||
'validation' => 'isUnsignedInt',
|
||||
'cast' => 'intval',
|
||||
'size' => 5,
|
||||
|
||||
@@ -67,7 +67,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
'tmpTableFilter' => true,
|
||||
),
|
||||
'email' => array(
|
||||
'title' => $this->l('Email:'),
|
||||
'title' => $this->l('Email'),
|
||||
'width' => 100,
|
||||
'filter_key' => 'a!email',
|
||||
),
|
||||
@@ -256,8 +256,8 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$params = array(
|
||||
$this->l('Total threads') => $all = CustomerThread::getTotalCustomerThreads(),
|
||||
$this->l('Threads pending') => $pending = CustomerThread::getTotalCustomerThreads('status LIKE "%pending%"'),
|
||||
$this->l('Total customer messages') => CustomerMessage::getTotalCustomerMessages('id_employee = 0'),
|
||||
$this->l('Total employee messages') => CustomerMessage::getTotalCustomerMessages('id_employee != 0'),
|
||||
$this->l('Total number of customer messages') => CustomerMessage::getTotalCustomerMessages('id_employee = 0'),
|
||||
$this->l('Total number of employee messages') => CustomerMessage::getTotalCustomerMessages('id_employee != 0'),
|
||||
$this->l('Unread threads') => $unread = CustomerThread::getTotalCustomerThreads('status = "open"'),
|
||||
$this->l('Closed threads') => $all - ($unread + $pending)
|
||||
);
|
||||
@@ -368,7 +368,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->errors[] = '<div class="alert error">'.Tools::displayError('E-mail invalid.').'</div>';
|
||||
$this->errors[] = '<div class="alert error">'.Tools::displayError('The email address is invalid.').'</div>';
|
||||
}
|
||||
if (Tools::isSubmit('submitReply'))
|
||||
{
|
||||
@@ -380,7 +380,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$cm->message = Tools::htmlentitiesutf8(Tools::getValue('reply_message'));
|
||||
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
|
||||
if (isset($_FILES) && !empty($_FILES['joinFile']['name']) && $_FILES['joinFile']['error'] != 0)
|
||||
$this->errors[] = Tools::displayError('An error occurred with the file upload.');
|
||||
$this->errors[] = Tools::displayError('An error occurred during the file upload process.');
|
||||
elseif ($cm->add())
|
||||
{
|
||||
$file_attachment = null;
|
||||
@@ -424,7 +424,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
);
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred, your message was not sent. Please contact your system administrator.');
|
||||
$this->errors[] = Tools::displayError('An error occurred. Your message was not sent. Please contact your system administrator.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
public function updateOptionPsSavImapOpt($value)
|
||||
{
|
||||
if ($this->tabAccess['edit'] != '1')
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit here.'));
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit this.'));
|
||||
|
||||
if (!$this->errors && $value)
|
||||
Configuration::updateValue('PS_SAV_IMAP_OPT', implode('', $value));
|
||||
@@ -668,7 +668,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
public function ajaxProcessMarkAsRead()
|
||||
{
|
||||
if ($this->tabAccess['edit'] != '1')
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit here.'));
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit this.'));
|
||||
|
||||
$id_thread = Tools::getValue('id_thread');
|
||||
$messages = CustomerThread::getMessageCustomerThreads($id_thread);
|
||||
@@ -679,7 +679,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
public function ajaxProcessSyncImap()
|
||||
{
|
||||
if ($this->tabAccess['edit'] != '1')
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit here.'));
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit this.'));
|
||||
|
||||
if (Tools::isSubmit('syncImapMail'))
|
||||
{
|
||||
|
||||
@@ -82,7 +82,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'width' => 20
|
||||
),
|
||||
'id_gender' => array(
|
||||
'title' => $this->l('Titles'),
|
||||
'title' => $this->l('Title'),
|
||||
'width' => 70,
|
||||
'align' => 'center',
|
||||
'icon' => $genders_icon,
|
||||
@@ -92,7 +92,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'filter_key' => 'a!id_gender',
|
||||
),
|
||||
'lastname' => array(
|
||||
'title' => $this->l('Last Name'),
|
||||
'title' => $this->l('Last name'),
|
||||
'width' => 'auto'
|
||||
),
|
||||
'firstname' => array(
|
||||
@@ -205,21 +205,21 @@ class AdminCustomersControllerCore extends AdminController
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
$this->action = 'guest_to_customer';
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
elseif (Tools::isSubmit('changeNewsletterVal') && $this->id_object)
|
||||
{
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
$this->action = 'change_newsletter_val';
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
elseif (Tools::isSubmit('changeOptinVal') && $this->id_object)
|
||||
{
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
$this->action = 'change_optin_val';
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
|
||||
// When deleting, first display a form to select the type of deletion
|
||||
@@ -269,7 +269,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Titles:'),
|
||||
'label' => $this->l('Title:'),
|
||||
'name' => 'id_gender',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
@@ -470,7 +470,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
);
|
||||
$this->fields_form['input'][] = array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Max payment days:'),
|
||||
'label' => $this->l('Maximum number of payment days:'),
|
||||
'name' => 'max_payment_days',
|
||||
'size' => 10,
|
||||
'hint' => $this->l('Valid characters:').' 0-9'
|
||||
@@ -584,7 +584,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
foreach ($orders as $order)
|
||||
{
|
||||
if (!isset($order['order_state']))
|
||||
$order['order_state'] = $this->l('The state isn\'t still defined for this order');
|
||||
$order['order_state'] = $this->l('The state isn\'t defined for this order');
|
||||
|
||||
if ($order['valid'])
|
||||
{
|
||||
@@ -752,7 +752,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$customer->getByEmail($customer_email);
|
||||
if ($customer->id)
|
||||
{
|
||||
$this->errors[] = Tools::displayError('An account already exists for this e-mail address:').' '.$customer_email;
|
||||
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email;
|
||||
$this->display = 'edit';
|
||||
return $customer;
|
||||
}
|
||||
@@ -776,13 +776,13 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$customer = new Customer();
|
||||
$customer->getByEmail($customer_email);
|
||||
if ($customer->id)
|
||||
$this->errors[] = Tools::displayError('An account already exists for this e-mail address:').' '.$customer_email;
|
||||
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email;
|
||||
}
|
||||
|
||||
return parent::processUpdate();
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while loading object.').'
|
||||
$this->errors[] = Tools::displayError('An error occurred while loading the object.').'
|
||||
<b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
}
|
||||
|
||||
@@ -790,7 +790,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
{
|
||||
// Check that default group is selected
|
||||
if (!is_array(Tools::getValue('groupBox')) || !in_array(Tools::getValue('id_default_group'), Tools::getValue('groupBox')))
|
||||
$this->errors[] = Tools::displayError('Default customer group must be selected in group box.');
|
||||
$this->errors[] = Tools::displayError('A default customer group must be selected in group box.');
|
||||
|
||||
// Check the requires fields which are settings in the BO
|
||||
$customer = new Customer();
|
||||
@@ -824,7 +824,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
else if ($customer->transformToCustomer(Tools::getValue('id_lang', $this->context->language->id)))
|
||||
Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'='.$customer->id.'&conf=3&token='.$this->token);
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the customer.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating customer information.');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -834,10 +834,10 @@ class AdminCustomersControllerCore extends AdminController
|
||||
{
|
||||
$customer = new Customer($this->id_object);
|
||||
if (!Validate::isLoadedObject($customer))
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the customer.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating customer information.');
|
||||
$customer->newsletter = $customer->newsletter ? 0 : 1;
|
||||
if (!$customer->update())
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the customer.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating customer information.');
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token);
|
||||
}
|
||||
|
||||
@@ -848,10 +848,10 @@ class AdminCustomersControllerCore extends AdminController
|
||||
{
|
||||
$customer = new Customer($this->id_object);
|
||||
if (!Validate::isLoadedObject($customer))
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the customer.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating customer information.');
|
||||
$customer->optin = $customer->optin ? 0 : 1;
|
||||
if (!$customer->update())
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the customer.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating customer information.');
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token);
|
||||
}
|
||||
|
||||
@@ -887,7 +887,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
|
||||
$tpl->assign(array(
|
||||
'href' => self::$currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token),
|
||||
'confirm' => $this->l('Delete selected item?').$name,
|
||||
'confirm' => $this->l('Delete the selected item?').$name,
|
||||
'action' => $this->l('Delete'),
|
||||
'id' => $id,
|
||||
));
|
||||
|
||||
@@ -44,7 +44,7 @@ class AdminDeliverySlipControllerCore extends AdminController
|
||||
),
|
||||
'PS_DELIVERY_NUMBER' => array(
|
||||
'title' => $this->l('Delivery number:'),
|
||||
'desc' => $this->l('The next delivery slip will begin with this number, and then increase with each additional slip'),
|
||||
'desc' => $this->l('The next delivery slip will begin with this number and then increase with each additional slip.'),
|
||||
'size' => 6,
|
||||
'cast' => 'intval',
|
||||
'type' => 'text'
|
||||
@@ -111,7 +111,7 @@ class AdminDeliverySlipControllerCore extends AdminController
|
||||
if (count(OrderInvoice::getByDeliveryDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to'))))
|
||||
Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf').'&submitAction=generateDeliverySlipsPDF&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')));
|
||||
else
|
||||
$this->errors[] = Tools::displayError('No delivery slip found for this period');
|
||||
$this->errors[] = Tools::displayError('No delivery slip was found for this period.');
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -38,7 +38,7 @@ class AdminEmailsControllerCore extends AdminController
|
||||
|
||||
$this->fields_options = array(
|
||||
'email' => array(
|
||||
'title' => $this->l('Email:'),
|
||||
'title' => $this->l('Email'),
|
||||
'icon' => 'email',
|
||||
'fields' => array(
|
||||
'PS_MAIL_EMAIL_MESSAGE' => array(
|
||||
@@ -76,7 +76,7 @@ class AdminEmailsControllerCore extends AdminController
|
||||
'submit' => array()
|
||||
),
|
||||
'smtp' => array(
|
||||
'title' => $this->l('Email:'),
|
||||
'title' => $this->l('Email'),
|
||||
'icon' => 'email',
|
||||
'top' => '<div id="smtp" style="display: '.((Configuration::get('PS_MAIL_METHOD') == 2) ? 'block' : 'none').';">',
|
||||
'bottom' => '</div>',
|
||||
@@ -173,6 +173,7 @@ class AdminEmailsControllerCore extends AdminController
|
||||
{
|
||||
$this->initTabModuleList();
|
||||
$this->initToolbar();
|
||||
$this->addToolBarModulesListButton();
|
||||
unset($this->toolbar_btn['save']);
|
||||
$back = $this->context->link->getAdminLink('AdminHome');
|
||||
|
||||
@@ -204,7 +205,7 @@ class AdminEmailsControllerCore extends AdminController
|
||||
$_POST['PS_SHOP_EMAIL'] = Configuration::get('PS_SHOP_EMAIL');
|
||||
|
||||
if (isset($_POST['PS_MAIL_METHOD']) && $_POST['PS_MAIL_METHOD'] == 2 && (empty($_POST['PS_MAIL_SERVER']) || empty($_POST['PS_MAIL_SMTP_PORT'])))
|
||||
$this->errors[] = Tools::displayError('You must define an SMTP server and an SMTP port. If you do not know, use the PHP mail() function instead.');
|
||||
$this->errors[] = Tools::displayError('You must define an SMTP server and an SMTP port. If you do not know it, use the PHP mail() function instead.');
|
||||
}
|
||||
|
||||
public function ajaxProcessSendMailTest()
|
||||
|
||||
@@ -65,7 +65,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
|
||||
$profiles = Profile::getProfiles($this->context->language->id);
|
||||
if (!$profiles)
|
||||
$this->errors[] = Tools::displayError('No profile');
|
||||
$this->errors[] = Tools::displayError('No profile.');
|
||||
else
|
||||
foreach ($profiles as $profile)
|
||||
$this->profiles_array[$profile['name']] = $profile['name'];
|
||||
@@ -85,7 +85,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
'fields' => array(
|
||||
'PS_PASSWD_TIME_BACK' => array(
|
||||
'title' => $this->l('Password regeneration'),
|
||||
'desc' => $this->l('Security: Minimum time to wait between two password changes'),
|
||||
'desc' => $this->l('Security: Minimum time to wait between two password changes.'),
|
||||
'cast' => 'intval',
|
||||
'size' => 5,
|
||||
'type' => 'text',
|
||||
@@ -93,7 +93,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
'visibility' => Shop::CONTEXT_ALL
|
||||
),
|
||||
'PS_BO_ALLOW_EMPLOYEE_FORM_LANG' => array(
|
||||
'title' => $this->l('Memorize the language used in Admin panel forms.'),
|
||||
'title' => $this->l('Memorize the language used in Admin panel forms'),
|
||||
'desc' => $this->l('Allow employees to select a specific language for the Admin panel form.'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'select',
|
||||
@@ -158,7 +158,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
|
||||
if ($obj->id_profile == _PS_ADMIN_PROFILE_ && $this->context->employee->id_profile != _PS_ADMIN_PROFILE_)
|
||||
{
|
||||
$this->errors[] = Tools::displayError('You cannot edit SuperAdmin profile.');
|
||||
$this->errors[] = Tools::displayError('You cannot edit the SuperAdmin profile.');
|
||||
return parent::renderForm();
|
||||
}
|
||||
|
||||
@@ -170,14 +170,14 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('First name:'),
|
||||
'label' => $this->l('First Name:'),
|
||||
'name' => 'firstname',
|
||||
'size' => 33,
|
||||
'required' => true
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Last name:'),
|
||||
'label' => $this->l('Last Name:'),
|
||||
'name' => 'lastname',
|
||||
'size' => 33,
|
||||
'required' => true
|
||||
@@ -241,7 +241,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Show screencast at log in:'),
|
||||
'label' => $this->l('Show screencast at login:'),
|
||||
'name' => 'bo_show_screencast',
|
||||
'desc' => $this->l('Display the welcome video in the Admin panel dashboard at log in.'),
|
||||
'required' => false,
|
||||
@@ -342,9 +342,9 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
return false;
|
||||
$email = $this->getFieldValue($obj, 'email');
|
||||
if (!Validate::isEmail($email))
|
||||
$this->errors[] = Tools::displayError('Invalid e-mail');
|
||||
$this->errors[] = Tools::displayError('Invalid email address.');
|
||||
elseif (Employee::employeeExists($email) && (!Tools::getValue('id_employee') || ($employee = new Employee((int)Tools::getValue('id_employee'))) && $employee->email != $email))
|
||||
$this->errors[] = Tools::displayError('An account already exists for this e-mail address:').' '.$email;
|
||||
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$email;
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
@@ -367,7 +367,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
$employee = new Employee(Tools::getValue('id_employee'));
|
||||
if ($employee->isLastAdmin())
|
||||
{
|
||||
$this->errors[] = Tools::displayError('You cannot disable or delete the last administrator account.');
|
||||
$this->errors[] = Tools::displayError('You cannot disable or delete the administrator account.');
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -436,21 +436,21 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
|
||||
if (Tools::getvalue('active') == 0)
|
||||
{
|
||||
$this->errors[] = Tools::displayError('You cannot disable or delete the last administrator account.');
|
||||
$this->errors[] = Tools::displayError('You cannot disable or delete the administrator account.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array(Tools::getValue('bo_theme'), $this->themes))
|
||||
{
|
||||
$this->errors[] = Tools::displayError('Invalid theme.');
|
||||
$this->errors[] = Tools::displayError('Invalid theme');
|
||||
return false;
|
||||
}
|
||||
|
||||
$assos = $this->getSelectedAssoShop($this->table);
|
||||
if (!$assos && $this->table = 'employee')
|
||||
if (Shop::isFeatureActive() && _PS_ADMIN_PROFILE_ != $_POST['id_profile'])
|
||||
$this->errors[] = Tools::displayError('The employee must be associated with at least one shop');
|
||||
$this->errors[] = Tools::displayError('The employee must be associated with at least one shop.');
|
||||
}
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
$this->addRowAction('delete');
|
||||
|
||||
if (!Validate::isLoadedObject($obj = new Feature((int)$id)))
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
|
||||
$this->fields_list = array(
|
||||
'id_feature_value' => array(
|
||||
|
||||
@@ -177,7 +177,7 @@ class AdminGendersControllerCore extends AdminController
|
||||
if (isset($this->fieldImageSettings['name']) && isset($this->fieldImageSettings['dir']))
|
||||
{
|
||||
if (!Validate::isInt(Tools::getValue('img_width')) || !Validate::isInt(Tools::getValue('img_height')))
|
||||
$this->errors[] = Tools::displayError('Width and height must be numeric values');
|
||||
$this->errors[] = Tools::displayError('Width and height must be numeric values.');
|
||||
else
|
||||
{
|
||||
if ((int)Tools::getValue('img_width') > 0 && (int)Tools::getValue('img_height') > 0)
|
||||
|
||||
@@ -87,12 +87,12 @@ class AdminGeolocationControllerCore extends AdminController
|
||||
Configuration::updateValue('PS_GEOLOCATION_ENABLED', (int)Tools::getValue('PS_GEOLOCATION_ENABLED'));
|
||||
// stop processing if geolocation is set to yes but geolite pack is not available
|
||||
elseif (Tools::getValue('PS_GEOLOCATION_ENABLED'))
|
||||
$this->errors[] = Tools::displayError('Geolocation database is unavailable.');
|
||||
$this->errors[] = Tools::displayError('The geolocation database is unavailable.');
|
||||
|
||||
if (empty($this->errors))
|
||||
{
|
||||
if (!is_array(Tools::getValue('countries')) || !count(Tools::getValue('countries')))
|
||||
$this->errors[] = Tools::displayError('Country selection is invalid');
|
||||
$this->errors[] = Tools::displayError('Country selection is invalid.');
|
||||
else
|
||||
{
|
||||
Configuration::updateValue(
|
||||
@@ -121,7 +121,7 @@ class AdminGeolocationControllerCore extends AdminController
|
||||
{
|
||||
// This field is not declared in class constructor because we want it to be manually post processed
|
||||
$this->fields_options['geolocationCountries']['fields']['countries'] = array(
|
||||
'title' => $this->l('Select countries that can access your store:'),
|
||||
'title' => $this->l('Select the countries from which your store is accessible'),
|
||||
'type' => 'checkbox_table',
|
||||
'identifier' => 'iso_code',
|
||||
'list' => Country::getCountries($this->context->language->id),
|
||||
|
||||
@@ -359,7 +359,7 @@ class AdminGroupsControllerCore extends AdminController
|
||||
public function processSave()
|
||||
{
|
||||
if (!$this->validateDiscount(Tools::getValue('reduction')))
|
||||
$this->errors[] = Tools::displayError('Discount value is incorrect (must be a percentage)');
|
||||
$this->errors[] = Tools::displayError('The discount value is incorrect (must be a percentage).');
|
||||
else
|
||||
{
|
||||
$this->updateCategoryReduction();
|
||||
@@ -390,7 +390,7 @@ class AdminGroupsControllerCore extends AdminController
|
||||
}
|
||||
else if (!$this->validateDiscount($category_reduction))
|
||||
{
|
||||
$result['errors'][] = Tools::displayError('Discount value is incorrect (must be a percentage)');
|
||||
$result['errors'][] = Tools::displayError('The discount value is incorrect (must be a percentage).');
|
||||
$result['hasError'] = true;
|
||||
}
|
||||
else
|
||||
@@ -435,7 +435,7 @@ class AdminGroupsControllerCore extends AdminController
|
||||
foreach ($category_reduction as $cat => $reduction)
|
||||
{
|
||||
if (!Validate::isUnsignedId($cat) || !$this->validateDiscount($reduction))
|
||||
$this->errors[] = Tools::displayError('Discount value is incorrect');
|
||||
$this->errors[] = Tools::displayError('The discount value is incorrect.');
|
||||
else
|
||||
{
|
||||
$category = new Category((int)$cat);
|
||||
@@ -445,7 +445,7 @@ class AdminGroupsControllerCore extends AdminController
|
||||
$group_reduction->reduction = (float)($reduction / 100);
|
||||
$group_reduction->id_category = (int)$cat;
|
||||
if (!$group_reduction->save())
|
||||
$this->errors[] = Tools::displayError('Cannot save group reductions');
|
||||
$this->errors[] = Tools::displayError('You cannot save group reductions.');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -458,10 +458,10 @@ class AdminGroupsControllerCore extends AdminController
|
||||
{
|
||||
$group = new Group($this->id_object);
|
||||
if (!Validate::isLoadedObject($group))
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating group.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating this group.');
|
||||
$update = Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'group` SET show_prices = '.($group->show_prices ? 0 : 1).' WHERE `id_group` = '.(int)$group->id);
|
||||
if (!$update)
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating group.');
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating this group.');
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token);
|
||||
}
|
||||
|
||||
|
||||
@@ -198,14 +198,14 @@ class AdminHomeControllerCore extends AdminController
|
||||
if ($profile_access[(int)Tab::getIdFromClassName('AdminSpecificPriceRule')]['add'])
|
||||
$quick_links['third'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminSpecificPriceRule').'&addspecific_price_rule',
|
||||
'title' => $this->l('New Price Rule for catalog'),
|
||||
'title' => $this->l('New price rule for catalog'),
|
||||
'description' => $this->l('Monitor your activity with a thorough analysis of your shop.'),
|
||||
);
|
||||
|
||||
if ($profile_access[(int)Tab::getIdFromClassName('AdminProducts')]['add'])
|
||||
$quick_links['fourth'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminProducts').'&addproduct',
|
||||
'title' => $this->l('New Product'),
|
||||
'title' => $this->l('New product'),
|
||||
'description' => $this->l('Add a new employee account and discharge a part of your duties as shop owner.'),
|
||||
);
|
||||
|
||||
@@ -213,27 +213,27 @@ class AdminHomeControllerCore extends AdminController
|
||||
$quick_links['fifth'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminModules'),
|
||||
'title' => $this->l('New module'),
|
||||
'description' => $this->l('Configure your modules.'),
|
||||
'description' => $this->l('Configure your modules'),
|
||||
);
|
||||
|
||||
if ($profile_access[(int)Tab::getIdFromClassName('AdminCartRules')]['add'])
|
||||
$quick_links['sixth'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminCartRules').'&addcart_rule',
|
||||
'title' => $this->l('New price rule for cart'),
|
||||
'description' => $this->l('Add new cart rule.'),
|
||||
'description' => $this->l('Add new cart rule'),
|
||||
);
|
||||
|
||||
if ($profile_access[(int)Tab::getIdFromClassName('AdminCmsContent')]['add'])
|
||||
$quick_links['seventh'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminCmsContent').'&addcms',
|
||||
'title' => $this->l('New Page CMS'),
|
||||
'title' => $this->l('New CMS page'),
|
||||
'description' => $this->l('Add a new CMS page.'),
|
||||
);
|
||||
|
||||
if ($profile_access[(int)Tab::getIdFromClassName('AdminCarts')]['view'])
|
||||
$quick_links['eighth'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminCarts').'&id_cart',
|
||||
'title' => $this->l('Abandoned Carts'),
|
||||
'title' => $this->l('Abandoned shopping carts'),
|
||||
'description' => $this->l('View your customer\'s carts.'),
|
||||
);
|
||||
return $quick_links;
|
||||
|
||||
@@ -43,10 +43,10 @@ class AdminImagesControllerCore extends AdminController
|
||||
'name' => array('title' => $this->l('Name'), 'width' => 'auto'),
|
||||
'width' => array('title' => $this->l('Width'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5),
|
||||
'height' => array('title' => $this->l('Height'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5),
|
||||
'products' => array('title' => $this->l('Products:'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||
'categories' => array('title' => $this->l('Categories:'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||
'manufacturers' => array('title' => $this->l('Manufacturers:'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||
'suppliers' => array('title' => $this->l('Suppliers:'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||
'products' => array('title' => $this->l('Products'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||
'categories' => array('title' => $this->l('Categories'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||
'manufacturers' => array('title' => $this->l('Manufacturers'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||
'suppliers' => array('title' => $this->l('Suppliers'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||
'scenes' => array('title' => $this->l('Scenes'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||
'stores' => array('title' => $this->l('Stores'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false)
|
||||
);
|
||||
@@ -57,8 +57,8 @@ class AdminImagesControllerCore extends AdminController
|
||||
'icon' => 'tab-orders',
|
||||
'top' => '',
|
||||
'bottom' => '',
|
||||
'description' => $this->l('JPEG images have a small file size and standard quality. PNG images have a bigger file size, a higher quality and support transparency. Note that in all cases the image files will have the .jpg extension.').'
|
||||
<br /><br />'.$this->l('WARNING: This feature may not be compatible with your theme or with some modules. In particular, PNG mode is not compatible with the Watermark module. If you encounter any issues, turn it off by selecting "Use JPEG".'),
|
||||
'description' => $this->l('JPEG images have a small file size and standard quality. PNG images have a larger file size, a higher quality and support transparency. Note that in all cases the image files will have the .jpg extension.').'
|
||||
<br /><br />'.$this->l('WARNING: This feature may not be compatible with your theme, or with some of your modules. In particular, PNG mode is not compatible with the Watermark module. If you encounter any issues, turn it off by selecting "Use JPEG".'),
|
||||
'fields' => array(
|
||||
'PS_IMAGE_QUALITY' => array(
|
||||
'title' => $this->l('Image quality'),
|
||||
@@ -98,15 +98,15 @@ class AdminImagesControllerCore extends AdminController
|
||||
'list' => array(
|
||||
array(
|
||||
'id' => '0',
|
||||
'name' => $this->l('auto')
|
||||
'name' => $this->l('Auto')
|
||||
),
|
||||
array(
|
||||
'id' => '1',
|
||||
'name' => $this->l('width')
|
||||
'name' => $this->l('Width')
|
||||
),
|
||||
array(
|
||||
'id' => '2',
|
||||
'name' => $this->l('height')
|
||||
'name' => $this->l('Height')
|
||||
)
|
||||
),
|
||||
'identifier' => 'id',
|
||||
@@ -119,7 +119,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
'required' => true,
|
||||
'cast' => 'intval',
|
||||
'type' => 'text',
|
||||
'suffix' => $this->l('bytes'),
|
||||
'suffix' => $this->l('Bytes'),
|
||||
'visibility' => Shop::CONTEXT_ALL
|
||||
),
|
||||
'PS_PRODUCT_PICTURE_WIDTH' => array(
|
||||
@@ -143,7 +143,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
'visibility' => Shop::CONTEXT_ALL
|
||||
),
|
||||
'PS_LEGACY_IMAGES' => array(
|
||||
'title' => $this->l('Use the legacy image filesystem.'),
|
||||
'title' => $this->l('Use the legacy image filesystem'),
|
||||
'desc' => $this->l('This should be set to yes unless you successfully moved images in "Images" page under the "Preferences" menu.'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
@@ -164,14 +164,14 @@ class AdminImagesControllerCore extends AdminController
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Type name:'),
|
||||
'label' => $this->l('Type name'),
|
||||
'name' => 'name',
|
||||
'required' => true,
|
||||
'desc' => $this->l('Letters and minus sign (-) only (e.g. small, medium, large, extra-large)')
|
||||
'desc' => $this->l('Letters and hyphens only (e.g. small, medium, large, extra-large)')
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Width:'),
|
||||
'label' => $this->l('Width'),
|
||||
'name' => 'width',
|
||||
'required' => true,
|
||||
'size' => 4,
|
||||
@@ -180,7 +180,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Height:'),
|
||||
'label' => $this->l('Height'),
|
||||
'name' => 'height',
|
||||
'required' => true,
|
||||
'size' => 4,
|
||||
@@ -189,7 +189,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Products:'),
|
||||
'label' => $this->l('Products'),
|
||||
'name' => 'products',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
@@ -210,7 +210,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Categories:'),
|
||||
'label' => $this->l('Categories'),
|
||||
'name' => 'categories',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
@@ -231,7 +231,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Manufacturers:'),
|
||||
'label' => $this->l('Manufacturers'),
|
||||
'name' => 'manufacturers',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
@@ -252,7 +252,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Suppliers:'),
|
||||
'label' => $this->l('Suppliers'),
|
||||
'name' => 'suppliers',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
@@ -273,7 +273,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Scenes:'),
|
||||
'label' => $this->l('Scenes'),
|
||||
'name' => 'scenes',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
@@ -294,7 +294,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Stores:'),
|
||||
'label' => $this->l('Stores'),
|
||||
'name' => 'stores',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
@@ -331,7 +331,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
{
|
||||
$this->warnings[] = $this->l('Duplicate images were found when moving the product images. This is likely caused by unused demonstration images. Please make sure that the folder').
|
||||
_PS_PROD_IMG_DIR_.'duplicates/'.
|
||||
$this->l('only contains demonstration images, and then delete this folder.');
|
||||
$this->l('only contains demonstration images, and then delete it.');
|
||||
}
|
||||
|
||||
if (Tools::getValue('submitRegenerate'.$this->table))
|
||||
@@ -342,7 +342,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=9'.'&token='.$this->token);
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
elseif (Tools::getValue('submitMoveImages'.$this->table))
|
||||
{
|
||||
@@ -352,7 +352,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf=25'.'&token='.$this->token);
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
elseif (Tools::getValue('submitImagePreferences'))
|
||||
{
|
||||
@@ -360,10 +360,10 @@ class AdminImagesControllerCore extends AdminController
|
||||
{
|
||||
if ((int)Tools::getValue('PS_JPEG_QUALITY') < 0
|
||||
|| (int)Tools::getValue('PS_JPEG_QUALITY') > 100)
|
||||
$this->errors[] = Tools::displayError('Incorrect value for JPEG image quality.');
|
||||
$this->errors[] = Tools::displayError('Incorrect value for the selected JPEG image quality.');
|
||||
elseif ((int)Tools::getValue('PS_PNG_QUALITY') < 0
|
||||
|| (int)Tools::getValue('PS_PNG_QUALITY') > 9)
|
||||
$this->errors[] = Tools::displayError('Incorrect value for PNG image quality.');
|
||||
$this->errors[] = Tools::displayError('Incorrect value for the selected PNG image quality.');
|
||||
elseif (!Configuration::updateValue('PS_IMAGE_QUALITY', Tools::getValue('PS_IMAGE_QUALITY'))
|
||||
|| !Configuration::updateValue('PS_JPEG_QUALITY', Tools::getValue('PS_JPEG_QUALITY'))
|
||||
|| !Configuration::updateValue('PS_PNG_QUALITY', Tools::getValue('PS_PNG_QUALITY')))
|
||||
@@ -372,7 +372,7 @@ class AdminImagesControllerCore extends AdminController
|
||||
return parent::postProcess();
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
|
||||
else
|
||||
@@ -396,11 +396,11 @@ class AdminImagesControllerCore extends AdminController
|
||||
public function initRegenerate()
|
||||
{
|
||||
$types = array(
|
||||
'categories' => $this->l('Categories:'),
|
||||
'manufacturers' => $this->l('Manufacturers:'),
|
||||
'suppliers' => $this->l('Suppliers:'),
|
||||
'categories' => $this->l('Categories'),
|
||||
'manufacturers' => $this->l('Manufacturers'),
|
||||
'suppliers' => $this->l('Suppliers'),
|
||||
'scenes' => $this->l('Scenes'),
|
||||
'products' => $this->l('Products:'),
|
||||
'products' => $this->l('Products'),
|
||||
'stores' => $this->l('Stores')
|
||||
);
|
||||
|
||||
@@ -613,12 +613,12 @@ class AdminImagesControllerCore extends AdminController
|
||||
$this->errors[] = sprintf(Tools::displayError('Cannot write %s images. Please check the folder\'s writing permissions %s.'), $proc['type'], $proc['dir']);
|
||||
}
|
||||
elseif ($return == 'timeout')
|
||||
$this->errors[] = Tools::displayError('Only part of the images have been regenerated, server timed out before finishing.');
|
||||
$this->errors[] = Tools::displayError('Only part of the images have been regenerated. The server timed out before finishing.');
|
||||
else
|
||||
{
|
||||
if ($proc['type'] == 'products')
|
||||
if ($this->_regenerateWatermark($proc['dir']) == 'timeout')
|
||||
$this->errors[] = Tools::displayError('Server timed out, the watermark may not have been applied to all images.');
|
||||
$this->errors[] = Tools::displayError('Server timed out. The watermark may not have been applied to all images.');
|
||||
if (!count($this->errors))
|
||||
if ($this->_regenerateNoPictureImages($proc['dir'], $formats, $languages))
|
||||
$this->errors[] = sprintf(
|
||||
@@ -647,16 +647,16 @@ class AdminImagesControllerCore extends AdminController
|
||||
protected function _moveImagesToNewFileSystem()
|
||||
{
|
||||
if (!Image::testFileSystem())
|
||||
$this->errors[] = Tools::displayError('Error: your server configuration is not compatible with the new image system. No images were moved');
|
||||
$this->errors[] = Tools::displayError('Error: Your server configuration is not compatible with the new image system. No images were moved.');
|
||||
else
|
||||
{
|
||||
ini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value
|
||||
$this->max_execution_time = (int)ini_get('max_execution_time');
|
||||
$result = Image::moveToNewFileSystem($this->max_execution_time);
|
||||
if ($result === 'timeout')
|
||||
$this->errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on "Move images" again to resume moving images');
|
||||
$this->errors[] = Tools::displayError('Not all images have been moved. The server timed out before finishing. Click on "Move images" again to resume the moving process.');
|
||||
else if ($result === false)
|
||||
$this->errors[] = Tools::displayError('Error: some or all images could not be moved.');
|
||||
$this->errors[] = Tools::displayError('Error: Some -- or all -- images can not be moved.');
|
||||
}
|
||||
return (count($this->errors) > 0 ? false : true);
|
||||
}
|
||||
|
||||
@@ -81,13 +81,13 @@ class AdminImportControllerCore extends AdminController
|
||||
public function __construct()
|
||||
{
|
||||
$this->entities = array(
|
||||
$this->l('Categories:'),
|
||||
$this->l('Products:'),
|
||||
$this->l('Categories'),
|
||||
$this->l('Products'),
|
||||
$this->l('Combinations'),
|
||||
$this->l('Customers'),
|
||||
$this->l('Addresses'),
|
||||
$this->l('Manufacturers:'),
|
||||
$this->l('Suppliers:'),
|
||||
$this->l('Manufacturers'),
|
||||
$this->l('Suppliers'),
|
||||
);
|
||||
|
||||
// @since 1.5.0
|
||||
@@ -96,8 +96,8 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->entities = array_merge(
|
||||
$this->entities,
|
||||
array(
|
||||
$this->l('SupplyOrders'),
|
||||
$this->l('SupplyOrdersDetails'),
|
||||
$this->l('Supply Orders'),
|
||||
$this->l('Supply Order Details'),
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -161,7 +161,7 @@ class AdminImportControllerCore extends AdminController
|
||||
);
|
||||
break;
|
||||
|
||||
case $this->entities[$this->l('Categories:')]:
|
||||
case $this->entities[$this->l('Categories')]:
|
||||
$this->available_fields = array(
|
||||
'no' => array('label' => $this->l('Ignore this column')),
|
||||
'id' => array('label' => $this->l('ID')),
|
||||
@@ -173,9 +173,9 @@ class AdminImportControllerCore extends AdminController
|
||||
'help' => $this->l('A category root is where a category tree can begin. This is used with multistore.')
|
||||
),
|
||||
'description' => array('label' => $this->l('Description')),
|
||||
'meta_title' => array('label' => $this->l('Meta-title')),
|
||||
'meta_keywords' => array('label' => $this->l('Meta-keywords')),
|
||||
'meta_description' => array('label' => $this->l('Meta-description')),
|
||||
'meta_title' => array('label' => $this->l('Meta title')),
|
||||
'meta_keywords' => array('label' => $this->l('Meta keywords')),
|
||||
'meta_description' => array('label' => $this->l('Meta description')),
|
||||
'link_rewrite' => array('label' => $this->l('URL rewritten')),
|
||||
'image' => array('label' => $this->l('Image URL')),
|
||||
'shop' => array(
|
||||
@@ -191,7 +191,7 @@ class AdminImportControllerCore extends AdminController
|
||||
);
|
||||
break;
|
||||
|
||||
case $this->entities[$this->l('Products:')]:
|
||||
case $this->entities[$this->l('Products')]:
|
||||
self::$validators['image'] = array(
|
||||
'AdminImportController',
|
||||
'split'
|
||||
@@ -224,9 +224,9 @@ class AdminImportControllerCore extends AdminController
|
||||
'description_short' => array('label' => $this->l('Short description')),
|
||||
'description' => array('label' => $this->l('Description')),
|
||||
'tags' => array('label' => $this->l('Tags (x,y,z...)')),
|
||||
'meta_title' => array('label' => $this->l('Meta-title')),
|
||||
'meta_keywords' => array('label' => $this->l('Meta-keywords')),
|
||||
'meta_description' => array('label' => $this->l('Meta-description')),
|
||||
'meta_title' => array('label' => $this->l('Meta title')),
|
||||
'meta_keywords' => array('label' => $this->l('Meta keywords')),
|
||||
'meta_description' => array('label' => $this->l('Meta description')),
|
||||
'link_rewrite' => array('label' => $this->l('URL rewritten')),
|
||||
'available_now' => array('label' => $this->l('Text when in stock')),
|
||||
'available_later' => array('label' => $this->l('Text when backorder allowed')),
|
||||
@@ -316,7 +316,7 @@ class AdminImportControllerCore extends AdminController
|
||||
'firstname' => array('label' => $this->l('First Name *')),
|
||||
'address1' => array('label' => $this->l('Address 1 *')),
|
||||
'address2' => array('label' => $this->l('Address 2')),
|
||||
'postcode' => array('label' => $this->l('Postcode*/ Zipcode*')),
|
||||
'postcode' => array('label' => $this->l('Postal code / Zipcode*')),
|
||||
'city' => array('label' => $this->l('City *')),
|
||||
'country' => array('label' => $this->l('Country *')),
|
||||
'state' => array('label' => $this->l('State')),
|
||||
@@ -332,8 +332,8 @@ class AdminImportControllerCore extends AdminController
|
||||
);
|
||||
break;
|
||||
|
||||
case $this->entities[$this->l('Manufacturers:')]:
|
||||
case $this->entities[$this->l('Suppliers:')]:
|
||||
case $this->entities[$this->l('Manufacturers')]:
|
||||
case $this->entities[$this->l('Suppliers')]:
|
||||
//Overwrite validators AS name is not MultiLangField
|
||||
self::$validators = array(
|
||||
'description' => array('AdminImportController', 'createMultiLangField'),
|
||||
@@ -350,9 +350,9 @@ class AdminImportControllerCore extends AdminController
|
||||
'name' => array('label' => $this->l('Name *')),
|
||||
'description' => array('label' => $this->l('Description')),
|
||||
'short_description' => array('label' => $this->l('Short description')),
|
||||
'meta_title' => array('label' => $this->l('Meta-title')),
|
||||
'meta_keywords' => array('label' => $this->l('Meta-keywords')),
|
||||
'meta_description' => array('label' => $this->l('Meta-description')),
|
||||
'meta_title' => array('label' => $this->l('Meta title')),
|
||||
'meta_keywords' => array('label' => $this->l('Meta keywords')),
|
||||
'meta_description' => array('label' => $this->l('Meta description')),
|
||||
'shop' => array(
|
||||
'label' => $this->l('ID / Name of group shop'),
|
||||
'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'),
|
||||
@@ -364,7 +364,7 @@ class AdminImportControllerCore extends AdminController
|
||||
);
|
||||
break;
|
||||
// @since 1.5.0
|
||||
case $this->entities[$this->l('SupplyOrders')]:
|
||||
case $this->entities[$this->l('Supply Orders')]:
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
{
|
||||
// required fields
|
||||
@@ -397,7 +397,7 @@ class AdminImportControllerCore extends AdminController
|
||||
}
|
||||
break;
|
||||
// @since 1.5.0
|
||||
case $this->entities[$this->l('SupplyOrdersDetails')]:
|
||||
case $this->entities[$this->l('Supply Order Details')]:
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
{
|
||||
// required fields
|
||||
@@ -601,7 +601,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->content .= $this->renderView();
|
||||
else
|
||||
{
|
||||
$this->errors[] = $this->l('You must upload a file for go to the next step');
|
||||
$this->errors[] = $this->l('You must upload a file in order to proceed to the next step');
|
||||
$this->content .= $this->renderForm();
|
||||
}
|
||||
else
|
||||
@@ -855,7 +855,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$tab_categ = array(Configuration::get('PS_HOME_CATEGORY'), Configuration::get('PS_ROOT_CATEGORY'));
|
||||
if (isset($info['id']) && in_array((int)$info['id'], $tab_categ))
|
||||
{
|
||||
$this->errors[] = Tools::displayError('The ID category cannot be the same as the ID Root category, nor the ID Home category');
|
||||
$this->errors[] = Tools::displayError('The ID category cannot be the same as the ID Root category or the ID Home category.');
|
||||
continue;
|
||||
}
|
||||
AdminImportController::setDefaultValues($info);
|
||||
@@ -969,7 +969,7 @@ class AdminImportControllerCore extends AdminController
|
||||
if ($category->id && $category->categoryExists($category->id) && !in_array($category->id, $categories_home_root))
|
||||
$res = $category->update();
|
||||
if ($category->id == Configuration::get('PS_ROOT_CATEGORY'))
|
||||
$this->errors[] = Tools::displayError('Root category cannot be modified');
|
||||
$this->errors[] = Tools::displayError('The root category cannot be modified.');
|
||||
// If no id_category or update failed
|
||||
if (!$res)
|
||||
$res = $category->add();
|
||||
@@ -977,7 +977,7 @@ class AdminImportControllerCore extends AdminController
|
||||
//copying images of categories
|
||||
if (isset($category->image) && !empty($category->image))
|
||||
if (!(AdminImportController::copyImg($category->id, null, $category->image, 'categories')))
|
||||
$this->warnings[] = $category->image.' '.Tools::displayError('cannot be copied');
|
||||
$this->warnings[] = $category->image.' '.Tools::displayError('cannot be copied.');
|
||||
// If both failed, mysql error
|
||||
if (!$res)
|
||||
{
|
||||
@@ -1088,7 +1088,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->addProductWarning(
|
||||
'id_tax_rules_group',
|
||||
$product->id_tax_rules_group,
|
||||
Tools::displayError('Invalid tax rule group ID, you first need a group with this ID.')
|
||||
Tools::displayError('Invalid tax rule group ID. You first need to create a group with this ID.')
|
||||
);
|
||||
}
|
||||
if (isset($product->manufacturer) && is_numeric($product->manufacturer) && Manufacturer::manufacturerExists((int)$product->manufacturer))
|
||||
@@ -1593,7 +1593,7 @@ class AdminImportControllerCore extends AdminController
|
||||
}
|
||||
if (!$id_image)
|
||||
$this->warnings[] = sprintf(
|
||||
Tools::displayError('No image found for combination with id_product = %s and image position = %s.'),
|
||||
Tools::displayError('No image was found for combination with id_product = %s and image position = %s.'),
|
||||
$product->id,
|
||||
(int)$info['image_position']
|
||||
);
|
||||
@@ -2035,7 +2035,7 @@ class AdminImportControllerCore extends AdminController
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errors[] = sprintf(Tools::displayError('"%s": Is not a valid e-mail address'), $address->customer_email);
|
||||
$this->errors[] = sprintf(Tools::displayError('"%s": Is not a valid email address'), $address->customer_email);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -2057,7 +2057,7 @@ class AdminImportControllerCore extends AdminController
|
||||
);
|
||||
}
|
||||
else
|
||||
$this->errors[] = sprintf(Tools::displayError('The customer ID n.%d does not exist in database (ID: %d) cannot be saved'), $address->customer_id);
|
||||
$this->errors[] = sprintf(Tools::displayError('The customer ID n.%d does not exist in the database (ID: %d) cannot be saved'), $address->customer_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2358,7 +2358,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$current_line + 1, $this->l('YYYY-MM-DD'));
|
||||
if ($discount_rate < 0 || $discount_rate > 100)
|
||||
$this->errors[] = sprintf($this->l('Discount rate (%d) is not valid (at line %d). %s.'), $discount_rate,
|
||||
$current_line + 1, $this->l('Format: between 0 and 100'));
|
||||
$current_line + 1, $this->l('Format: Between 0 and 100'));
|
||||
if ($supply_order->id > 0 && !$supply_order->isEditable())
|
||||
$this->errors[] = sprintf($this->l('Supply Order (%d) is not editable (at line %d).'), $supply_order->id, $current_line + 1);
|
||||
|
||||
@@ -2456,10 +2456,10 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->errors[] = sprintf($this->l('Quantity Expected (%d) is not valid (at line %d).'), $quantity_expected, $current_line + 1);
|
||||
if ($discount_rate < 0 || $discount_rate > 100)
|
||||
$this->errors[] = sprintf($this->l('Discount rate (%d) is not valid (at line %d). %s.'), $discount_rate,
|
||||
$current_line + 1, $this->l('Format: between 0 and 100'));
|
||||
$current_line + 1, $this->l('Format: Between 0 and 100'));
|
||||
if ($tax_rate < 0 || $tax_rate > 100)
|
||||
$this->errors[] = sprintf($this->l('Quantity Expected (%d) is not valid (at line %d).'), $tax_rate,
|
||||
$current_line + 1, $this->l('Format: between 0 and 100'));
|
||||
$current_line + 1, $this->l('Format: Between 0 and 100'));
|
||||
|
||||
// if no errors, sets supply order details
|
||||
if (empty($this->errors))
|
||||
@@ -2565,7 +2565,7 @@ class AdminImportControllerCore extends AdminController
|
||||
{
|
||||
switch ((int)$case)
|
||||
{
|
||||
case $this->entities[$this->l('Categories:')]:
|
||||
case $this->entities[$this->l('Categories')]:
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'category`
|
||||
WHERE id_category NOT IN ('.(int)Configuration::get('PS_HOME_CATEGORY').
|
||||
@@ -2583,7 +2583,7 @@ class AdminImportControllerCore extends AdminController
|
||||
if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d))
|
||||
unlink(_PS_CAT_IMG_DIR_.$d);
|
||||
break;
|
||||
case $this->entities[$this->l('Products:')]:
|
||||
case $this->entities[$this->l('Products')]:
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_shop');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'feature_product');
|
||||
@@ -2643,7 +2643,7 @@ class AdminImportControllerCore extends AdminController
|
||||
case $this->entities[$this->l('Addresses')]:
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'address');
|
||||
break;
|
||||
case $this->entities[$this->l('Manufacturers:')]:
|
||||
case $this->entities[$this->l('Manufacturers')]:
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_lang');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_shop');
|
||||
@@ -2651,7 +2651,7 @@ class AdminImportControllerCore extends AdminController
|
||||
if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d))
|
||||
unlink(_PS_MANU_IMG_DIR_.$d);
|
||||
break;
|
||||
case $this->entities[$this->l('Suppliers:')]:
|
||||
case $this->entities[$this->l('Suppliers')]:
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_lang');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_shop');
|
||||
@@ -2696,14 +2696,14 @@ class AdminImportControllerCore extends AdminController
|
||||
break;
|
||||
break;
|
||||
case UPLOAD_ERR_NO_FILE:
|
||||
$this->errors[] = Tools::displayError('No file was uploaded');
|
||||
$this->errors[] = Tools::displayError('No file was uploaded.');
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (!file_exists($_FILES['file']['tmp_name']) ||
|
||||
!@move_uploaded_file($_FILES['file']['tmp_name'], _PS_ADMIN_DIR_.'/import/'.date('Ymdhis').'-'.$_FILES['file']['name']))
|
||||
$this->errors[] = $this->l('an error occurred while uploading and copying file');
|
||||
$this->errors[] = $this->l('An error occurred while uploading / copying the file.');
|
||||
else
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=18');
|
||||
}
|
||||
@@ -2718,10 +2718,10 @@ class AdminImportControllerCore extends AdminController
|
||||
|
||||
switch ((int)Tools::getValue('entity'))
|
||||
{
|
||||
case $this->entities[$this->l('Categories:')]:
|
||||
case $this->entities[$this->l('Categories')]:
|
||||
$this->categoryImport();
|
||||
break;
|
||||
case $this->entities[$this->l('Products:')]:
|
||||
case $this->entities[$this->l('Products')]:
|
||||
$this->productImport();
|
||||
break;
|
||||
case $this->entities[$this->l('Customers')]:
|
||||
@@ -2733,19 +2733,19 @@ class AdminImportControllerCore extends AdminController
|
||||
case $this->entities[$this->l('Combinations')]:
|
||||
$this->attributeImport();
|
||||
break;
|
||||
case $this->entities[$this->l('Manufacturers:')]:
|
||||
case $this->entities[$this->l('Manufacturers')]:
|
||||
$this->manufacturerImport();
|
||||
break;
|
||||
case $this->entities[$this->l('Suppliers:')]:
|
||||
case $this->entities[$this->l('Suppliers')]:
|
||||
$this->supplierImport();
|
||||
break;
|
||||
// @since 1.5.0
|
||||
case $this->entities[$this->l('SupplyOrders')]:
|
||||
case $this->entities[$this->l('Supply Orders')]:
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
$this->supplyOrdersImport();
|
||||
break;
|
||||
// @since 1.5.0
|
||||
case $this->entities[$this->l('SupplyOrdersDetails')]:
|
||||
case $this->entities[$this->l('Supply Order Details')]:
|
||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||
$this->supplyOrdersDetailsImport();
|
||||
break;
|
||||
@@ -2754,7 +2754,7 @@ class AdminImportControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->errors[] = $this->l('You must upload a file for go to the next step');
|
||||
$this->errors[] = $this->l('You must upload a file in order to proceed to the next step');
|
||||
}
|
||||
|
||||
parent::postProcess();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user