//fix for 1.5.2.0

This commit is contained in:
vAugagneur
2012-10-22 12:41:28 +00:00
parent f38ef7b915
commit fc94b42d7d
20 changed files with 266 additions and 187 deletions
+2
View File
@@ -658,6 +658,8 @@ class ToolsCore
public static function safePostVars() public static function safePostVars()
{ {
if (!is_array($_POST))
return array();
$_POST = array_map(array('Tools', 'htmlentitiesUTF8'), $_POST); $_POST = array_map(array('Tools', 'htmlentitiesUTF8'), $_POST);
} }
+6 -2
View File
@@ -1172,8 +1172,12 @@ class OrderCore extends ObjectModel
{ {
$number = (int)Configuration::get('PS_DELIVERY_NUMBER'); $number = (int)Configuration::get('PS_DELIVERY_NUMBER');
if (!$number) if (!$number)
throw new PrestaShopException('Invalid delivery number'); {
//if delivery number is not set or wrong, we set a default one.
Configuration::updateValue('PS_DELIVERY_NUMBER', 1);
$number = 1;
}
// Set delivery number on invoice // Set delivery number on invoice
$order_invoice->delivery_number = $number; $order_invoice->delivery_number = $number;
$order_invoice->delivery_date = date('Y-m-d H:i:s'); $order_invoice->delivery_date = date('Y-m-d H:i:s');
+48 -43
View File
@@ -597,62 +597,67 @@ class AdminProductsControllerCore extends AdminController
protected function processBulkDelete() protected function processBulkDelete()
{ {
if (is_array($this->boxes) && !empty($this->boxes)) if ($this->tabAccess['delete'] === '1')
{ {
$object = new $this->className(); if (is_array($this->boxes) && !empty($this->boxes))
if (isset($object->noZeroObject) &&
// Check if all object will be deleted
(count(call_user_func(array($this->className, $object->noZeroObject))) <= 1 || count($_POST[$this->table.'Box']) == count(call_user_func(array($this->className, $object->noZeroObject)))))
$this->errors[] = Tools::displayError('You need at least one object.').' <b>'.$this->table.'</b><br />'.Tools::displayError('You cannot delete all of the items.');
else
{ {
$success = 1; $object = new $this->className();
$products = Tools::getValue($this->table.'Box');
if (is_array($products) && ($count = count($products))) if (isset($object->noZeroObject) &&
// Check if all object will be deleted
(count(call_user_func(array($this->className, $object->noZeroObject))) <= 1 || count($_POST[$this->table.'Box']) == count(call_user_func(array($this->className, $object->noZeroObject)))))
$this->errors[] = Tools::displayError('You need at least one object.').' <b>'.$this->table.'</b><br />'.Tools::displayError('You cannot delete all of the items.');
else
{ {
// Deleting products can be quite long on a cheap server. Let's say 1.5 seconds by product (I've seen it!). $success = 1;
if (intval(ini_get('max_execution_time')) < round($count * 1.5)) $products = Tools::getValue($this->table.'Box');
ini_set('max_execution_time', round($count * 1.5)); if (is_array($products) && ($count = count($products)))
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
$stock_manager = StockManagerFactory::getManager();
foreach ($products as $id_product)
{ {
$product = new Product((int)$id_product); // Deleting products can be quite long on a cheap server. Let's say 1.5 seconds by product (I've seen it!).
/* if (intval(ini_get('max_execution_time')) < round($count * 1.5))
* @since 1.5.0 ini_set('max_execution_time', round($count * 1.5));
* It is NOT possible to delete a product if there are currently:
* - physical stock for this product if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
* - supply order(s) for this product $stock_manager = StockManagerFactory::getManager();
*/
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management) foreach ($products as $id_product)
{ {
$physical_quantity = $stock_manager->getProductPhysicalQuantities($product->id, 0); $product = new Product((int)$id_product);
$real_quantity = $stock_manager->getProductRealQuantities($product->id, 0); /*
if ($physical_quantity > 0 || $real_quantity > $physical_quantity) * @since 1.5.0
$this->errors[] = sprintf(Tools::displayError('You cannot delete the product #%d because there is physical stock left or supply orders in progress.'), $product->id); * It is NOT possible to delete a product if there are currently:
* - physical stock for this product
* - supply order(s) for this product
*/
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management)
{
$physical_quantity = $stock_manager->getProductPhysicalQuantities($product->id, 0);
$real_quantity = $stock_manager->getProductRealQuantities($product->id, 0);
if ($physical_quantity > 0 || $real_quantity > $physical_quantity)
$this->errors[] = sprintf(Tools::displayError('You cannot delete the product #%d because there is physical stock left or supply orders in progress.'), $product->id);
else
$success &= $product->delete();
}
else else
$success &= $product->delete(); $success &= $product->delete();
} }
else
$success &= $product->delete();
} }
if ($success)
{
$id_category = (int)Tools::getValue('id_category');
$category_url = empty($id_category) ? '' : '&id_category='.(int)$id_category;
$this->redirect_after = self::$currentIndex.'&conf=2&token='.$this->token.$category_url;
}
else
$this->errors[] = Tools::displayError('An error occurred while deleting selection.');
} }
if ($success)
{
$id_category = (int)Tools::getValue('id_category');
$category_url = empty($id_category) ? '' : '&id_category='.(int)$id_category;
$this->redirect_after = self::$currentIndex.'&conf=2&token='.$this->token.$category_url;
}
else
$this->errors[] = Tools::displayError('An error occurred while deleting selection.');
} }
else
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
} }
else else
$this->errors[] = Tools::displayError('You must select at least one element to delete.'); $this->errors[] = Tools::displayError('You do not have permission to delete this.');
} }
public function processProductAttribute() public function processProductAttribute()
@@ -66,9 +66,6 @@ class AdminTrackingControllerCore extends AdminController
$this->clearListOptions(); $this->clearListOptions();
$this->content .= call_user_func(array($this,$matches[0])); $this->content .= call_user_func(array($this,$matches[0]));
} }
$this->content .= $this->getCustomListProductsDisabled();
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'content' => $this->content, 'content' => $this->content,
'url_post' => self::$currentIndex.'&token='.$this->token, 'url_post' => self::$currentIndex.'&token='.$this->token,
+3 -1
View File
@@ -59,7 +59,9 @@ class ParentOrderControllerCore extends FrontController
// Redirect to the good order process // Redirect to the good order process
if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 && Dispatcher::getInstance()->getController() != 'order') if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 && Dispatcher::getInstance()->getController() != 'order')
Tools::redirect('index.php?controller=order'); Tools::redirect('index.php?controller=order');
if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 && Dispatcher::getInstance()->getController() != 'orderopc')
//if getMobileDevice is on a mobile or a tablet we don't redirect to OPC
if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 && Dispatcher::getInstance()->getController() != 'orderopc' && !$this->context->getMobileDevice())
{ {
if (isset($_GET['step']) && $_GET['step'] == 3) if (isset($_GET['step']) && $_GET['step'] == 3)
Tools::redirect('index.php?controller=order-opc&isPaymentStep=true'); Tools::redirect('index.php?controller=order-opc&isPaymentStep=true');
+100 -100
View File
@@ -4,30 +4,30 @@
array ( array (
'menu_welcome' => 'Benvenuto!', 'menu_welcome' => 'Benvenuto!',
'menu_system' => 'Compatibilità sistema', 'menu_system' => 'Compatibilità sistema',
'menu_database' => NULL, 'menu_database' => 'Database',
'menu_configure' => 'Configurazione negozio', 'menu_configure' => 'Configurazione negozio',
'menu_process' => 'Installazione', 'menu_process' => 'Installazione',
'Choose the installer language:' => NULL, 'Choose the installer language:' => 'Scegli la lingua di installazione',
'Field required' => NULL, 'Field required' => 'Campo richiesto',
'Invalid shop name' => 'nome negozio non valido', 'Invalid shop name' => 'nome negozio non valido',
'Your firstname contains some invalid characters' => 'Il tuo nome contiene dei caratteri non validi', 'Your firstname contains some invalid characters' => 'Il tuo nome contiene dei caratteri non validi',
'Your lastname contains some invalid characters' => 'Il tuo cognome contiene dei caratteri non validi', 'Your lastname contains some invalid characters' => 'Il tuo cognome contiene dei caratteri non validi',
'The password is incorrect (alphanumeric string with at least 8 characters)' => NULL, 'The password is incorrect (alphanumeric string with at least 8 characters)' => 'La password non è corretta (stringa alfanumerica di almeno 8 caratteri)',
'Password and its confirmation are different' => NULL, 'Password and its confirmation are different' => 'La password e la conferma non coincidono',
'This e-mail address is invalid' => NULL, 'This e-mail address is invalid' => 'L\'indirizzo email non è valido',
'The uploaded file exceeds the upload_max_filesize directive in php.ini' => 'Il file inviato supera la dimensione massima autorizzata.', 'The uploaded file exceeds the upload_max_filesize directive in php.ini' => 'Il file inviato supera la dimensione massima autorizzata.',
'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form' => 'Il file inviato supera la dimensione massima autorizzata.', 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form' => 'Il file inviato supera la dimensione massima autorizzata.',
'The uploaded file was only partially uploaded' => 'Il file è stato parzialmente inviato.', 'The uploaded file was only partially uploaded' => 'Il file è stato parzialmente inviato.',
'No file was uploaded' => NULL, 'No file was uploaded' => 'Nessun file caricato',
'Missing a temporary folder' => 'Manca la cartella temporanea di ricezione dell\'invio di file. Consulta il tuo amministratore.', 'Missing a temporary folder' => 'Manca la cartella temporanea di ricezione dell\'invio di file. Consulta il tuo amministratore.',
'Failed to write file to disk' => 'Impossibile scrivere il file sul disco', 'Failed to write file to disk' => 'Impossibile scrivere il file sul disco',
'File upload stopped by extension' => 'Invio file interrotto a causa di estensione errata', 'File upload stopped by extension' => 'Invio file interrotto a causa di estensione errata',
'No error code available' => NULL, 'No error code available' => 'Nessun codice di errore disponibile',
'This is not a valid image file' => NULL, 'This is not a valid image file' => 'Questo non è un file di immagine valido',
'Image type is not supported' => NULL, 'Image type is not supported' => 'Tipo immagine non supportato',
'Image folder %s is not writable' => NULL, 'Image folder %s is not writable' => 'La cartella immagini %s non è scrivibile',
'Cannot upload the file' => NULL, 'Cannot upload the file' => 'Non posso caricare il file',
'Lingerie and Adult' => NULL, 'Lingerie and Adult' => 'Biancheria e adulti',
'Animals and Pets' => 'Animali', 'Animals and Pets' => 'Animali',
'Art and Culture' => 'Cultura e svaghi', 'Art and Culture' => 'Cultura e svaghi',
'Babies' => 'Articoli per bambini', 'Babies' => 'Articoli per bambini',
@@ -47,44 +47,44 @@
'Shoes and accessories' => 'Scarpe e accessori', 'Shoes and accessories' => 'Scarpe e accessori',
'Sports and Entertainment' => 'Sport e divertimenti', 'Sports and Entertainment' => 'Sport e divertimenti',
'Travel' => 'Viaggi e turismo', 'Travel' => 'Viaggi e turismo',
'Database is connected' => NULL, 'Database is connected' => 'Il database è connesso',
'A test e-mail has been sent to %s' => NULL, 'A test e-mail has been sent to %s' => 'Una mail di test è stata inviata a %s',
'An error occurred while sending email, please verify your parameters' => NULL, 'An error occurred while sending email, please verify your parameters' => 'Un errore nell\'invio mail, per favore verifica i parametri',
'Create settings.inc file' => NULL, 'Create settings.inc file' => 'Crea file settings.inc',
'Create database tables' => NULL, 'Create database tables' => 'Crea tabella database',
'Populate database tables' => NULL, 'Populate database tables' => 'Popolo le tabelle database',
'Configure shop information' => NULL, 'Configure shop information' => 'Configura informazioni negozio',
'Install modules' => NULL, 'Install modules' => 'Installa moduli',
'Install demonstration data' => NULL, 'Install demonstration data' => 'Installo dati di esempio',
'Install theme' => NULL, 'Install theme' => 'Installo tema',
'PHP parameters:' => NULL, 'PHP parameters:' => 'Parametri PHP',
'Is PHP 5.1.2 or later installed ?' => NULL, 'Is PHP 5.1.2 or later installed ?' => 'PHP 5.1.2 o successivi installato?',
'Can upload files ?' => NULL, 'Can upload files ?' => 'Posso caricare files?',
'Can create new files and folders ?' => NULL, 'Can create new files and folders ?' => 'Posso creare nuovi file e cartelle?',
'Is GD Library installed ?' => NULL, 'Is GD Library installed ?' => 'Le liberie GD sono installate?',
'Is MySQL support is on ?' => NULL, 'Is MySQL support is on ?' => 'Il supporto MySQL è su on?',
'WRecursive write permissions on files and folders:' => NULL, 'Write permissions on files:' => 'Permessi di scrittura sui file?',
'Can open external URLs ?' => NULL, 'Can open external URLs ?' => 'Posso aprire URL esterni?',
'Is PHP register global option off (recommended) ?' => NULL, 'Is PHP register global option off (recommended) ?' => 'PHP register Global è su OFF (raccomandato)?',
'Is GZIP compression activated (recommended) ?' => NULL, 'Is GZIP compression activated (recommended) ?' => 'La compressione GZIP è attivata (raccomandato)?',
'Is Mcrypt extension available (recommended) ?' => NULL, 'Is Mcrypt extension available (recommended) ?' => 'Estensione Mycrypt è disponibile (raccomandato)?',
'Is PHP magic quotes option deactivated (recommended) ?' => NULL, 'Is PHP magic quotes option deactivated (recommended) ?' => 'PHP magic quotes è disattivato (raccomandato)?',
'Is Dom extension loaded ?' => NULL, 'Is Dom extension loaded ?' => 'Estensione Dom è caricata?',
'Is PDO MySQL extension loaded ?' => NULL, 'Is PDO MySQL extension loaded ?' => 'Estensione PDO MySQL è caricata?',
'Shop settings and merchant account information' => 'Informazioni sul venditore', 'Shop settings and merchant account information' => 'Informazioni sul venditore',
'Shop name:' => 'Nome del negozio:', 'Shop name:' => 'Nome del negozio:',
'Main activity:' => 'Attività principale', 'Main activity:' => 'Attività principale',
'Please choose your main activity' => NULL, 'Please choose your main activity' => 'Per favore scegli l\'attività principale',
'Other activity...' => 'Altre attività ...', 'Other activity...' => 'Altre attività ...',
'This information is not required, it will only be used for statistical purposes. This information does not change anything in your store.' => 'Queste informazioni non sono obbligatorie, saranno utilizzate a fini statistici. Queste informazioni non cambieranno nulla nel tuo negozio.', 'This information is not required, it will only be used for statistical purposes. This information does not change anything in your store.' => 'Queste informazioni non sono obbligatorie, saranno utilizzate a fini statistici. Queste informazioni non cambieranno nulla nel tuo negozio.',
'Install demo products:' => NULL, 'Install demo products:' => 'Installa prodotti demo',
'Yes' => 'Sì', 'Yes' => 'Sì',
'No' => 'No', 'No' => 'No',
'Demo products are a good way to learn how to use PrestaShop. You should install them if you are not familiar with it.' => NULL, 'Demo products are a good way to learn how to use PrestaShop. You should install them if you are not familiar with it.' => 'Installare i prodotti demo è un buon metodo per imparare ad utilizzare PrestaShop. Puoi installarli se non hai familiarità con PrestaShop',
'Default country:' => 'Nazione di default:', 'Default country:' => 'Nazione di default:',
'Select your country' => NULL, 'Select your country' => 'Seleziona la tua nazione',
'Shop timezone:' => 'Fuso orario del negozio:', 'Shop timezone:' => 'Fuso orario del negozio:',
'Select your timezone' => NULL, 'Select your timezone' => 'Seleziona la tua zona oraria',
'Shop logo:' => 'Logo del negozio:', 'Shop logo:' => 'Logo del negozio:',
'Recommended dimensions:' => 'Dimensioni suggerite:', 'Recommended dimensions:' => 'Dimensioni suggerite:',
'First name:' => 'Nome:', 'First name:' => 'Nome:',
@@ -93,22 +93,22 @@
'Shop password:' => 'Password del negozio', 'Shop password:' => 'Password del negozio',
'Re-type to confirm:' => 'Conferma la password:', 'Re-type to confirm:' => 'Conferma la password:',
'Receive this information by e-mail' => 'Riceverò le mie informazioni tramite e-mail', 'Receive this information by e-mail' => 'Riceverò le mie informazioni tramite e-mail',
'Warning: You will receive this information only if your e-mail configuration is correct.' => NULL, 'Warning: You will receive this information only if your e-mail configuration is correct.' => 'Attenzione: riceverai queste informazioni per email solo le la configurazione è corretta',
'Configure your database by filling out the following fields:' => 'Configura il tuo database riempiendo i campi qui sotto:', 'Configure your database by filling out the following fields:' => 'Configura il tuo database riempiendo i campi qui sotto:',
'You have to create a database, help available in <a href="http://doc.prestashop.com" target="_blank">our online documentation</a>.' => null, 'You have to create a database, help available in <a href="http://doc.prestashop.com" target="_blank">our online documentation</a>.' => 'Devi creare un database, puoi trovare aiuto <a href="http://doc.prestashop.com" target="_blank">nella nostra documentazione online</a>.',
'Database server address:' => NULL, 'Database server address:' => 'Indirizzo server Database',
'If you want to use a different port, add :XX after your server address where XX is your port number.' => NULL, 'If you want to use a different port, add :XX after your server address where XX is your port number.' => 'Se vuoi utilizzare una porta differente aggiungi :XX dopo il tuo indirizzo dove XX è il numero della porta',
'Database name:' => 'Nome database:', 'Database name:' => 'Nome database:',
'Database login:' => 'Login database', 'Database login:' => 'Login database',
'Database password:' => 'Password database', 'Database password:' => 'Password database',
'Database Engine:' => 'Motore database', 'Database Engine:' => 'Motore database',
'Tables prefix:' => 'Prefisso tabelle', 'Tables prefix:' => 'Prefisso tabelle',
'Drop existing tables (mode dev):' => NULL, 'Drop existing tables (mode dev):' => 'Cancella le tabelle esistenti (modalità DEV)',
'Verify now!' => NULL, 'Verify now!' => 'Controlla ora!',
'E-mail delivery set-up' => NULL, 'E-mail delivery set-up' => 'Settaggi invio email',
'Configure SMTP manually (advanced users only)' => 'Configura l\'invio SMTP (solo per utenti esperti)', 'Configure SMTP manually (advanced users only)' => 'Configura l\'invio SMTP (solo per utenti esperti)',
'By default, the PHP mail() function is used' => NULL, 'By default, the PHP mail() function is used' => 'Di default PHP mail() è utilizzato',
'SMTP server address:' => NULL, 'SMTP server address:' => 'Indirizzo server SMTP',
'Encryption:' => 'Criptaggio:', 'Encryption:' => 'Criptaggio:',
'None' => 'Nessuno', 'None' => 'Nessuno',
'Port:' => 'Porta:', 'Port:' => 'Porta:',
@@ -118,18 +118,18 @@
'Send me a test email!' => 'Inviami una e-mail di prova!', 'Send me a test email!' => 'Inviami una e-mail di prova!',
'Next' => 'Successivo', 'Next' => 'Successivo',
'Back' => 'Precedente', 'Back' => 'Precedente',
'Official forum' => NULL, 'Official forum' => 'Forum ufficiale',
'Support' => NULL, 'Support' => 'Supporto',
'Documentation' => NULL, 'Documentation' => 'Documentazione',
'Contact us!' => 'Contattaci!', 'Contact us!' => 'Contattaci!',
'Forum' => NULL, 'Forum' => 'Forum',
'Blog' => 'Il blog', 'Blog' => 'Il blog',
'Done!' => NULL, 'Done!' => 'Fatto!',
'An error occured during installation...' => NULL, 'An error occured during installation...' => 'Un errore è avvenuto durante l\'installazione…',
'You can use the links on the left column to go back to the previous steps, or restart the installation process by <a href="%s">clicking here</a>.' => NULL, 'You can use the links on the left column to go back to the previous steps, or restart the installation process by <a href="%s">clicking here</a>.' => 'Puoi utilizzare il link nella colonna sinistra per tornare indietro ai passi precedenti, oppure ricominciare l\installazione <a href="%s">cliccando qui</a>.',
'Your installation is finished!' => 'Installazione terminata!', 'Your installation is finished!' => 'Installazione terminata!',
'You have just finished installing your shop. Thank you for using PrestaShop!' => NULL, 'You have just finished installing your shop. Thank you for using PrestaShop!' => 'Hai finito di installare il tuo negozio. Grazie per aver scelto PrestaShop',
'Please remember your login information:' => NULL, 'Please remember your login information:' => 'Per favore ricordati i parametri di login',
'WARNING: For security purposes, you must delete the "install" folder.' => 'ATTENZIONE: per motivi di sicurezza, adesso devi cancellare la cartella \'install\'.', 'WARNING: For security purposes, you must delete the "install" folder.' => 'ATTENZIONE: per motivi di sicurezza, adesso devi cancellare la cartella \'install\'.',
'Back Office' => 'Back Office', 'Back Office' => 'Back Office',
'Manage your store using your Back Office. Manage your orders and customers, add modules, change themes, etc.' => 'Amministra il tuo negozio con il tuo back office. Gestisci ordini e clienti, aggiungi moduli, modifica il tuo tema, etc....', 'Manage your store using your Back Office. Manage your orders and customers, add modules, change themes, etc.' => 'Amministra il tuo negozio con il tuo back office. Gestisci ordini e clienti, aggiungi moduli, modifica il tuo tema, etc....',
@@ -137,52 +137,52 @@
'Front Office' => 'Front Office', 'Front Office' => 'Front Office',
'Discover your store as your future customers will see it!' => 'Scopri il tuo negozio come lo vedranno i tuoi futuri clienti!', 'Discover your store as your future customers will see it!' => 'Scopri il tuo negozio come lo vedranno i tuoi futuri clienti!',
'Discover your store' => 'Scopri il mio negozio', 'Discover your store' => 'Scopri il mio negozio',
'Required set-up. Please verify the following checklist items are true.' => NULL, 'Required set-up. Please verify the following checklist items are true.' => 'Impostazioni obbligatorie. Per favore verifica che la lista sia ok',
'Your configuration is valid, click next to continue!' => NULL, 'Your configuration is valid, click next to continue!' => 'La tua configurazione è valida, clicca su avanti per continuare',
'Your configuration is invalid. Please fix the issues below:' => 'La tua configurazione non è valida,<br />correggi questi problemi:', 'Your configuration is invalid. Please fix the issues below:' => 'La tua configurazione non è valida,<br />correggi questi problemi:',
'Optional set-up' => 'Parametri opzionali', 'Optional set-up' => 'Parametri opzionali',
'Refresh these settings' => NULL, 'Refresh these settings' => 'Aggiorna questi settaggi',
'Welcome to the PrestaShop %s Installer.' => NULL, 'Welcome to the PrestaShop %s Installer.' => 'Benvenuto nell\'installante di PrestaShop %s .',
'The installation process should take only few minutes!' => 'Il processo di installazione dovrebbe durare solo pochi minuti!', 'The installation process should take only few minutes!' => 'Il processo di installazione dovrebbe durare solo pochi minuti!',
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => NULL, 'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => 'Se hai bisogno di aiuto non asitare a guardare <a href="%1$s" target="_blank">our documentation</a> o contattare il nostro supporto: %2$s',
'Did you know?' => 'Lo sapevi?', 'Did you know?' => 'Lo sapevi?',
'PrestaShop and its community offers over 40 different languages for free, directly accessible from your Back Office on the Localization tab.' => NULL, 'PrestaShop and its community offers over 40 different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop e la sua comunità offre 40 diverse lingue gratuite, direttamente accessibile nel tuo back office nel tab Traduzioni',
'Licenses Agreement' => 'Contratto di Licenza', 'Licenses Agreement' => 'Contratto di Licenza',
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => NULL, 'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'Il core di PrestaShop è rilasicata sollo licenza OSL 3.0 mentre i moduli e i temi prestashop sono rilasciati sotto licenza AFL 3.0',
'I agree to the above terms and conditions.' => 'Accetto i termini e le condizioni del contratto seguente.', 'I agree to the above terms and conditions.' => 'Accetto i termini e le condizioni del contratto seguente.',
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => NULL, 'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Accetto di partecipare nell\'implementare la soluzione inviando informazioni anonime sulla mia configurazione',
'If you have any questions, please visit our <a href="%1$s" target="_blank">documentation</a> and <a href="%2$s" target="_blank">community forum</a>.' => NULL, 'If you have any questions, please visit our <a href="%1$s" target="_blank">documentation</a> and <a href="%2$s" target="_blank">community forum</a>.' => 'Se hai altre questioni visita <a href="%1$s" target="_blank">documentazione</a> e <a href="%2$s" target="_blank">forum comunità</a>.',
'Test message from PrestaShop' => 'Installazione di Prestashop - prova del server di e-mail', 'Test message from PrestaShop' => 'Installazione di Prestashop - prova del server di e-mail',
'This is a test message, your server is now available to send email' => 'Questo è un messaggio di testo. Il tuo server è adesso impostato per inviare e-mail.', 'This is a test message, your server is now available to send email' => 'Questo è un messaggio di testo. Il tuo server è adesso impostato per inviare e-mail.',
'%s - Login information' => NULL, '%s - Login information' => '%s - informazioni Login',
'An SQL error occured for entity <i>%1$s</i>: <i>%2$s</i>' => NULL, 'An SQL error occured for entity <i>%1$s</i>: <i>%2$s</i>' => 'Errore SQL <i>%1$s</i>: <i>%2$s</i>',
'Cannot create image "%1$s" for entity "%2$s"' => NULL, 'Cannot create image "%1$s" for entity "%2$s"' => 'Non posso creare immagine "%1$s" for entity "%2$s"',
'Cannot create image "%1$s" (bad permissions on folder "%2$s")' => NULL, 'Cannot create image "%1$s" (bad permissions on folder "%2$s")' => 'Non posso creare limmagine "%1$s" (bad permissions on folder "%2$s")',
'Cannot create image "%s"' => NULL, 'Cannot create image "%s"' => 'Non posso creare immagine "%s"',
'SQL error on query <i>%s</i>' => NULL, 'SQL error on query <i>%s</i>' => 'SQL errore nella query <i>%s</i>',
'Server name is not valid' => NULL, 'Server name is not valid' => 'Nome server non valido',
'You must enter a database name' => NULL, 'You must enter a database name' => 'Devi inserire un nome database',
'You must enter a database login' => NULL, 'You must enter a database login' => 'Devi inserire una password per il database',
'Tables prefix is invalid' => NULL, 'Tables prefix is invalid' => 'Prefisso tabelle non valido',
'Wrong engine chosen for MySQL' => NULL, 'Wrong engine chosen for MySQL' => 'Engine scelta non valida per MySQL',
'Cannot convert database data to utf-8' => NULL, 'Cannot convert database data to utf-8' => 'Non posso convertire i dati del database in utf-8',
'At least one table with same prefix was already found, please change your prefix or drop your database' => NULL, 'At least one table with same prefix was already found, please change your prefix or drop your database' => 'Almeno una tabella con lo stesso prefisso è stata trovata, per favore cambia il prefisso o cancella il database',
'Database Server is not found. Please verify the login, password and server fields' => NULL, 'Database Server is not found. Please verify the login, password and server fields' => 'Server Database non trovato. Per favore verifica login, password e il campo server',
'Connection to MySQL server succeeded, but database "%s" not found' => NULL, 'Connection to MySQL server succeeded, but database "%s" not found' => 'Connessione a MySQL server riuscita, ma il database "%s" non è stato trovato',
'Engine innoDB is not supported by your MySQL server, please use MyISAM' => NULL, 'Engine innoDB is not supported by your MySQL server, please use MyISAM' => 'InnoDB non è supportato dal tuo server MySQL, per favore utilizza MyISAM',
'%s file is not writable (check permissions)' => NULL, '%s file is not writable (check permissions)' => 'Il file %s non è scrivibile (verifica i permessi)',
'%s folder is not writable (check permissions)' => NULL, '%s folder is not writable (check permissions)' => 'La cartella %s non è scrivibile (verifica i permessi)',
'Cannot write settings file' => NULL, 'Cannot write settings file' => 'Non posso scrivere il file settings',
'Database structure file not found' => NULL, 'Database structure file not found' => 'Struttura del database non trovata',
'Cannot create group shop' => NULL, 'Cannot create group shop' => 'Non posso accedere al gruppo shop',
'Cannot create shop' => NULL, 'Cannot create shop' => 'Non posso creare shop',
'Cannot create shop URL' => NULL, 'Cannot create shop URL' => 'Non posso creare url shop',
'File "language.xml" not found for language iso "%s"' => NULL, 'File "language.xml" not found for language iso "%s"' => 'File "language.xml" non trovato per iso "%s"',
'File "language.xml" not valid for language iso "%s"' => NULL, 'File "language.xml" not valid for language iso "%s"' => 'File "language.xml" non valido per iso "%s"',
'Cannot install language "%s"' => NULL, 'Cannot install language "%s"' => 'Non posso installare la lingua "%s"',
'Cannot create admin account' => NULL, 'Cannot create admin account' => 'Non posso creare account admin',
'Cannot install module "%s"' => NULL, 'Cannot install module "%s"' => 'Non posso installare il modulo "%s"',
'Fixtures class "%s" not found' => NULL, 'Fixtures class "%s" not found' => 'Fixtures class "%s" non trovata',
'"%s" must be an instane of "InstallXmlLoader"' => NULL, '"%s" must be an instane of "InstallXmlLoader"' => '"%s" deve essere una istanza di "InstallXmlLoader"',
), ),
); );
+2 -2
View File
@@ -36,7 +36,7 @@ function editorial_update()
`id_editorial` int(10) unsigned NOT NULL auto_increment, `id_editorial` int(10) unsigned NOT NULL auto_increment,
`body_home_logo_link` varchar(255) NOT NULL, `body_home_logo_link` varchar(255) NOT NULL,
PRIMARY KEY (`id_editorial`)) PRIMARY KEY (`id_editorial`))
ENGINE=MyISAM DEFAULT CHARSET=utf8'); ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
Db::getInstance()->execute(' Db::getInstance()->execute('
CREATE TABLE `'._DB_PREFIX_.'editorial_lang` ( CREATE TABLE `'._DB_PREFIX_.'editorial_lang` (
@@ -47,7 +47,7 @@ function editorial_update()
`body_paragraph` text NOT NULL, `body_paragraph` text NOT NULL,
`body_logo_subheading` varchar(255) NOT NULL, `body_logo_subheading` varchar(255) NOT NULL,
PRIMARY KEY (`id_editorial`, `id_lang`)) PRIMARY KEY (`id_editorial`, `id_lang`))
ENGINE=MyISAM DEFAULT CHARSET=utf8'); ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
if (file_exists(dirname(__FILE__).'/../../modules/editorial/editorial.xml')) if (file_exists(dirname(__FILE__).'/../../modules/editorial/editorial.xml'))
{ {
+67
View File
@@ -0,0 +1,67 @@
<?php
/*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2012 PrestaShop SA
* @version Release: $Revision: 15469 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
function fix_cms_shop_1520()
{
$res = true;
$db = Db::getInstance();
//test if cms_shop with 2 underscore is present to rename it.
$result = $db->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'_cms_shop"');
if (!is_array($result) || !count($result) || !$result)
{
$res &= create_table_cms_shop();
if ($res)
insert_table_cms_to_cms_shop();
}
//test if cms_shop with 1 underscore is present and create if not.
$result = $db->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'cms_shop"');
if (!is_array($result) || !count($result) || !$result)
{
$res &= create_table_cms_shop();
if ($res)
insert_table_cms_to_cms_shop();
}
}
function insert_table_cms_to_cms_shop()
{
// /!\ : _cms_shop and _cms are wrong tables name (fixed in 1.5.0.12.sql : upgrade_cms_15_rename() )
$res &= Db::getInstance()->execute(
'INSERT INTO `'._DB_PREFIX_.'cms_shop` (id_shop, id_cms)
(SELECT 1, id_cms FROM '._DB_PREFIX_.'_cms)');
}
function create_table_cms_shop()
{
return Db::getInstance()->execute(
'CREATE TABLE `'._DB_PREFIX_.'cms_shop` (
`id_cms` INT( 11 ) UNSIGNED NOT NULL,
`id_shop` INT( 11 ) UNSIGNED NOT NULL ,
PRIMARY KEY (`id_cms`, `id_shop`),
KEY `id_shop` (`id_shop`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;');
}
@@ -68,7 +68,7 @@ function migrate_block_info_to_cms_block()
`position` int(10) unsigned NOT NULL default \'0\', `position` int(10) unsigned NOT NULL default \'0\',
`display_store` tinyint(1) unsigned NOT NULL default \'1\', `display_store` tinyint(1) unsigned NOT NULL default \'1\',
PRIMARY KEY (`id_cms_block`) PRIMARY KEY (`id_cms_block`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8'); ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
$res &= Db::getInstance()->execute(' $res &= Db::getInstance()->execute('
INSERT INTO `'._DB_PREFIX_.'cms_block` (`id_cms_category`, `location`, `position`) VALUES(1, 0, 0)'); INSERT INTO `'._DB_PREFIX_.'cms_block` (`id_cms_category`, `location`, `position`) VALUES(1, 0, 0)');
$res &= Db::getInstance()->execute(' $res &= Db::getInstance()->execute('
@@ -77,7 +77,7 @@ function migrate_block_info_to_cms_block()
`id_lang` int(10) unsigned NOT NULL, `id_lang` int(10) unsigned NOT NULL,
`name` varchar(40) NOT NULL default \'\', `name` varchar(40) NOT NULL default \'\',
PRIMARY KEY (`id_cms_block`, `id_lang`) PRIMARY KEY (`id_cms_block`, `id_lang`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8'); ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
$query_lang = 'INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`) VALUES'; $query_lang = 'INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`) VALUES';
foreach ($languages AS $language) foreach ($languages AS $language)
@@ -92,7 +92,7 @@ function migrate_block_info_to_cms_block()
`id_cms` int(10) unsigned NOT NULL, `id_cms` int(10) unsigned NOT NULL,
`is_category` tinyint(1) unsigned NOT NULL, `is_category` tinyint(1) unsigned NOT NULL,
PRIMARY KEY (`id_cms_block_page`) PRIMARY KEY (`id_cms_block_page`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8'); ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
$res &= Db::getInstance()->getValue('REPLACE INTO `'._DB_PREFIX_.'configuration` $res &= Db::getInstance()->getValue('REPLACE INTO `'._DB_PREFIX_.'configuration`
(name, value) VALUES ("FOOTER_CMS", "")'); (name, value) VALUES ("FOOTER_CMS", "")');
@@ -35,14 +35,14 @@ function update_module_product_comments()
`id_customer` int(10) unsigned NOT NULL, `id_customer` int(10) unsigned NOT NULL,
`usefulness` tinyint(1) unsigned NOT NULL, `usefulness` tinyint(1) unsigned NOT NULL,
PRIMARY KEY (`id_product_comment`, `id_customer`) PRIMARY KEY (`id_product_comment`, `id_customer`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8'); ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
Db::getInstance()->execute(' Db::getInstance()->execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'product_comment_report` ( CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'product_comment_report` (
`id_product_comment` int(10) unsigned NOT NULL, `id_product_comment` int(10) unsigned NOT NULL,
`id_customer` int(10) unsigned NOT NULL, `id_customer` int(10) unsigned NOT NULL,
PRIMARY KEY (`id_product_comment`, `id_customer`) PRIMARY KEY (`id_product_comment`, `id_customer`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8'); ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
} }
} }
@@ -9,14 +9,14 @@ function update_modules_multishop()
`id_blocklink` int(2) NOT NULL AUTO_INCREMENT, `id_blocklink` int(2) NOT NULL AUTO_INCREMENT,
`id_shop` varchar(255) NOT NULL, `id_shop` varchar(255) NOT NULL,
PRIMARY KEY(`id_blocklink`, `id_shop`)) PRIMARY KEY(`id_blocklink`, `id_shop`))
ENGINE=MyISAM default CHARSET=utf8'); ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8');
Db::getInstance()->execute(' Db::getInstance()->execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_shop` ( CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_shop` (
`id_cms_block` int(10) unsigned NOT NULL auto_increment, `id_cms_block` int(10) unsigned NOT NULL auto_increment,
`id_shop` int(10) unsigned NOT NULL, `id_shop` int(10) unsigned NOT NULL,
PRIMARY KEY (`id_cms_block`, `id_shop`) PRIMARY KEY (`id_cms_block`, `id_shop`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8'); ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'cms_block_shop (cms_block, id_shop) Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'cms_block_shop (cms_block, id_shop)
(SELECT id_cms_block, 1 FROM '._DB_PREFIX_.'cms_block)'); (SELECT id_cms_block, 1 FROM '._DB_PREFIX_.'cms_block)');
@@ -30,7 +30,7 @@ function update_modules_multishop()
`id_blocklink` int(2) NOT NULL AUTO_INCREMENT, `id_blocklink` int(2) NOT NULL AUTO_INCREMENT,
`id_shop` varchar(255) NOT NULL, `id_shop` varchar(255) NOT NULL,
PRIMARY KEY(`id_blocklink`, `id_shop`)) PRIMARY KEY(`id_blocklink`, `id_shop`))
ENGINE=MyISAM default CHARSET=utf8'); ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8');
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'blocklink_shop` (id_blocklink, id_shop) Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'blocklink_shop` (id_blocklink, id_shop)
(SELECT id_blocklink, 1 FROM `'._DB_PREFIX_.'blocklink`)'); (SELECT id_blocklink, 1 FROM `'._DB_PREFIX_.'blocklink`)');
} }
@@ -38,7 +38,7 @@ function update_order_canada()
`tax_name` varchar(40) NOT NULL, `tax_name` varchar(40) NOT NULL,
`tax_rate` decimal(6,3) NOT NULL, `tax_rate` decimal(6,3) NOT NULL,
`amount` decimal(20,6) NOT NULL `amount` decimal(20,6) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8'); ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
$address_field = Db::getInstance()->getValue('SELECT value $address_field = Db::getInstance()->getValue('SELECT value
@@ -24,7 +24,7 @@ function update_stock_mvt_reason()
//Recreate new standards movements //Recreate new standards movements
Db::getInstance()->execute(' Db::getInstance()->execute('
INSERT INTO `PREFIX_stock_mvt_reason` (`id_stock_mvt_reason`, `sign`, `date_add`, `date_upd`) INSERT INTO `'._DB_PREFIX_.'stock_mvt_reason` (`id_stock_mvt_reason`, `sign`, `date_add`, `date_upd`)
VALUES VALUES
(1, 1, NOW(), NOW()), (1, 1, NOW(), NOW()),
(2, -1, NOW(), NOW()), (2, -1, NOW(), NOW()),
@@ -37,7 +37,7 @@ function update_stock_mvt_reason()
'); ');
Db::getInstance()->execute(" Db::getInstance()->execute("
INSERT INTO `PREFIX_stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) INSERT INTO `"._DB_PREFIX_."stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`)
VALUES VALUES
(1, 1, 'Increase'), (1, 1, 'Increase'),
(1, 2, 'Augmenter'), (1, 2, 'Augmenter'),
@@ -87,7 +87,7 @@ function update_stock_mvt_reason()
foreach ($mvts as $mvt) foreach ($mvts as $mvt)
{ {
Db::getInstance()->execute(' Db::getInstance()->execute('
INSERT INTO `PREFIX_stock_mvt_reason` (`sign`, `date_add`, `date_upd`) INSERT INTO `'._DB_PREFIX_.'stock_mvt_reason` (`sign`, `date_add`, `date_upd`)
VALUES ("'.(int)$mvt['sign'].'", "'.pSQL($mvt['date_add']).'", "'.pSQL($mvt['date_upd']).'") VALUES ("'.(int)$mvt['sign'].'", "'.pSQL($mvt['date_add']).'", "'.pSQL($mvt['date_upd']).'")
'); ');
@@ -99,7 +99,7 @@ function update_stock_mvt_reason()
continue; continue;
Db::getInstance()->execute(' Db::getInstance()->execute('
INSERT INTO `PREFIX_stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) INSERT INTO `'._DB_PREFIX_.'stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`)
VALUES ("'.(int)$row_id.'", "'.(int)$mvt_lang['id_lang'].'", "'.pSQL($mvt_lang['name']).'") VALUES ("'.(int)$row_id.'", "'.(int)$mvt_lang['id_lang'].'", "'.pSQL($mvt_lang['name']).'")
'); ');
} }
+1 -1
View File
@@ -36,7 +36,7 @@ function upgrade_cms_15()
`id_shop` INT( 11 ) UNSIGNED NOT NULL , `id_shop` INT( 11 ) UNSIGNED NOT NULL ,
PRIMARY KEY (`id_cms`, `id_shop`), PRIMARY KEY (`id_cms`, `id_shop`),
KEY `id_shop` (`id_shop`) KEY `id_shop` (`id_shop`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;'); ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;');
// /!\ : _cms_shop and _cms are wrong tables name (fixed in 1.5.0.12.sql : upgrade_cms_15_rename() ) // /!\ : _cms_shop and _cms are wrong tables name (fixed in 1.5.0.12.sql : upgrade_cms_15_rename() )
$res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'_cms_shop` (id_shop, id_cms) $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'_cms_shop` (id_shop, id_cms)
+3 -1
View File
@@ -1,3 +1,5 @@
SET NAMES 'utf8'; SET NAMES 'utf8';
ALTER TABLE `PREFIX_address` CHANGE `company` `company` VARCHAR(32) NULL; ALTER TABLE `PREFIX_address` CHANGE `company` `company` VARCHAR(32) NULL;
/* PHP:fix_cms_shop_1520(); */;
-3
View File
@@ -1584,9 +1584,6 @@ $(document).ready(function() {
$("#name_" + id_lang_default + ",#link_rewrite_" + id_lang_default) $("#name_" + id_lang_default + ",#link_rewrite_" + id_lang_default)
.live("change", function(e) .live("change", function(e)
{ {
if(typeof e == KeyboardEvent)
if(isArrowKey(e))
return;
$(this).trigger("handleSaveButtons"); $(this).trigger("handleSaveButtons");
}); });
// bind that custom event // bind that custom event
+5 -2
View File
@@ -30,14 +30,17 @@
{if $ajax_allowed} {if $ajax_allowed}
<script type="text/javascript"> <script type="text/javascript">
var CUSTOMIZE_TEXTFIELD = {$CUSTOMIZE_TEXTFIELD}; var CUSTOMIZE_TEXTFIELD = {$CUSTOMIZE_TEXTFIELD};
var img_dir = '{$img_dir}';
</script>
{/if}
<script type="text/javascript">
var customizationIdMessage = '{l s='Customization #' mod='blockcart' js=1}'; var customizationIdMessage = '{l s='Customization #' mod='blockcart' js=1}';
var removingLinkText = '{l s='remove this product from my cart' mod='blockcart' js=1}'; var removingLinkText = '{l s='remove this product from my cart' mod='blockcart' js=1}';
var freeShippingTranslation = '{l s='Free shipping!' mod='blockcart' js=1}'; var freeShippingTranslation = '{l s='Free shipping!' mod='blockcart' js=1}';
var freeProductTranslation = '{l s='Free!' mod='blockcart' js=1}'; var freeProductTranslation = '{l s='Free!' mod='blockcart' js=1}';
var delete_txt = '{l s='Delete' mod='blockcart'}'; var delete_txt = '{l s='Delete' mod='blockcart'}';
var img_dir = '{$img_dir}';
</script> </script>
{/if}
<!-- MODULE Block cart --> <!-- MODULE Block cart -->
<div id="cart_block" class="block exclusive"> <div id="cart_block" class="block exclusive">
+4 -4
View File
@@ -1380,14 +1380,14 @@ class BlockLayered extends Module
public function hookCategoryDeletion($params) public function hookCategoryDeletion($params)
{ {
$layered_filter_list = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT * FROM '._DB_PREFIX_.'layered_filter'); $layered_filter_list = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'layered_filter');
foreach ($layered_filter_list as $layered_filter) foreach ($layered_filter_list as $layered_filter)
{ {
$data = self::unSerialize($layered_filter_list['filters']); $data = self::unSerialize($layered_filter['filters']);
if (in_array((int)$params['category']->id, $data['categories'])) if (in_array((int)$params['category']->id, $data['categories']))
{ {
unset($data['categories'][array_search((int)$params['category']->id, $data['categories'])]); unset($data['categories'][array_search((int)$params['category']->id, $data['categories'])]);
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'layered_filter` SET `filters` = \''.pSQL(serialize($data)).'\''); Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'layered_filter` SET `filters` = \''.pSQL(serialize($data)).'\' WHERE `id_layered_filter` = '.(int)$layered_filter['id_layered_filter'].'');
} }
} }
$this->buildLayeredCategories(); $this->buildLayeredCategories();
@@ -3959,7 +3959,7 @@ class BlockLayered extends Module
`filter_show_limit` int(10) UNSIGNED NOT NULL DEFAULT 0, `filter_show_limit` int(10) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id_layered_category`), PRIMARY KEY (`id_layered_category`),
KEY `id_category` (`id_category`,`type`) KEY `id_category` (`id_category`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;'); /* MyISAM + latin1 = Smaller/faster */ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;'); /* MyISAM + latin1 = Smaller/faster */
Db::getInstance()->execute(' Db::getInstance()->execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'layered_filter` ( CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'layered_filter` (
@@ -35,9 +35,9 @@
var currencyBlank = '{$currencyBlank|intval}'; var currencyBlank = '{$currencyBlank|intval}';
var id_carrier = '{$id_carrier|intval}'; var id_carrier = '{$id_carrier|intval}';
var id_state = '{$id_state|intval}'; var id_state = '{$id_state|intval}';
var SE_RedirectTS = "{l s='Refreshing page and updating cart…' mod='carriercompare'}"; var SE_RedirectTS = "{l s='Refreshing page and updating cart...' mod='carriercompare'}";
var SE_RefreshStateTS = "{l s='Checking available states…' mod='carriercompare'}"; var SE_RefreshStateTS = "{l s='Checking available states...' mod='carriercompare'}";
var SE_RetrievingInfoTS = "{l s='Retrieving information…' mod='carriercompare'}"; var SE_RetrievingInfoTS = "{l s='Retrieving information...' mod='carriercompare'}";
var SE_RefreshMethod = {$refresh_method}; var SE_RefreshMethod = {$refresh_method};
var txtFree = "{l s='Free!' mod='carriercompare'}"; var txtFree = "{l s='Free!' mod='carriercompare'}";
@@ -101,7 +101,7 @@
<p class="SE_SubmitRefreshCard"> <p class="SE_SubmitRefreshCard">
<input class="exclusive_large" id="carriercompare_submit" type="submit" name="carriercompare_submit" value="{l s='Update Cart' mod='carriercompare'}"/> <input class="exclusive_large" id="carriercompare_submit" type="submit" name="carriercompare_submit" value="{l s='Update Cart' mod='carriercompare'}"/>
<input id="update_carriers_list" type="button" class="exclusive_large" value="{l s='Update carrier list'}" /> <input id="update_carriers_list" type="button" class="exclusive_large" value="{l s='Update carrier list' mod='carriercompare'}" />
</p> </p>
</fieldset> </fieldset>
</form> </form>
@@ -1,27 +1,27 @@
{if isset($display_error)} {if isset($display_error)}
{if $display_error} {if $display_error}
<div class="error">{l s='An error occured during the form validation'}</div> <div class="error">{l s='An error occured during the form validation' mod='carriercompare'}</div>
{else} {else}
<div class="conf">{l s='Configuration updated'}</div> <div class="conf">{l s='Configuration updated' mod='carriercompare'}</div>
{/if} {/if}
{/if} {/if}
<form method="post" action="{$smarty.server.REQUEST_URI|escape:'htmlall':'UTF-8'}"> <form method="post" action="{$smarty.server.REQUEST_URI|escape:'htmlall':'UTF-8'}">
<fieldset> <fieldset>
<div class="warn">{l s='This module is only available on standard order process because on One Page Checkout the carrier list is already available'}.</div> <div class="warn">{l s='This module is only available on standard order process because on One Page Checkout the carrier list is already available' mod='carriercompare'}.</div>
<legend>{l s='Global Configuration'}</legend> <legend>{l s='Global Configuration' mod='carriercompare'}</legend>
<label for="refresh_method">Refresh carrier list method</label> <label for="refresh_method">Refresh carrier list method</label>
<div class="margin-form"> <div class="margin-form">
<select id="refresh_method" name="refresh_method"> <select id="refresh_method" name="refresh_method">
<option value="0" {if $refresh_method == 0}selected{/if}>{l s='Anytime'}</option> <option value="0" {if $refresh_method == 0}selected{/if}>{l s='Anytime' mod='carriercompare'}</option>
<option value="1" {if $refresh_method == 1}selected{/if}>{l s='Required all information set'}</option> <option value="1" {if $refresh_method == 1}selected{/if}>{l s='Required all information set' mod='carriercompare'}</option>
</select> </select>
<p>{l s='Set the way to refresh information for a customer'}</p> <p>{l s='Set the way to refresh information for a customer' mod='carriercompare'}</p>
</div> </div>
<div class="margin-form"> <div class="margin-form">
<input name="setGlobalConfiguration" type="submit" class="button" value="{l s='Submit'}"> <input name="setGlobalConfiguration" type="submit" class="button" value="{l s='Submit' mod='carriercompare'}">
</div> </div>
</fieldset> </fieldset>
</form> </form>