by splendorini robert = Osnew
RICORDATI: BACKUP I FILE:
catalog/includes/modules/new_products.php
catalog/includes/classes/boxes.php
Questa contrib cambia la classica vetrina della home page con l'aiuto dei fogli di stile css.
Come fare?
Step 1> apri il file catalog/includes/modules/new_products.php
trova il seguente codice all'inizio del file:
------------------------------------------------------------------------------
$info_box_contents = array();
$info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));
new contentBoxHeading($info_box_contents);
---------------------------------------------------------------------------------
sostituisci con:
----------------------------------------------------------------------------------
$newsmonth = sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'));
?>
print ("
"); ----------------------------------------------------------------------------------
trova il seguente codice:
---------------------------------------------------------------------------------
$info_box_contents[$row][$col] = array('align' => 'center',
'params' => 'class="smallText" width="33%" valign="top"',
'text' => '' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '
' . $new_products['products_name'] . '
' . $currencies->display_price_nodiscount($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));
---------------------------------------------------------------------------------
sostituisci con:
----------------------------------------------------------------------------------
$info_box_contents[$row][$col] = array('align' => 'center',
'params' => 'cellspacing="0" width="33%" valign="top"',
'text' => '
');
----------------------------------------------------------------------------------
trova il seguente codice all'inizio del file:
----------------------------------------------------------------------------------
new contentBox($info_box_contents);
---------------------------------------------------------------------------------
sostituisci con:
----------------------------------------------------------------------------------
new contentBoxvetrina($info_box_contents);
-----------------------------------------------------------------------------------
STEP 2>
apri il file catalog/includes/classes/boxes.php
aggiungi il seguente codice in mezzo ad una delle varie class dopo i due } }:
------------------------------------------------------------------------------
//vetrina nuova
class contentBoxvetrina extends tableBox {
function contentBoxvetrina($contents) {
$info_box_contents = array();
$info_box_contents[] = array('text' => $this->contentBoxContents($contents));
$this->table_cellpadding = '3';
$this->table_parameters = 'class="boxvetrina"';
$this->tableBox($info_box_contents, true); // false toglie la vetrina dalla homepage
}
function contentBoxContents($contents) {
$this->table_cellpadding = '4';
$this->table_parameters = 'class="vetrina"';
return $this->tableBox($contents);
}
}
// fine vetrina nuova
------------------------------------------------------------------------------
ita:aggiungi al tuo file catalog/stylesheet.css
TD.vetrina {
height:20;
width:100%; /* stile singole celle prodotto Box vetrina Home page */
border-right:1px dotted #a5a5a5;
border-top:1px dotted #a5a5a5;
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
text-align: center;
}
.boxvetrina {
height:20;
width:100%; /* stile tabella Box vetrina Home page */
border-right:1px dotted #ffffff;
border-left:1px solid #ffffff;
border-top:1px dotted #ffffff;
border-bottom:1px solid #ffffff;
}
.headervetrina {
width:100%; /* stile intestazione Box vetrina Home page */
border-right:2px solid #efedee;
border-left:2px solid #efedee;
border-top:2px solid #efedee;
border-bottom:2px solid #efedee;
font-family: Verdana, Arial, sans-serif;
font-s
ize: 10px;
background: #d5ebfd;/*configura sfondo intestazione del box vetrina home page - celestino */
font-weight: bold;
color: #355f87; /* testo intestazione box*/
}
OK, fatto.