Le 'head lines' delle pagine di osCommerce sono definite nei languages files. Per l'italiano: il file catalogo/includes/languages/italian.php e il folder catalogo/includes/languages/italian.
Per ogni pagina occorre aprire il corrispondente files di lingua e cercare la definizione della costante 'HEADING_TITLE':
Codice: Seleziona tutto
define('HEADING_TITLE', 'xxxxxx')
Es.: Modifica di "Cose c' è di nuovo?" che sta in home (index.php).
Aprire il file di lingua corrispondente e modificare la linea:
Codice: Seleziona tutto
define('HEADING_TITLE', 'Cose c\' è di nuovo?');
Codice: Seleziona tutto
define('HEADING_TITLE', 'Quello che vuoi');
- Come si modifica il titolo sulla barra del browser?
Nei file:
-catalog/includes/languages/italian.php
modificare la linea:
Codice: Seleziona tutto
// page title
define('TITLE', 'OsCommerce');
Codice: Seleziona tutto
// page title
define('TITLE', 'Inserite qui il vostro titolo');
L'operazione deve essere ripetuta per tutte le lingue attive.
- Come si modifica il logo di Oscommerce?
Il logo di Oscommerce, nel lato cliente in alto a sinistra, puo' essere modificato editando il file: /catalog/includes/header.php.
Alla linea nr. 57 troverete il seguente codice
Codice: Seleziona tutto
tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce')
Uppate il vostro logo (tuologo.gif) in /catalog/images e modificate il codice così:
Codice: Seleziona tutto
tep_image(DIR_WS_IMAGES . 'tuologo.gif', 'tuologo')
- Che significa questo errore e come lo elimino?
"Attenzione: La Directory di sessione non esiste: /tmp. La Sessione non funzionerà finché la suddetta Directory non verrà creata".
A partire dalla versione 4, PHP offre un sistema di gestione delle sessioni. Tale meccanismo prevede il salvataggio delle informazioni di sessione in files creati in una opportuna directory, specificata nel file di configurazione del PHP o a tempo di esecuzione dello script.
Il messaggio di errore di cui sopra, implica che osCommerce è configurato per gestire le sessioni mediante il meccanismo predefinito offerto dal PHP, cioè nei configure files si ha:
Codice: Seleziona tutto
define('STORE_SESSIONS', '');
Questo accade tipicamente quando il webserver gira su un sistema non nix, i.e. Windows o Mac.
Le soluzioni percorribili sono:
-) creare la dir /tmp con i diritti opportuni (ma questo può non essere sempre possibile)
-) cambiare in configurazione la dir di salvataggio delle sessioni, inserendo il path ad una dir esistente e avente i diritti opportuni (es: /catalog/admin/temp)
-) anzichè utilizzare il sistema built-in del php, gestire le sessioni utilizzando il Data Base. Quest'ultima soluzione è di gran lunga preferibile, vuoi per motivi di sicurezza, vuoi per l'immediatezza della configurazione. Basta settare nei configure files:
Codice: Seleziona tutto
define('STORE_SESSIONS', 'mysql');
- Non riesco a far scrivere le date in italiano!
Mi scrive ad esempio:" NUOVI PRODOTTI PER AUGUST". Come risolvo?
Nel file :catalog/includes/languages/italian.php provare a modificare la linea:
Codice: Seleziona tutto
@setlocale(LC_TIME, 'it_IT.ISO8859-1');
Codice: Seleziona tutto
@setlocale(LC_TIME, 'it_IT'); //su LINUX RED HAT
Codice: Seleziona tutto
@setlocale(LC_TIME, 'it_IT.ISO_8859-1'); //su FREE BSD
Codice: Seleziona tutto
@setlocale(LC_TIME, 'Italian'); //su WINDOWS
- Vorrei sapere che significa questo errore nel mio oscommerce appena installato:
"1054 - Unknown column 'p.products_id' in 'on clause'
select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '29'
[TEP STOP]"
L'errore è dovuto ad una incompatibilità fra osCommerce e la versione 5 del DBMS MySQL.
Per correggere l'errore è necessario effettuare le seguenti modifiche (estratto dal file update-20051112.txt incluso nell'ultima versione di osC)(*):
Lines 213-223 in advanced_search_result.php must be changed from:
Codice: Seleziona tutto
$from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";
if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
if (!tep_session_is_registered('customer_country_id')) {
$customer_country_id = STORE_COUNTRY;
$customer_zone_id = STORE_ZONE;
}
$from_str .= " left join " . TABLE_TAX_RATES . " tr on p.products_tax_class_id = tr.tax_class_id left join " . TABLE_ZONES_TO_GEO_ZONES . " gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '" . (int)$customer_country_id . "') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '" . (int)$customer_zone_id . "')";
}
$where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";
Codice: Seleziona tutto
$from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id";
if ( (DISPLAY_PRICE_WITH_TAX == 'true') && (tep_not_null($pfrom) || tep_not_null($pto)) ) {
if (!tep_session_is_registered('customer_country_id')) {
$customer_country_id = STORE_COUNTRY;
$customer_zone_id = STORE_ZONE;
}
$from_str .= " left join " . TABLE_TAX_RATES . " tr on p.products_tax_class_id = tr.tax_class_id left join " . TABLE_ZONES_TO_GEO_ZONES . " gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is null or gz.zone_country_id = '0' or gz.zone_country_id = '" . (int)$customer_country_id . "') and (gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '" . (int)$customer_zone_id . "')";
}
$from_str .= ", " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c";
$where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";
The following lines must be replaced in index.php:
Line 175, from:
Codice: Seleziona tutto
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
Codice: Seleziona tutto
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
Line 178, from:
Codice: Seleziona tutto
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
Codice: Seleziona tutto
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
Line 184, from:
Codice: Seleziona tutto
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
Codice: Seleziona tutto
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
Line 187, from:
Codice: Seleziona tutto
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
Codice: Seleziona tutto
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
Line 292 in admin/categories.php must be changed from:
Codice: Seleziona tutto
tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
Codice: Seleziona tutto
tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
Codice: Seleziona tutto
ALTER TABLE whos_online MODIFY COLUMN last_page_url VARCHAR(255) NOT NULL;
ALTER TABLE customers MODIFY COLUMN customers_default_address_id INTEGER;
ALTER TABLE customers_basket MODIFY COLUMN final_price DECIMAL(15,4);
- Mi esce (dopo aver completato l'installazione) questo errore:
Warning: session_save_path() [function.session-save-path]: SAFE MODE Restriction in effect. The script whose uid is 406374 is not allowed to access owned by uid 0 in /membri/informatic/admin/includes/functions/sessions.php on line 110
Il problema è il seguente: a causa di un bug di osC, se il safe mode è ad On, il sistema predefinito di salvataggio dei dati di sessione, attivo se
Codice: Seleziona tutto
define('STORE_SESSIONS', '');
La procedura corretta per risolvere il problema è questa:
1) Nei configure.php setta il salvataggio delle sessioni sul DB:
Codice: Seleziona tutto
// STORE_SESSIONS
// Session handler - leave empty '' for default handler or set to 'mysql'
define('STORE_SESSIONS', 'mysql');:
Codice: Seleziona tutto
function tep_session_save_path($path = '') {
if (!empty($path)) {
return session_save_path($path);
} else {
return session_save_path();
}
}
Codice: Seleziona tutto
function tep_session_save_path($path = '') {
if (STORE_SESSIONS != 'mysql') {
if (!empty($path)) {
return session_save_path($path);
} else {
return session_save_path();
}
}
}
---------------------------------------------------------------------------------
FAQ by http://www.oscommercedev.com
Nuovo pacchetto osCommercePRO (osCPRO) + Modulo Interfacciamento Gestionale Danea.
Visita la demo: http://oscpro.oscommercedev.com/index.php