diff --git a/admin-dev/ajax-tab.php b/admin-dev/ajax-tab.php index bb03c332a..77a09f2b8 100755 --- a/admin-dev/ajax-tab.php +++ b/admin-dev/ajax-tab.php @@ -38,4 +38,4 @@ if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) $_REQUEST['controller'] = strtolower($_REQUEST['tab']); Dispatcher::getInstance()->setControllerDirectories(array(_PS_ADMIN_DIR_.'/tabs/', _PS_ADMIN_CONTROLLER_DIR_)); -Dispatcher::getInstance()->dispatch(); +Dispatcher::getInstance()->dispatch(); \ No newline at end of file diff --git a/admin-dev/ajax.php b/admin-dev/ajax.php index 8f6e91323..2a85ae73a 100644 --- a/admin-dev/ajax.php +++ b/admin-dev/ajax.php @@ -559,9 +559,13 @@ if (Tools::isSubmit('helpAccess')) if (Tools::isSubmit('getHookableList')) { + if (!strlen(Tools::getValue('hooks_list'))) + die('{"hasError" : true, "errors" : ["Live Edit : no module on this page"]}'); + $modules_list = explode(',', Tools::getValue('modules_list')); $hooks_list = explode(',', Tools::getValue('hooks_list')); $hookableList = array(); + foreach ($modules_list as $module) { $module = trim($module); @@ -581,6 +585,7 @@ if (Tools::isSubmit('getHookableList')) } } + $hookableList['hasError'] = false; die(Tools::jsonEncode($hookableList)); } diff --git a/admin-dev/tabs/AdminCarriers.php b/admin-dev/tabs/AdminCarriers.php index 5dcb53289..c1ebf4ee3 100644 --- a/admin-dev/tabs/AdminCarriers.php +++ b/admin-dev/tabs/AdminCarriers.php @@ -275,11 +275,11 @@ class AdminCarriers extends AdminTab private function changeGroups($id_carrier, $delete = true) { if ($delete) - Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier='.(int)($id_carrier)); + Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier = '.(int)$id_carrier); $groups = Db::getInstance()->ExecuteS('SELECT id_group FROM `'._DB_PREFIX_.'group`'); foreach ($groups as $group) if (Tools::getIsset('groupBox') && in_array($group['id_group'], Tools::getValue('groupBox'))) - Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'carrier_group (id_group, id_carrier) VALUES('.(int)($group['id_group']).','.(int)($id_carrier).')'); + Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'carrier_group (id_group, id_carrier) VALUES('.(int)$group['id_group'].','.(int)$id_carrier.')'); } public function postProcess() @@ -300,7 +300,7 @@ class AdminCarriers extends AdminTab $object = new $this->className($id); if (Validate::isLoadedObject($object)) { - Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier='.(int)($id)); + Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier = '.(int)$id); $object->deleted = 1; $object->update(); $objectNew = new $this->className(); @@ -348,6 +348,18 @@ class AdminCarriers extends AdminTab } } } + elseif ((isset($_GET['status'.$this->table]) OR isset($_GET['status'])) AND Tools::getValue($this->identifier)) + { + if ($this->tabAccess['edit'] === '1') + { + if (Tools::getValue('id_carrier') == Configuration::get('PS_CARRIER_DEFAULT')) + $this->_errors[] = Tools::displayError('You can\'t disable the default carrier, please change your default carrier first.'); + else + parent::postProcess(); + } + else + $this->_errors[] = Tools::displayError('You do not have permission to edit here.'); + } else { if ((Tools::isSubmit('submitDel'.$this->table) && in_array(Configuration::get('PS_CARRIER_DEFAULT'), Tools::getValue('carrierBox'))) @@ -383,5 +395,4 @@ class AdminCarriers extends AdminTab $this->_list[$key]['name'] = Configuration::get('PS_SHOP_NAME'); parent::displayListContent($token); } -} - +} \ No newline at end of file diff --git a/admin-dev/tabs/AdminCategories.php b/admin-dev/tabs/AdminCategories.php index 69b19409d..659933ef3 100644 --- a/admin-dev/tabs/AdminCategories.php +++ b/admin-dev/tabs/AdminCategories.php @@ -1,6 +1,6 @@ array('title' => $this->l('Description'), 'width' => 500, 'maxlength' => 90, 'callback' => 'getDescriptionClean', 'orderby' => false), 'position' => array('title' => $this->l('Position'), 'width' => 40,'filter_key' => 'position', 'align' => 'center', 'position' => 'position'), 'active' => array('title' => $this->l('Displayed'), 'active' => 'status', 'align' => 'center', 'type' => 'bool', 'orderby' => false)); - + $this->_category = AdminCatalog::getCurrentCategory(); $this->_filter = 'AND `id_parent` = '.(int)($this->_category->id); $this->_select = 'position '; @@ -76,6 +76,7 @@ class AdminCategories extends AdminTab echo '
'.$this->l('Add a new subcategory').'';
+
echo ''.$this->l('Upload category logo from your computer').'
'.$this->l('2-letter ISO code (e.g., fr, en, de)').'
'.$this->l('Full language code (e.g., en-us, pt-br)').'
'.$this->l('Date format, lite (e.g., Y-m-d, d/m/Y)').'
+'.$this->l('Date format, full (e.g., Y-m-d H:i:s, d/m/Y H:i)').'
+

