FAQ_System_3_0 piccolo problema

Questo forum è dedicato alle discussioni riguardanti le contribution per osCommerce

Moderatore: mod Generali

Rispondi
lian
membro Junior
membro Junior
Messaggi: 16
Iscritto il: 17/08/2006, 14:55

FAQ_System_3_0 piccolo problema

Messaggio da lian »

salve a tutti....
mi sono avvicinato ad oscommerce per necessità e adesso mi sto divertendo una cifra....

Mi sto facendo il mio piccolo pacchetto
ecco a che punto sono

Tengo a specificare che io utilizzo XAMPP come web server

Ho istallato una Template monster...la 9005...

-istallato pach per registre_blobal
-istallato pacchetto per la lingua italiana
-istallato tutti i metodi di spedizione
-istallato metodi di pagamento
-corretto errore cookie
-corretto errore che mi dava nell'apertura dei prodotti (errore 1054)
-corretto errore nella ricerca avanzata
-corretto errore del file Upload linea 31
-istallato contribution Admin_Access_22a
-istallato contribution FAQ_System_3_0

anche l'ultima contrib funziona...perlomeno nel lato admin...però ho un piccolo problema...come faccio a farla comparire nella template che ho...nella home per capirci...
se non sbaglio questa contrib dovrebbe apparire nel box information nella colonna sinistra...ma niente...non appare...
ecco il codice di information.php

Codice: Seleziona tutto

<?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);
// FAQ SYSTEM 2.1
'<a href="' . tep_href_link(FILENAME_FAQ) . '">' . BOX_INFORMATION_FAQ . '</a><br>';  
// FAQ SYSTEM 2.1
?>
            </td>
          </tr>
<!-- information_eof //-->
e ecco il codice di column_left.php

Codice: Seleziona tutto

*/

  if ((USE_CACHE == 'true') && empty($SID)) {
    echo tep_cache_categories_box();
  } else {
    include(DIR_WS_BOXES . 'categories.php');
  }

  if ((USE_CACHE == 'true') && empty($SID)) {
    echo tep_cache_manufacturers_box();
  } else {
    include(DIR_WS_BOXES . 'manufacturers.php');
  }

  require(DIR_WS_BOXES . 'whats_new.php');
  require(DIR_WS_BOXES . 'search.php');
  require(DIR_WS_BOXES . 'information.php');
?>
mi date una mano...
un grazie anticipato
ciao
lian
ps ecco la template grafica
Immagine
loris_ripa
membro Veteran
membro Veteran
Messaggi: 937
Iscritto il: 21/03/2004, 1:00
Località: Italia
Contatta:

Messaggio da loris_ripa »

Prova così:

Codice: Seleziona tutto

$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>' .

// FAQ SYSTEM 2.1
'<a href="' . tep_href_link(FILENAME_FAQ) . '">' . BOX_INFORMATION_FAQ . '</a><br>'.
// FAQ SYSTEM 2.1 

                                         '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');  
lian
membro Junior
membro Junior
Messaggi: 16
Iscritto il: 17/08/2006, 14:55

Messaggio da lian »

Ciao
grazie della risposta
ho provato a sostituire questo

Codice: Seleziona tutto

  $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); 
// FAQ SYSTEM 2.1 
'<a href="' . tep_href_link(FILENAME_FAQ) . '">' . BOX_INFORMATION_FAQ . '</a><br>';  
// FAQ SYSTEM 2.1 
con questo....

Codice: Seleziona tutto

$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>' . 

// FAQ SYSTEM 2.1 
'<a href="' . tep_href_link(FILENAME_FAQ) . '">' . BOX_INFORMATION_FAQ . '</a><br>'. 
// FAQ SYSTEM 2.1 

                                         '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
ma nulla da fare...nella pagina principale non compare...
ma nondevo cambiare qualcosa nell'index o nell'header..
HELP ME............
loris_ripa
membro Veteran
membro Veteran
Messaggi: 937
Iscritto il: 21/03/2004, 1:00
Località: Italia
Contatta:

Messaggio da loris_ripa »

Prova a postare il file index.php e header.php.
lian
membro Junior
membro Junior
Messaggi: 16
Iscritto il: 17/08/2006, 14:55

Messaggio da lian »

Ecco il codice.....
index.php

Codice: Seleziona tutto

