Scaricare i pacchetti compresi quelli della lingua, spostali nelle directory che preferisci e rinominala (se vuoi); quindi seguire le istruzioni.
Per cambiare directory dell' amministratore, dopo aver rinominato la directory, andare in /include/configure.php ed /admin/include/configure.php e modificare manualmente il nome della vecchia directory.
Se si usa un server https, bisogna andare in /include/configure.php ed /admin/include/configure.php e modificare manualmente il Path da http ad https
Per impostare l' Italiano come lingua bisogna (dopo aver copiato i file) abilitarla manualmente in Local->Language; i parametri sono: nome:Italiano, code:it, Directory:italiano, order:26
Impostare i permessi in questo modo:
directory 755 o 555
files 644
file di configurazione 444
Aprite il file /includes/classes/currencies.php e modificate la funzione display_price da:
return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
a:
if (VISUALIZZA_PREZZI == 'true') {
return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
}
return '';
e nella funzione format aggiungere come prima riga:
if (VISUALIZZA_PREZZI == 'false') {
return '';
}
Aprire il file includes/modules/box/bm_card_acceptance.php e sostituire la funzione execute da:
if ( (substr(basename($PHP_SELF), 0, 8) != 'checkout') && tep_not_null(MODULE_BOXES_CARD_ACCEPTANCE_LOGOS) ) {
$output = '<div class="ui-widget infoBoxContainer">' .
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_CARD_ACCEPTANCE_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents" style="text-align: center;">';
foreach ( explode(';', MODULE_BOXES_CARD_ACCEPTANCE_LOGOS) as $logo ) {
$output .= tep_image(DIR_WS_IMAGES . 'card_acceptance/' . basename($logo));
}
$output .= ' </div>' .
'</div>';
$oscTemplate->addBlock($output, $this->group);
}
a:
if (VISUALIZZA_PREZZI == 'si') {
if ( (substr(basename($PHP_SELF), 0, 8) != 'checkout') && tep_not_null(MODULE_BOXES_CARD_ACCEPTANCE_LOGOS) ) {
$output = '<div class="ui-widget infoBoxContainer">' .
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_CARD_ACCEPTANCE_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents" style="text-align: center;">';
foreach ( explode(';', MODULE_BOXES_CARD_ACCEPTANCE_LOGOS) as $logo ) {
$output .= tep_image(DIR_WS_IMAGES . 'card_acceptance/' . basename($logo));
}
$output .= ' </div>' .
'</div>';
$oscTemplate->addBlock($output, $this->group);
}
}
Aprite il file /includes/classes/shopping_cart.php e modificate la funzione show_total da:
$this->calculate();
return $this->total;
a:
if (VISUALIZZA_PREZZI > 0) {
$this->calculate();
return $this->total;
} else {
return '';
}
Aprite il file /includes/modules/adress_book_details.php e rimuovere il codice sotto indicato (si trova dalla riga 30):
elseif (isset($entry['entry_gender'])) {
$male = ($entry['entry_gender'] == 'm') ? true : false;
$female = !$male;
}
ed aggiungere dopo la riga 58
</tr>
la riga
<tr>
<td class="fieldKey"><?php echo ENTRY_PARTITAIVA; ?></td>
<td class="fieldValue"><?php echo tep_draw_input_field('partitaIVA', (isset($entry['entry_gender']) ? $entry['entry_gender'] : '')) . ' ' . (tep_not_null(ENTRY_PARTITAIVA_TEXT) ? '<span class="inputRequirement">' . ENTRY_PARTITAIVA_TEXT . '</span>': ''); ?></td>
</tr>
Aprite il file /address_book_process.php ed aggiungere:
dopo la riga 41:
if (ACCOUNT_GENDER == 'true') $gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);
il codice:
if (ACCOUNT_COMPANY == 'true') $partitaIVA = tep_db_prepare_input($HTTP_POST_VARS['partitaIVA']);
ed modificare la riga 136 da:
if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
a:
if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_gender'] = $partitaIVA;
Aprite il file /admin/customers.php e:
aggiungere dopo la riga 41:
$entry_company = tep_db_prepare_input($HTTP_POST_VARS['entry_company']);
la riga
$entry_partitaIVA = tep_db_prepare_input($HTTP_POST_VARS['entry_partitaIVA']);
e dopo la riga 178
if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $entry_company;
la riga
if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_gender'] = $entry_partitaIVA;
modificare la riga 226 da:
$customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");
a:
$customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id, a.entry_gender from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'");
aggiungere dopo la riga 473
</tr>
la riga:
<tr>
<td class="main"><?php echo ENTRY_PARTITAIVA; ?></td>
<td class="main">
<?php
if ($error == true) {
echo $cInfo->entry_gender . tep_draw_hidden_field('entry_partitaIVA');
} else {
echo tep_draw_input_field('entry_partitaIVA', $cInfo->entry_gender, 'maxlength="16"');
}
?></td>
</tr>
Aprite il file /create_account.php e:
aggiungere dopo la riga 33:
f (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($HTTP_POST_VARS['company']);
la riga:
if (ACCOUNT_COMPANY == 'true') $partitaIVA = tep_db_prepare_input($HTTP_POST_VARS['partitaIVA']);
sostituire la riga 195
if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
con la riga
if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_gender'] = $partitaIVA;
aggiungere dopo la riga 336
</tr>
la riga
<tr>
<td class="fieldKey"><?php echo ENTRY_PARTITAIVA; ?></td>
<td class="fieldValue"><?php echo tep_draw_input_field('partitaIVA') . ' ' . (tep_not_null(ENTRY_PARTITAIVA_TEXT) ? '<span class="inputRequirement">' . ENTRY_PARTITAIVA_TEXT . '</span>': ''); ?></td>
</tr>
Aprire il file checkout_payment_address.php e rimuovere la riga 131
if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
Aprire il file checkout_shipping_address.php e rimuovere la riga 144
if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
Aprire il file della lingua ed aggiungere
define('ENTRY_PARTITAIVA', 'Partita IVA / Codice Fiscale');
define('ENTRY_PARTITAIVA_TEXT', '');
define('ENTRY_PARTITAIVA_CORTO'), 'P.IVA/C.F.');
Aprire l file /includes/functions/general.php
e sostituire i righi che iniziano dal 513
[codce]if ( (ACCOUNT_COMPANY == 'true') && (tep_not_null($company)) ) {
$address = $company . $cr . $address;
}[/code]
con i seguenti:
if ( (ACCOUNT_COMPANY == 'true') && (tep_not_null($company)) ) {
$address = $company . $cr . $address;
if (tep_not_null($partitaIVA)) {
$address .= $cr . ENTRY_PARTITAIVA_CORTO . ': ' . $partitaIVA;
}
}
sostituire il rigo 531
$address_query = tep_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customers_id . "' and address_book_id = '" . (int)$address_id . "'");
con il seguente:
$address_query = tep_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id, entry_gender as partitaIVA from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customers_id . "' and address_book_id = '" . (int)$address_id . "'");
inserire i seguenti comandi:
DELETE FROM zones;
DELETE FROM geo_zones;
INSERT INTO `geo_zones` (`geo_zone_id`, `geo_zone_name`, `geo_zone_description`, `last_modified`, `date_added`) VALUES (1, 'Italia', 'Italia', NULL, '2016-04-24 11:26:32');
DELETE FROM zones_to_geo_zones;
INSERT INTO `zones_to_geo_zones` (`association_id`, `zone_country_id`, `zone_id`, `geo_zone_id`, `last_modified`, `date_added`) VALUES (1, 105, NULL,1, NULL, '2016-04-19 23:43:46');
DELETE FROM tax_class;
INSERT INTO `tax_class` (`tax_class_id`, `tax_class_title`, `tax_class_description`, `last_modified`, `date_added`) VALUES (1, 'Iva', 'Iva Italia', '2016-04-19 23:43:46', '2016-04-19 23:43:46'),(2, 'Conai', 'Conai Italia', '2016-04-19 23:43:46', '2016-04-19 23:43:46');
INSERT INTO `configuration` SET `configuration_title` = 'Catalogo', `configuration_key` = 'VISUALIZZA_PREZZI', `configuration_value` = 'true', `configuration_description` = 'Abilita o disabilitala visualizzazione dei prezzi', `configuration_group_id` = '1', `sort_order` = '22', `set_function` = 'tep_cfg_select_option(array(\'true\', \'false\'), ' WHERE `configuration`.`configuration_id` = 369;
ALTER TABLE `products` CHANGE `products_model` `products_model` VARCHAR(25) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
ALTER TABLE `address_book` CHANGE `entry_gender` `entry_gender` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
UPDATE `countries` SET `address_format_id` = '5' WHERE `countries`.`countries_id` = 105;
Se invece vogliamo aggiungere una tassa in base alle provincie dobbiamo aggiungere (per Napoli)
INSERT INTO `zones` (`zone_id`, `zone_country_id`, `zone_code`, `zone_name`) VALUES (1, 105, 'IT', 'NA');
INSERT INTO `zones_to_geo_zones` (`association_id`, `zone_country_id`, `zone_id`, `geo_zone_id`, `last_modified`, `date_added`) VALUES (2, 105, 1, 1, NULL, '2016-04-19 23:43:46');
Se le pagine risultassero bianche o mancano dei menù, dopo aver cambiato il nome alla directory di admin, verificare di aver modificato in maniera opportuna TUTTI i campi dei file configure.php
Se si è dimenticato la password id amministratore bisogna aprire il database tramite phpAdmin o shell, andare nella tabella administrators ed inserire al posto della password 6cdd7c57450225fac77427f5962bb726:40 che aquile a pass
modifica: includes/functions/general.php includes/header.php include/footer.php /shopping_cart.php