[FAQ] FAQ GENERALI

Documentazione generica riguardo osCommerce

Moderatore: mod Documentazione

Rispondi
Avatar utente
marcus
membro Master
membro Master
Messaggi: 1619
Iscritto il: 04/12/2003, 1:00
Contatta:

[FAQ] FAQ GENERALI

Messaggio da marcus »

- Come modificare quelle scritte in grigio e bold che sono in testa a quasi tutte le pagine di OsCommerce? Es.: "Cose c' è di nuovo?" che sta in home page...


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?');


in

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');


in

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')

dove oscommerce.gif è il nome del file (che è posizionato dentro la cartella /catalog/images) e 'osCommerce' è il tag alt che compare quando si sposta il mouse sopra l'immagine stessa.

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', '');

e indica che la directory da utilizzare per il salvataggio dei files di sessione non esiste.
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');


in:

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 ";

to:

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'] . "'";


to:

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'] . "'";


to:

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 . "'";


to:

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 . "'";


to:

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'] . "')");


to:

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'] . "')");


The following SQL queries need to be performed:

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);


(*) Le correzioni si riferiscono ad una versione PULITA di osCommerce. L'applicazione di tali correzioni a versioni già modificate potrebbe non essere sufficiente.



- 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', '');
non funziona correttamente.

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');:


2) In catalog/includes/functions/sessions.php trova:

Codice: Seleziona tutto

function tep_session_save_path($path = '') {
if (!empty($path)) {
return session_save_path($path);
} else {
return session_save_path();
}
}


e modifica con:

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();
}
}
}

E' necessario fare la stessa modifica lato admin.

---------------------------------------------------------------------------------
FAQ by http://www.oscommercedev.com

Nuovo pacchetto osCommercePRO (osCPRO) + Modulo Interfacciamento Gestionale Danea.
Visita la demo: http://oscpro.oscommercedev.com/index.php
madooeiei
membro Junior
membro Junior
Messaggi: 4
Iscritto il: 26/09/2015, 9:46

Re: [FAQ] FAQ GENERALI

Messaggio da madooeiei »

necessario fare la stessa modifica lato admin.
casino
kakasmall
membro Junior
membro Junior
Messaggi: 3
Iscritto il: 26/06/2017, 12:30

Re: [FAQ] FAQ GENERALI

Messaggio da kakasmall »

Buona idea! Amiamo visitare nel tuo blog ... torneremo presto.

^_^ทางเข้าจีคลับ^_^

^_^goldenslot register^_^
Rispondi