<?php
/*
  $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

// the following cPath references come from application_top.php
  $category_depth = 'top';
  if (isset($cPath) && tep_not_null($cPath)) {
    $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
    $cateqories_products = tep_db_fetch_array($categories_products_query);
    if ($cateqories_products['total'] > 0) {
      $category_depth = 'products'; // display products
    } else {
      $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
      $category_parent = tep_db_fetch_array($category_parent_query);
      if ($category_parent['total'] > 0) {
        $category_depth = 'nested'; // navigate through the categories
      } else {
        $category_depth = 'products'; // category has no products, but display the 'no products' message
      }
    }
  }

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
<!-- body_text //-->
<?php
  if ($category_depth == 'nested') {
    $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
    $category = tep_db_fetch_array($category_query);
?>
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
<?php
    if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
      $category_links = array_reverse($cPath_array);
      for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
        $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
        $categories = tep_db_fetch_array($categories_query);
        if ($categories['total'] < 1) {
          // do nothing, go through the loop
        } else {
          $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
          break; // we've found the deepest category the customer is in
        }
      }
    } else {
      $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
    }

    $number_of_categories = tep_db_num_rows($categories_query);

    $rows = 0;
    while ($categories = tep_db_fetch_array($categories_query)) {
      $rows++;
      $cPath_new = tep_get_path($categories['categories_id']);
      $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
      echo '                <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";
      if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
        echo '              </tr>' . "\n";
        echo '              <tr>' . "\n";
      }
    }

// needed for the new products module shown below
    $new_products_category_id = $current_category_id;
?>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
          </tr>
          <tr>
            <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
<?php
  } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
// create column list
    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                         'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
                         'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
                         'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
                         'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
                         'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
                         'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
                         'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

    asort($define_list);

    $column_list = array();
    reset($define_list);
    while (list($key, $value) = each($define_list)) {
      if ($value > 0) $column_list[] = $key;
    }

    $select_column_list = '';

    for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
      switch ($column_list[$i]) {
        case 'PRODUCT_LIST_MODEL':
          $select_column_list .= 'p.products_model, ';
          break;
        case 'PRODUCT_LIST_NAME':
          $select_column_list .= 'pd.products_name, ';
          break;
        case 'PRODUCT_LIST_MANUFACTURER':
          $select_column_list .= 'm.manufacturers_name, ';
          break;
        case 'PRODUCT_LIST_QUANTITY':
          $select_column_list .= 'p.products_quantity, ';
          break;
        case 'PRODUCT_LIST_IMAGE':
          $select_column_list .= 'p.products_image, ';
          break;
        case 'PRODUCT_LIST_WEIGHT':
          $select_column_list .= 'p.products_weight, ';
          break;
      }
    }

// show the products of a specified manufacturer
    if (isset($HTTP_GET_VARS['manufacturers_id'])) {
      if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
        $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'] . "'";
      } else {
// We show them all
        $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'] . "'";
      }
    } else {
// show the products in a given categorie
      if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
        $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 . "'";
      } else {
// We show them all
        $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 . "'";
      }
    }

    if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
      for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
        if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
          $HTTP_GET_VARS['sort'] = $i+1 . 'a';
          $listing_sql .= " order by pd.products_name";
          break;
        }
      }
    } else {
      $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
      $sort_order = substr($HTTP_GET_VARS['sort'], 1);
      $listing_sql .= ' order by ';
      switch ($column_list[$sort_col-1]) {
        case 'PRODUCT_LIST_MODEL':
          $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_NAME':
          $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
          break;
        case 'PRODUCT_LIST_MANUFACTURER':
          $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_QUANTITY':
          $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_IMAGE':
          $listing_sql .= "pd.products_name";
          break;
        case 'PRODUCT_LIST_WEIGHT':
          $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_PRICE':
          $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
      }
    }
?>
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

      
<!--

      
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<?php
// optional Product List Filter
    if (PRODUCT_LIST_FILTER > 0) {
      if (isset($HTTP_GET_VARS['manufacturers_id'])) {
        $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
      } else {
        $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
      }
      $filterlist_query = tep_db_query($filterlist_sql);
      if (tep_db_num_rows($filterlist_query) > 1) {
        echo '            <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' ';
        if (isset($HTTP_GET_VARS['manufacturers_id'])) {
          echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
          $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
        } else {
          echo tep_draw_hidden_field('cPath', $cPath);
          $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
        }
        echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
        while ($filterlist = tep_db_fetch_array($filterlist_query)) {
          $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
        }
        echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
        echo '</form></td>' . "\n";
      }
    }

// Get the right image for the top-right
    $image = DIR_WS_IMAGES . 'table_background_list.gif';
    if (isset($HTTP_GET_VARS['manufacturers_id'])) {
      $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
      $image = tep_db_fetch_array($image);
      $image = $image['manufacturers_image'];
    } elseif ($current_category_id) {
      $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
      $image = tep_db_fetch_array($image);
      $image = $image['categories_image'];
    }
?>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>


-->

      
      <tr>
        <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
      </tr>
    </table></td>
<?php
  } else { // default page
?>
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td>

          
              <table cellspacing=0 cellpadding=0>
                <tr>
                  <td width=362 valign=top>
<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>
                   </td>
                   <td width=3></td>
                   <td width=161 valign=top>
                    <table cellspacing=0 cellpadding=0>
                     <tr><td>
                          <table cellspacing=0 cellpadding=0>
                           <tr><td colspan=2><a href=<?=tep_href_link('product_info.php', 'cPath=23&products_id=55')?>><img src=images/m54.gif width=161 height=118 border=0></a></td></tr>
                           <tr><td><img src=images/m55.gif width=68 height=30><a href=<?=tep_href_link('product_info.php', 'cPath=23&products_id=55')?>><img src=images/m56.gif width=93 height=30 border=0></a></td></tr>
                           <tr><td colspan=2><a href=<?=tep_href_link('index.php', 'cPath=21')?>><img src=images/m57.gif width=161 height=145 border=0></a></td></tr>
                          </table>
                     </td></td>
                     <tr><td height=3></td></tr>
                     <tr><td>
                          <table cellspacing=0 cellpadding=0>
                           <tr><td colspan=2><a href=<?=tep_href_link('product_info.php', 'cPath=29&products_id=98')?>><img src=images/m41.gif width=161 height=119 border=0></a></td></tr>
                           <tr><td><img src=images/m40.gif width=63 height=29><a href=#><img src=images/m39.gif width=98 height=29 border=0></a></td></tr>                           
                          </table>
                     </td></td>                     
                    </table>
               </td></tr>
              </table>


              
        </td>
      </tr>
    </table>

    </td>
<?php
  }
?>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
e header.php

Codice: Seleziona tutto

<?php
/*
  $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

// check if the 'install' directory exists, and warn of its existence
  if (WARN_INSTALL_EXISTENCE == 'true') {
    if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
      $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
    }
  }

// check if the configure.php file is writeable
  if (WARN_CONFIG_WRITEABLE == 'true') {
    if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
      $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
    }
  }

// check if the session folder is writeable
  if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
    if (STORE_SESSIONS == '') {
      if (!is_dir(tep_session_save_path())) {
        $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
      } elseif (!is_writeable(tep_session_save_path())) {
        $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
      }
    }
  }

// check session.auto_start is disabled
  if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
    if (ini_get('session.auto_start') == '1') {
      $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
    }
  }

  if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
    if (!is_dir(DIR_FS_DOWNLOAD)) {
      $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
    }
  }

  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }
?>


  <table cellspacing=0 cellpadding=0 width=736 align=center>
   <tr><td>
        <table cellspacing=0 cellpadding=0>
         <tr><td height=13 colspan=6></td></tr>
         <tr><td><a href=<?=tep_href_link('index.php')?>><img src=images/m01.gif width=251 height=70 border=0></a></td>
             <td width=75></td>
             <td><img src=images/m02.jpg width=125 height=70></td>
             <td width=125 height=70>
              <table cellspacing=0 cellpadding=0 width=86 align=center>
               <tr><td class=cy>Choose your language:</td></tr>
               <tr><td height=8></td></tr>
               <tr><td>

<? // LANGUAGES

  if (!isset($lng) || (isset($lng) && !is_object($lng))) {
    include(DIR_WS_CLASSES . 'language.php');
    $lng = new language;
  }

  $languages_string = '';
  reset($lng->catalog_languages);
  while (list($key, $value) = each($lng->catalog_languages)) {
    $languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
  }

  echo $languages_string;

?>                           

               </td></tr>
              </table>                     
             </td>
             <td><img src=images/m17.gif width=1 height=70></td>
             <td width=159 height=70>
              <table cellspacing=0 cellpadding=0 align=center width=133>
               <tr><td height=10 colspan=2></td></tr>
               <tr><td align=center><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m03.gif width=33 height=33 border=0></a></td><td class=cy>Shoping<br>Cart</td></tr>
               <tr><td height=3 colspan=2></td></tr>               
               <tr><td colspan=2>now in your cart<b>  <a href=<?=tep_href_link('shopping_cart.php')?> class=ml><?=$cart->count_contents()?> items</a></b></td></tr>               
               <tr><td height=8 colspan=2></td></tr>
              </table>                                                            
         </td></tr>
        </table>
        <table cellspacing=0 cellpadding=0>
         <tr><td width=199 valign=top>
              <table cellspacing=0 cellpadding=0>
               <tr><td><img src=images/m07.gif width=199 height=13></td></tr>               
               <tr><td><a href=<?=tep_href_link('index.php')?>><img src=images/m18.gif width=199 height=29 border=0></a></td></tr>
               <tr><td><a href=<?=tep_href_link('products_new.php')?>><img src=images/m19.gif width=199 height=25 border=0></a></td></tr>
               <tr><td><a href=<?=tep_href_link('account.php')?>><img src=images/m20.gif width=199 height=24 border=0></a></td></tr>
               <tr><td><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m21.gif width=199 height=24 border=0></a></td></tr>
               <tr><td><a href=<?=tep_href_link('checkout_shipping.php')?>><img src=images/m22.gif width=199 height=31 border=0></a></td></tr>                              
               <tr><td><img src=images/m15.gif width=199 height=18></td></tr>
              </table>
             </td>
             <td valign=top><img src=images/m08.jpg width=203 height=164><img src=images/m09.jpg width=174 height=164></td>
             <td>
              <table cellspacing=0 cellpadding=0 height=164 border=0>
               <tr><td><img src=images/m10.gif width=160 height=16></td></tr>
               <tr><td class=bg>
                    <table cellspacing=0 cellpadding=0 width=127 align=center>
                     <tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('specials.php')?> class=ml1>Specials</a></td></tr>
                     <tr><td height=2></td></tr>                          
                     <tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('advanced_search.php')?> class=ml1>Search</a></td></tr>
                     <tr><td height=2></td></tr>                          
                     <tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('contact_us.php')?> class=ml1>Contact Us</a></td></tr>
                     <tr><td height=2></td></tr>                          
                     <tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('create_account.php')?> class=ml1>Create an account</a></td></tr>
                     <tr><td height=2></td></tr>                          
                     <tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('login.php')?> class=ml1>Customer Login</a></td></tr>
                     <tr><td height=12></td></tr>                          
                     <tr><td><img src=images/m14.gif width=127 height=1></td></tr>                          
                     <tr><td height=4></td></tr>                          
                     <tr><td><b><font color=#000000>currensies</font></b></td></tr>
                     <tr><td height=4></td></tr>                          
                     <tr><td>
<? // CURRENCIES

    echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get');

    reset($currencies->currencies);
    $currencies_array = array();
    while (list($key, $value) = each($currencies->currencies)) {
      $currencies_array[] = array('id' => $key, 'text' => $value['title']);
    }

    $hidden_get_variables = '';
    reset($HTTP_GET_VARS);
    while (list($key, $value) = each($HTTP_GET_VARS)) {
      if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
        $hidden_get_variables .= tep_draw_hidden_field($key, $value);
      }
    }

    echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id();
    echo '</form>';
    
?>               
                     
                     </td></tr>
                    </table>
               </td></tr>
               <tr><td><img src=images/m16.gif width=160 height=18></td></tr>
              </table>
         </td></tr>
        </table>
        <table cellspacing=0 cellpadding=0>
         <tr><td colspan=3 height=3></td></tr>
         <tr><td width=207 valign=top>
              <table cellspacing=0 cellpadding=0>
               <tr><td><img src=images/m24.gif width=207 height=40></td></tr>
               <tr><td class=bg1>
                    <table cellspacing=0 cellpadding=0 width=167 align=center>
                     <tr><td height=18></td></tr>

<?   // ---- CATEGORIES

  function tep_show_category($counter) {
    global $tree, $categories_string, $cPath_array;

   if(!$tree[$counter]['level']){
                     
                     
    $categories_string .= $categories_string ? '<tr><td><img src=images/m26.gif width=167 height=1><br><br class=px2></td></tr>' : '';             

    $categories_string .= '<tr><td><img src=images/m25.gif width=5 height=5 align=absmiddle>   <a class=ml1 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><br><br class=px4></td></tr>';
   }else{
    $categories_string .= '<tr><td>';

    for($i=0;$i<$tree[$counter]['level'];$i++)
     $categories_string .= '   ';
    
    $categories_string .= ' - <a class=ml1 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><br><br class=px4></td></tr>';
   }  

    if ($tree[$counter]['next_id'] != false) {
      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;
?>
                     <tr><td height=5></td></tr>                    
                    </table>
               </td></tr>
               <tr><td><img src=images/m27.gif width=207 height=6></td></tr>
               <tr><td height=3></td></tr>
              </table>
              <table cellspacing=0 cellpadding=0>
               <tr><td><img src=images/m28.gif width=207 height=40></td></tr>
               <tr><td class=bg1>
                    <table cellspacing=0 cellpadding=0 width=175 align=center border=0>

                    <?
                     echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');

               echo '<tr><td height=17 colspan=2></td></tr>
                     <tr><td valign=top align=right>'.tep_draw_input_field('keywords', '', 'size="20" maxlength="30" class=go') . ' ' . tep_hide_session_id() . '</td><td valign=top align=left> <input type=image src=images/m30.gif width=31 height=21></td></tr>
                     <tr><td height=8 colspan=2></td></tr>
                     <tr><td colspan=2><a class=ml2 href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a></td></tr>
                     <tr><td height=8 colspan=2></td></tr>
                    </form>';
                    ?>
                     
                    </table>
               </td></tr>
               <tr><td><img src=images/m27.gif width=207 height=6></td></tr>
              </table>
             </td>
             <td width=3 valign=top></td>
             <td width=526 valign=top>
HELP ME
lian
membro Junior
membro Junior
Messaggi: 16
Iscritto il: 17/08/2006, 14:55

Messaggio da lian »

up up
loris_ripa
membro Veteran
membro Veteran
Messaggi: 937
Iscritto il: 21/03/2004, 1:00
Località: Italia
Contatta:

Messaggio da loris_ripa »

Mhmmm sicuramente l'inghippo è nell'header.
Butto lì un'ipotesi, guarda nel file header.php le righe da 101 in avanti:

Codice: Seleziona tutto

<tr><td><img src=images/m07.gif width=199 height=13></td></tr>               
               <tr><td><a href=<?=tep_href_link('index.php')?>><img src=images/m18.gif width=199 height=29 border=0></a></td></tr>
               <tr><td><a href=<?=tep_href_link('products_new.php')?>><img src=images/m19.gif width=199 height=25 border=0></a></td></tr>
               <tr><td><a href=<?=tep_href_link('account.php')?>><img src=images/m20.gif width=199 height=24 border=0></a></td></tr>
               <tr><td><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m21.gif width=199 height=24 border=0></a></td></tr>
               <tr><td><a href=<?=tep_href_link('checkout_shipping.php')?>><img src=images/m22.gif width=199 height=31 border=0></a></td></tr>                             
               <tr><td><img src=images/m15.gif width=199 height=18></td></tr>
              </table>
             </td>
             <td valign=top><img src=images/m08.jpg width=203 height=164><img src=images/m09.jpg width=174 height=164></td>
             <td>
              <table cellspacing=0 cellpadding=0 height=164 border=0>
               <tr><td><img src=images/m10.gif width=160 height=16></td></tr>
               <tr><td class=bg>
                    <table cellspacing=0 cellpadding=0 width=127 align=center>
                     <tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('specials.php')?> class=ml1>Specials</a></td></tr>
                     <tr><td height=2></td></tr>                         
                     <tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('advanced_search.php')?> class=ml1>Search</a></td></tr>
                     <tr><td height=2></td></tr>                         ????;?
                     <tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('contact_us.php')?> class=ml1>Contact Us</a></td></tr>
                     <tr><td height=2></td></tr>                         
                     <tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('create_account.php')?> class=ml1>Create an account</a></td></tr>
                     <tr><td height=2></td></tr>                         
                     <tr><td><img src=images/m12.gif width=3 height=3 align=absmiddle>   <a href=<?=tep_href_link('login.php')?> class=ml1>Customer Login</a></td></tr>
                     <tr><td height=12></td></tr>                         
                     <tr><td><img src=images/m14.gif width=127 height=1></td></tr>                         
                     <tr><td height=4></td></tr>                         
                     <tr><td><b><font color=#000000>currensies</font></b></td></tr>
                     <tr><td height=4></td></tr> 

Adesso o nel primo elenco o nel secondo devi aggiungere:

Codice: Seleziona tutto

<tr><td><a href=<?=tep_href_link('faq.php')?>><img src=images/m18.gif width=199 height=29 border=0></a></td></tr> 
Ovviamente se il nome del file è diverso da faq.php cambialo.
Rispondi