Pagina 1 di 2

Offerte in Home Page al posto di nuovi prodotti

Inviato: 14/06/2004, 10:10
da forgyx
come da oggetto come posso fare per inserire le offerte in Home Page al posto del modulo 'nuovi prodotti del mese'?
mi dovrebbero comparire tutti i prodotti ke ho in offerta nella pagina principale!

-------------------------------------------
per nn "sprecare" un altro topic:
come posso nascondere il box categorie ai visitatori?
volgio ke compaia solo ai registrati!

Inviato: 14/06/2004, 16:53
da forgyx
nn merito risposta :(

dai :mrgreen:

Inviato: 15/06/2004, 23:21
da forgyx
ho perso la speranza :(

Inviato: 22/01/2005, 19:17
da giok2000
sapere questo però è imporante... e utile.. nessuno risponde?? come si potrebbe fare??

Inviato: 28/01/2005, 18:55
da giok2000
nessuno sa rispondere in merito a questo??

Inviato: 28/01/2005, 19:54
da hozone
mai disperare ;)
questo dovrebbe andare


crea un files tipo specials_prod.php in includes/modules/

con questo codice

Codice: Seleziona tutto

<?php
/*
   osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
?>
<?php
  $info_box_contents = array();
  $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

  new contentBoxHeading($info_box_contents);

  if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
    $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p right join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
  } else {
    $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p right join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
  }

  $row = 0;
  $col = 0;
  $info_box_contents = array();
  while ($new_products = tep_db_fetch_array($new_products_query)) {
    $new_products['products_name'] = tep_get_products_name($new_products['products_id']);
    $info_box_contents[$row][$col] = array('align' => 'center',
                                           'params' => 'class="smallText" width="33%" valign="top"',
                                           'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));

    $col ++;
    if ($col > 2) {
      $col = 0;
      $row ++;
    }
  }

  new contentBox($info_box_contents);
?>

poi in index.php nella root del sito

usa il seguente codice per aggiungere il modulo creato ;)

Codice: Seleziona tutto

          <tr>
			<td><?php include(DIR_WS_MODULES . "specials_prod.php"); ?></td>
          </tr>
		  <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
          </tr>


naturlamente è da personalizzare etc... ma mi sembra che come primo aid ;) sia buono.

Inviato: 28/01/2005, 20:05
da giok2000
buono.... grande hozone... :wink: aiutiamoli sti ragazzi....

Inviato: 04/02/2005, 10:24
da Cattivik
hozone ha scritto: poi in index.php nella root del sito

usa il seguente codice per aggiungere il modulo creato ;)

Codice: Seleziona tutto

          <tr>
			<td><?php include(DIR_WS_MODULES . "specials_prod.php"); ?></td>
          </tr>
		  <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
          </tr>


naturlamente è da personalizzare etc... ma mi sembra che come primo aid ;) sia buono.
scusate non so dove va inserito nel file questo codice ...

beata ignoranza

Inviato: 04/02/2005, 10:56
da MATMAG
al posto di :

// 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'])) {


devi aggiungere il seguente codice



// needed for the offert products module shown below
?>
<tr>
<td><?php include(DIR_WS_MODULES . "specials_prod.php"); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php



ciao
Matmag / Massimo

Inviato: 04/02/2005, 16:58
da Cattivik
ho provato ma non funziona ... che handicap che sono

comunque se è possibile spiegarmelo

vorrei mettere sotto le novità a sx una casella con le offerte...

:D :oops:

GRAZIE

Inviato: 04/02/2005, 17:45
da MATMAG
ciao, in effetti non funziona neanche a me, sto strudiando la cosa e se scopro novità ti faccio sapere. io cercavo di far apparire le offerte nella parte centrale.

Ciao Massimo

Inviato: 04/02/2005, 17:54
da Cattivik
TKS

Inviato: 16/02/2005, 15:44
da giok2000
hozone non funziona è vero... da problemi...

Inviato: 16/02/2005, 16:02
da hozone
funziona funziona!;)

copia il codice che ho scritto nel file modules/new_products.php.
8)

Inviato: 16/02/2005, 16:20
da giok2000
non fuziona se hai il total packdi simona... sbrocchesi di brutto...!!! dice che c'è un problema con le currencies.....