AGGIUNGERE MENU INFORMAZIONI NELLA COLONNA SINISTRA
Inviato: 05/12/2007, 13:01
Ciao,
ho un problema. Sto cercando in tutti i modi di inserire un menu laterale di informazione nel quale ci siano pagine aggiuntive tipo : "chi siamo", "condizioni", ecc.. Sono i grado si fare una cosa del genere se ho appena installato oscommerce, ma purtroppo il mio sito è stato creato da una persona a cui glielo avevo chiesto ed è stato montato un template che mi ha modificato parecchio i file di base. Ho provato da solo ad aggiungere questo menu laterale ma mi succede un casino tipo che la pagine centrale mi va a finire tutta a sinistra oppure tutto in basso.
Quindi il mio obiettivo è:
- aggiungere un menu laterale sotto o al posto dell immagine "our solution, for buisness & education" (guardate nel sito www.emca4.com)
- oppure aggiungere solamente una pagina "chi siamo".
questa è la colonna di sinistra da modificare,premetto che ho già provato a mettere:
require(DIR_WS_BOXES . 'information.php');
dentro la prima apertura di php ma la pagina centrale va a puttane.
COLUMN_LEFT:
<?php
/*
$Id: column_left.php,v 1.1.1.1 2006/08/14 09:44:15 User Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
?>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><?=tep_image(DIR_WS_IMAGES.'m15.gif')?></td></tr>
<tr><td width="153" height="42" class="bg1" style="padding-left:20px;"><span class="tx1"><?=HEADER_TITLE_CATALOG?></span></td></tr>
<tr><td bgcolor="#2D2D2D">
<table border="0" cellspacing="0" cellpadding="0" width="130" align="center">
<tr><td height="13"></td></tr>
<tr><td><ul>
<?
function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array, $ii;
$ii++;
if(!$tree[$counter]['level']){
$categories_string .= $categories_string ? '' : '';
$categories_string .= '<li><a href=';
if ($tree[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
} else {
$cPath_new = 'cPath=' . $tree[$counter]['path'];
}
$categories_string .= tep_href_link('index.php', $cPath_new) . '>';
// display categry name
$categories_string .= $tree[$counter]['name'];
$categories_string .= '</a></li>';
}else{ // SUBCATEGORY
$categories_string .= '';
for($i=0;$i<$tree[$counter]['le vel'];$i++)
$categories_string .= '';
$categories_string .= '<li class="mysubcat"><a href=';
if ($tree[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
} else {
$cPath_new = 'cPath=' . $tree[$counter]['path'];
}
$categories_string .= tep_href_link('index.php', $cPath_new) . '>';
// display category name
$categories_string .= $tree[$counter]['name'];
$categories_string .= '</a></li>';
}
if ($tree[$counter]['next_id'] != false && $ii < 20) {
tep_show_category($tree[$counter]['next_id']);
}
}
define(TABLE_CATEGORIES, "categories");
define(TABLE_CATEGORIES_DESCRIPTION, "categories_description");
$categories_string = '';
$tree = array();
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],
'parent' => $categories['parent_id'],
'level' => 0,
'path' => $categories['categories_id'],
'next_id' => false);
if (isset($parent_id)) {
$tree[$parent_id]['next_id'] = $categories['categories_id'];
}
$parent_id = $categories['categories_id'];
if (!isset($first_element)) {
$first_element = $categories['categories_id'];
}
}
//------------------------
if ($cPath) {
$new_path = '';
reset($cPath_array);
while (list($key, $value) = each($cPath_array)) {
unset($parent_id);
unset($first_id);
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
if (tep_db_num_rows($categories_query)) {
$new_path .= $value;
while ($row = tep_db_fetch_array($categories_query)) {
$tree[$row['categories_id']] = array('name' => $row['categories_name'],
'parent' => $row['parent_id'],
'level' => $key+1,
'path' => $new_path . '_' . $row['categories_id'],
'next_id' => false);
if (isset($parent_id)) {
$tree[$parent_id]['next_id'] = $row['categories_id'];
}
$parent_id = $row['categories_id'];
if (!isset($first_id)) {
$first_id = $row['categories_id'];
}
$last_id = $row['categories_id'];
}
$tree[$last_id]['next_id'] = $tree[$value]['next_id'];
$tree[$value]['next_id'] = $first_id;
$new_path .= '_';
} else {
break;
}
}
}
$categories_string .= '';
tep_show_category($first_element);
$categories_string .= '';
echo $categories_string;
?>
</ul></td></tr>
<tr><td height="24"></td></tr>
</table>
</td></tr>
<tr><td id="zxc1"><a href="<?=tep_href_link('index.php?cPath=21')?>"><?=tep_image(DIR_WS_IMAGES.'m17.gif')?></a></td></tr>
</table>
-----------------------------------------------------------------------------
questo è il file information.php originale da modificare: (ho un file information.php ma non utilizzato):
<?php
/*
$Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
?>
<!-- information //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);
new infoBoxHeading($info_box_contents, false, false);
$info_box_contents = array();
$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- information_eof //-->
spero che abbiate capito il mio problema, perche sono ormai 2 giorni che provo a fare tentativi su tentativi ma niente
HELPPP
ho un problema. Sto cercando in tutti i modi di inserire un menu laterale di informazione nel quale ci siano pagine aggiuntive tipo : "chi siamo", "condizioni", ecc.. Sono i grado si fare una cosa del genere se ho appena installato oscommerce, ma purtroppo il mio sito è stato creato da una persona a cui glielo avevo chiesto ed è stato montato un template che mi ha modificato parecchio i file di base. Ho provato da solo ad aggiungere questo menu laterale ma mi succede un casino tipo che la pagine centrale mi va a finire tutta a sinistra oppure tutto in basso.
Quindi il mio obiettivo è:
- aggiungere un menu laterale sotto o al posto dell immagine "our solution, for buisness & education" (guardate nel sito www.emca4.com)
- oppure aggiungere solamente una pagina "chi siamo".
questa è la colonna di sinistra da modificare,premetto che ho già provato a mettere:
require(DIR_WS_BOXES . 'information.php');
dentro la prima apertura di php ma la pagina centrale va a puttane.
COLUMN_LEFT:
<?php
/*
$Id: column_left.php,v 1.1.1.1 2006/08/14 09:44:15 User Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
?>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><?=tep_image(DIR_WS_IMAGES.'m15.gif')?></td></tr>
<tr><td width="153" height="42" class="bg1" style="padding-left:20px;"><span class="tx1"><?=HEADER_TITLE_CATALOG?></span></td></tr>
<tr><td bgcolor="#2D2D2D">
<table border="0" cellspacing="0" cellpadding="0" width="130" align="center">
<tr><td height="13"></td></tr>
<tr><td><ul>
<?
function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array, $ii;
$ii++;
if(!$tree[$counter]['level']){
$categories_string .= $categories_string ? '' : '';
$categories_string .= '<li><a href=';
if ($tree[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
} else {
$cPath_new = 'cPath=' . $tree[$counter]['path'];
}
$categories_string .= tep_href_link('index.php', $cPath_new) . '>';
// display categry name
$categories_string .= $tree[$counter]['name'];
$categories_string .= '</a></li>';
}else{ // SUBCATEGORY
$categories_string .= '';
for($i=0;$i<$tree[$counter]['le vel'];$i++)
$categories_string .= '';
$categories_string .= '<li class="mysubcat"><a href=';
if ($tree[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
} else {
$cPath_new = 'cPath=' . $tree[$counter]['path'];
}
$categories_string .= tep_href_link('index.php', $cPath_new) . '>';
// display category name
$categories_string .= $tree[$counter]['name'];
$categories_string .= '</a></li>';
}
if ($tree[$counter]['next_id'] != false && $ii < 20) {
tep_show_category($tree[$counter]['next_id']);
}
}
define(TABLE_CATEGORIES, "categories");
define(TABLE_CATEGORIES_DESCRIPTION, "categories_description");
$categories_string = '';
$tree = array();
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],
'parent' => $categories['parent_id'],
'level' => 0,
'path' => $categories['categories_id'],
'next_id' => false);
if (isset($parent_id)) {
$tree[$parent_id]['next_id'] = $categories['categories_id'];
}
$parent_id = $categories['categories_id'];
if (!isset($first_element)) {
$first_element = $categories['categories_id'];
}
}
//------------------------
if ($cPath) {
$new_path = '';
reset($cPath_array);
while (list($key, $value) = each($cPath_array)) {
unset($parent_id);
unset($first_id);
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
if (tep_db_num_rows($categories_query)) {
$new_path .= $value;
while ($row = tep_db_fetch_array($categories_query)) {
$tree[$row['categories_id']] = array('name' => $row['categories_name'],
'parent' => $row['parent_id'],
'level' => $key+1,
'path' => $new_path . '_' . $row['categories_id'],
'next_id' => false);
if (isset($parent_id)) {
$tree[$parent_id]['next_id'] = $row['categories_id'];
}
$parent_id = $row['categories_id'];
if (!isset($first_id)) {
$first_id = $row['categories_id'];
}
$last_id = $row['categories_id'];
}
$tree[$last_id]['next_id'] = $tree[$value]['next_id'];
$tree[$value]['next_id'] = $first_id;
$new_path .= '_';
} else {
break;
}
}
}
$categories_string .= '';
tep_show_category($first_element);
$categories_string .= '';
echo $categories_string;
?>
</ul></td></tr>
<tr><td height="24"></td></tr>
</table>
</td></tr>
<tr><td id="zxc1"><a href="<?=tep_href_link('index.php?cPath=21')?>"><?=tep_image(DIR_WS_IMAGES.'m17.gif')?></a></td></tr>
</table>
-----------------------------------------------------------------------------
questo è il file information.php originale da modificare: (ho un file information.php ma non utilizzato):
<?php
/*
$Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
?>
<!-- information //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);
new infoBoxHeading($info_box_contents, false, false);
$info_box_contents = array();
$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- information_eof //-->
spero che abbiate capito il mio problema, perche sono ormai 2 giorni che provo a fare tentativi su tentativi ma niente
HELPPP