{l s='Message:'} {$order->gift_message|nl2br}
{/if}diff --git a/translations/fr/admin.php b/translations/fr/admin.php index d0f835725..5bba9207d 100644 --- a/translations/fr/admin.php +++ b/translations/fr/admin.php @@ -1152,6 +1152,8 @@ $_LANGADM['AdminImport7a1920d61156abc05a60135aefe8bc67'] = 'Défaut'; $_LANGADM['AdminImport9b93b45649ec5961b8cc84e905964683'] = 'Position de l\'image'; $_LANGADM['AdminImport9c163d2934fbdd2775356db804d451fc'] = 'Position de l\'image produit à utiliser pour cette déclinaison. Si vous remplissez ce champ, laissez le champ \"URL de l\'image\" vide.'; $_LANGADM['AdminImport427b6d816d7fdd86cabe48d8180a3cc9'] = 'URL de l\'image'; +$_LANGADM['AdminImport14913d7e9d486e77b5c8d085e3797f94'] = 'Supprimer les images existantes (0 = non, 1 = oui)'; +$_LANGADM['AdminImporte6691747add3b37b9c381b8d9476fd4c'] = 'Si vous ne spécifiez pas cette colonne et vous spécifier la colonne images, toutes les images du produit seront remplacé par celle spécifié dans le fichier d\'import'; $_LANGADM['AdminImportb718adec73e04ce3ec720dd11a06a308'] = 'Identifiant'; $_LANGADM['AdminImportfd0dcc6233b026d257763713c133cf72'] = 'Actif (0/1)'; $_LANGADM['AdminImport2688a544cd5ac33f27ab78c8d8c3acaa'] = 'Nom *'; @@ -1182,8 +1184,6 @@ $_LANGADM['AdminImportf2149c422ab7577f063b69a2884d17f0'] = 'Disponible'; $_LANGADM['AdminImportb1a2a959c20b1bd847895e73a5fddbc9'] = 'Date d\'ajout d\'un produit'; $_LANGADM['AdminImporte1a5e653bc356ed6745d6814d50213eb'] = 'Afficher le prix'; $_LANGADM['AdminImport4d2589e1bcd4263cb99927b59f0f88d2'] = 'URLs des images (x,y,z...)'; -$_LANGADM['AdminImport14913d7e9d486e77b5c8d085e3797f94'] = 'Supprimer les images existantes (0 = non, 1 = oui)'; -$_LANGADM['AdminImporte6691747add3b37b9c381b8d9476fd4c'] = 'Si vous ne spécifiez pas cette colonne et vous spécifier la colonne images, toutes les images du produit seront remplacé par celle spécifié dans le fichier d\'import'; $_LANGADM['AdminImportecde3e896afb64e9a48781b8363b9a03'] = 'Caractéristique(Nom:Valeur:Position)'; $_LANGADM['AdminImport93b145201f52e9210402f4281ff8c188'] = 'Position de la caractéristique'; $_LANGADM['AdminImport71d0ceacdf562024f2d4c3a76d3b63e4'] = 'Uniquement disponible en ligne'; @@ -1342,6 +1342,8 @@ $_LANGADM['AdminLanguages8c2857a9ad1d8f31659e35e904e20fa6'] = 'Logo'; $_LANGADM['AdminLanguages49ee3087348e8d44e1feda1917443987'] = 'Nom'; $_LANGADM['AdminLanguagesad68f9bafd9bf2dcf3865dac55662fd5'] = 'Code ISO'; $_LANGADM['AdminLanguagese59a41e120686e63cbb743f003bea4e6'] = 'Code language'; +$_LANGADM['AdminLanguages534fd46732986cba0efeda8701592427'] = 'Format de date'; +$_LANGADM['AdminLanguagesc11566e30920ed4786e534e5332d5b87'] = 'Format de date (complet)'; $_LANGADM['AdminLanguages00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; $_LANGADM['AdminLanguages950baf75b9fd48b9cb4a3d30ffeda4ef'] = 'Préférences langues'; $_LANGADM['AdminLanguages7c89197a7b81992ee832cb5a89fa6d9d'] = 'Langue par défaut:'; @@ -1365,6 +1367,10 @@ $_LANGADM['AdminLanguages3af4c1797da60fd50670ddbb669fc0aa'] = 'Code ISO :'; $_LANGADM['AdminLanguages6b7af0b6d91545318696c648d6b466ac'] = 'Code ISO sur 2 lettres (ex : fr, en, de)'; $_LANGADM['AdminLanguages01a3b3d8af14e844c49a3a5acc870c6b'] = 'Code language:'; $_LANGADM['AdminLanguages8bc0a3b0cb05ff731e0fb30f35264898'] = 'Code language complet (ex : en-us, pt-br)'; +$_LANGADM['AdminLanguages104f1a7d59077b514d4105fcee0e42ff'] = 'Format de date :'; +$_LANGADM['AdminLanguages9d03b9a48a9f2f06a9698d1f9484011b'] = 'Format de date, sans les heures (ex : Y-m-d, d/m/Y)'; +$_LANGADM['AdminLanguages3253758a8726c828bbbdc0cc8de30410'] = 'Format de date (complet) :'; +$_LANGADM['AdminLanguages4728927eaacb4a87f8661de4a791589b'] = 'Format de date, avec les heures (ex : Y-m-d H:i:s, d/m/Y H:i)'; $_LANGADM['AdminLanguagesc907a021c935ae6144fa2ccadfe9360d'] = 'Drapeau :'; $_LANGADM['AdminLanguages581e03e07411d053e8c0f275f90fcabc'] = 'Charger le drapeau du pays à partir de votre ordinateur'; $_LANGADM['AdminLanguages70212b3d97d23361e0ec0bc567d7ea30'] = 'Image \"Aucune image\" :';