Novembre 24, 2014, 11:20:49 pm *
Benvenuto, Visitatore. Per favore, effettua il login o registrati.

Login con username, password e lunghezza della sessione
News: SMF - Just Installed!
 
   Home   Help Ricerca Download Utenti Login Registrati  
Pagine: [1]
  Stampa  
Autore Topic: upcoming_products - prodotti in arrivo  (Letto 7123 volte)
0 Utenti e 1 Visitatore stanno guardando questo topic.
masmaz
Membro Regolare
***
Offline Offline

Posts: 198



Email
« il: Settembre 29, 2008, 04:26:13 pm »

Nel file originale e nella traduzione del pack 1.3 questo file pemetteva solo di visualizzare 2 linee separatrici e il testo del prodotto...

nel nuovo file, che ho elaborato, ora è uguale agli altri box come: prodotti in vetrina e prodotti in offerta, cioè racchiuso in un box dove si visualizzano testo e immagine del prodotto in arrivo.

Questo è il codice da copiare ed incollare nel file include/mudules/upcoming_products.php:

Codice:
<?php
/*
  $Id: upcoming_products.php,v 1.25 2008/09/28 16:20:30 

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

  Copyright (c) 2008 osCommerce

  Released under the GNU General Public License
*/
  
$expected_query tep_db_query("select p.products_id, pd.products_name, p.products_image, products_date_available as date_expected from " TABLE_PRODUCTS " p, " .  TABLE_PRODUCTS_DESCRIPTION " pd where to_days(products_date_available) >= to_days(now()) and p.products_id = pd.products_id and pd.language_id = '" . (int)  $languages_id "'order by " EXPECTED_PRODUCTS_FIELD " " EXPECTED_PRODUCTS_SORT " limit " MAX_DISPLAY_UPCOMING_PRODUCTS); 
  if (
tep_db_num_rows($expected_query) > 0) {
?>

<!-- upcoming_products //-->
 <tr>
            <td>
  <?php
  
  $info_box_contents 
= array();
  
$info_box_contents[] = array('text' => TABLE_HEADING_UPCOMING_PRODUCTS);
  new 
contentBoxHeading($info_box_contentsfalsefalsetep_href_link(FILENAME_UPCOMING_PRODUCTS), $column_location);

  
$row 0;
  
$col 0;
  
$info_box_contents = array();
    while (
$expected tep_db_fetch_array($expected_query)) {

//TotalB2B start & TotalB2B start
if ($new_price tep_get_products_special_price($expected['products_id'])) {
      
$expected['products_price'] = $new_price;
    
$info_box_contents[$row][$col] = array('params' => 'class="TrentaTre"',
                                           
'text' => '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $new_products['products_id']) . '">'
                                            
tep_image(DIR_WS_IMAGES $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a><br />
                                           <a href="' 
tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">' $expected['products_name'] . '</a>
                                           <br />' 
$currencies->display_price_nodiscount($expected['products_price'], tep_get_tax_rate($expected['products_tax_class_id'])));
    } else {
       
tep_xppp_getproductprice($expected['products_id']);
    
$info_box_contents[$row][$col] = array('params' => 'align="center"',
                                           
'text' => '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">'
                                            
tep_image(DIR_WS_IMAGES $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a><br />
                                           <a href="' 
tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">' $expected['products_name'] . '</a>
                                           <br />' 
$currencies->display_price($expected['products_id'], $expected['products_price'], tep_get_tax_rate($expected['products_tax_class_id'])));
    }
//TotalB2B end & TotalB2B end

    
$col ++;
      if (
$col 2) {
        
$col 0;
        
$row ++;
      }
    }
    
  new 
contentBox($info_box_contents);
?>

 </tr>
            </td>
<!-- upcoming_products_eof //-->

<?php
  
}
?>

buon lavoro.........
« Ultima modifica: Settembre 29, 2008, 04:32:16 pm da masmaz » Loggato

  Massimo
mike
Membro Junior
**
Offline Offline

Posts: 53


« Risposta #1 il: Settembre 29, 2008, 05:34:19 pm »

Nel file originale e nella traduzione del pack 1.3 questo file pemetteva solo di visualizzare 2 linee separatrici e il testo del prodotto...

nel nuovo file, che ho elaborato, ora è uguale agli altri box come: prodotti in vetrina e prodotti in offerta, cioè racchiuso in un box dove si visualizzano testo e immagine del prodotto in arrivo.

Questo è il codice da copiare ed incollare nel file include/mudules/upcoming_products.php:

Codice:
<?php
/*
  $Id: upcoming_products.php,v 1.25 2008/09/28 16:20:30 

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

  Copyright (c) 2008 osCommerce

  Released under the GNU General Public License
*/
  
$expected_query tep_db_query("select p.products_id, pd.products_name, p.products_image, products_date_available as date_expected from " TABLE_PRODUCTS " p, " .  TABLE_PRODUCTS_DESCRIPTION " pd where to_days(products_date_available) >= to_days(now()) and p.products_id = pd.products_id and pd.language_id = '" . (int)  $languages_id "'order by " EXPECTED_PRODUCTS_FIELD " " EXPECTED_PRODUCTS_SORT " limit " MAX_DISPLAY_UPCOMING_PRODUCTS); 
  if (
tep_db_num_rows($expected_query) > 0) {
?>

<!-- upcoming_products //-->
 <tr>
            <td>
  <?php
  
  $info_box_contents 
= array();
  
$info_box_contents[] = array('text' => TABLE_HEADING_UPCOMING_PRODUCTS);
  new 
contentBoxHeading($info_box_contentsfalsefalsetep_href_link(FILENAME_UPCOMING_PRODUCTS), $column_location);

  
$row 0;
  
$col 0;
  
$info_box_contents = array();
    while (
$expected tep_db_fetch_array($expected_query)) {

//TotalB2B start & TotalB2B start
if ($new_price tep_get_products_special_price($expected['products_id'])) {
      
$expected['products_price'] = $new_price;
    
$info_box_contents[$row][$col] = array('params' => 'class="TrentaTre"',
                                           
'text' => '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $new_products['products_id']) . '">'
                                            
tep_image(DIR_WS_IMAGES $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a><br />
                                           <a href="' 
tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">' $expected['products_name'] . '</a>
                                           <br />' 
$currencies->display_price_nodiscount($expected['products_price'], tep_get_tax_rate($expected['products_tax_class_id'])));
    } else {
       
tep_xppp_getproductprice($expected['products_id']);
    
$info_box_contents[$row][$col] = array('params' => 'align="center"',
                                           
'text' => '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">'
                                            
tep_image(DIR_WS_IMAGES $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a><br />
                                           <a href="' 
tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">' $expected['products_name'] . '</a>
                                           <br />' 
$currencies->display_price($expected['products_id'], $expected['products_price'], tep_get_tax_rate($expected['products_tax_class_id'])));
    }
//TotalB2B end & TotalB2B end

    
$col ++;
      if (
$col 2) {
        
$col 0;
        
$row ++;
      }
    }
    
  new 
contentBox($info_box_contents);
?>

 </tr>
            </td>
<!-- upcoming_products_eof //-->

<?php
  
}
?>

buon lavoro.........

Copiato e funziona solo non viene visualizzata la data di arrivo come prima.
Ho provato a fare qualche modifica ma senza risultati Uglystupid
Loggato
masmaz
Membro Regolare
***
Offline Offline

Posts: 198



Email
« Risposta #2 il: Settembre 29, 2008, 05:41:12 pm »

 Knuppel
bhe ma se uno clicca sull'articolo in arrivo, oltre che visualizzare la descrizione in basso vede scritta la data di arrivo  Wink  Afro
Loggato

  Massimo
suppaman73
Newbie
*
Offline Offline

Posts: 46


« Risposta #3 il: Ottobre 27, 2008, 07:05:50 pm »

Nel file originale e nella traduzione del pack 1.3 questo file pemetteva solo di visualizzare 2 linee separatrici e il testo del prodotto...

nel nuovo file, che ho elaborato, ora è uguale agli altri box come: prodotti in vetrina e prodotti in offerta, cioè racchiuso in un box dove si visualizzano testo e immagine del prodotto in arrivo.

Questo è il codice da copiare ed incollare nel file include/mudules/upcoming_products.php:

Codice:
<?php
/*
  $Id: upcoming_products.php,v 1.25 2008/09/28 16:20:30 

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

  Copyright (c) 2008 osCommerce

  Released under the GNU General Public License
*/
  
$expected_query tep_db_query("select p.products_id, pd.products_name, p.products_image, products_date_available as date_expected from " TABLE_PRODUCTS " p, " .  TABLE_PRODUCTS_DESCRIPTION " pd where to_days(products_date_available) >= to_days(now()) and p.products_id = pd.products_id and pd.language_id = '" . (int)  $languages_id "'order by " EXPECTED_PRODUCTS_FIELD " " EXPECTED_PRODUCTS_SORT " limit " MAX_DISPLAY_UPCOMING_PRODUCTS); 
  if (
tep_db_num_rows($expected_query) > 0) {
?>

<!-- upcoming_products //-->
 <tr>
            <td>
  <?php
  
  $info_box_contents 
= array();
  
$info_box_contents[] = array('text' => TABLE_HEADING_UPCOMING_PRODUCTS);
  new 
contentBoxHeading($info_box_contentsfalsefalsetep_href_link(FILENAME_UPCOMING_PRODUCTS), $column_location);

  
$row 0;
  
$col 0;
  
$info_box_contents = array();
    while (
$expected tep_db_fetch_array($expected_query)) {

//TotalB2B start & TotalB2B start
if ($new_price tep_get_products_special_price($expected['products_id'])) {
      
$expected['products_price'] = $new_price;
    
$info_box_contents[$row][$col] = array('params' => 'class="TrentaTre"',
                                           
'text' => '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $new_products['products_id']) . '">'
                                            
tep_image(DIR_WS_IMAGES $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a><br />
                                           <a href="' 
tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">' $expected['products_name'] . '</a>
                                           <br />' 
$currencies->display_price_nodiscount($expected['products_price'], tep_get_tax_rate($expected['products_tax_class_id'])));
    } else {
       
tep_xppp_getproductprice($expected['products_id']);
    
$info_box_contents[$row][$col] = array('params' => 'align="center"',
                                           
'text' => '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">'
                                            
tep_image(DIR_WS_IMAGES $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a><br />
                                           <a href="' 
tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">' $expected['products_name'] . '</a>
                                           <br />' 
$currencies->display_price($expected['products_id'], $expected['products_price'], tep_get_tax_rate($expected['products_tax_class_id'])));
    }
//TotalB2B end & TotalB2B end

    
$col ++;
      if (
$col 2) {
        
$col 0;
        
$row ++;
      }
    }
    
  new 
contentBox($info_box_contents);
?>

 </tr>
            </td>
<!-- upcoming_products_eof //-->

<?php
  
}
?>

buon lavoro.........


Ciao, come mai il prezzo me lo mette a 0,00 Euro?Huh??

Hai qualche idea Huh??
grazie, soprattutto molto utile il codice!!!!!!!
Loggato
masmaz
Membro Regolare
***
Offline Offline

Posts: 198



Email
« Risposta #4 il: Ottobre 27, 2008, 08:34:07 pm »

Ma dunque  in home il prezzo lo mette in effetti a 0 ma se uno clicca fa visualizzare il prezzo.....
non so quindi se e un bug o il sistema che in quanto in arriva ne omette il prezzo.....

verificherò..........
Loggato

  Massimo
suppaman73
Newbie
*
Offline Offline

Posts: 46


« Risposta #5 il: Ottobre 29, 2008, 12:57:38 pm »

Grazie, troppo gentile, casomai poi mi fai sapere?

Anche perché se lo indicizza google, non è carino  Grin

Poi sai, i clienti sono strani.... molto strani a volte....

Grazie
ciao
Loggato
masmaz
Membro Regolare
***
Offline Offline

Posts: 198



Email
« Risposta #6 il: Ottobre 29, 2008, 01:14:00 pm »

Ciao
ho trovato il diffettuccio, mi ero dimenticato di mettere una piccola stringa che richiamava il prezzo....  Uglystupid

qui di seguito il file corretto (include/mudules/upcoming_products.php):

Codice:
<?php
/*
  $Id: upcoming_products.php,v 1.25 2008/09/28 16:20:30 

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

  Copyright (c) 2008 osCommerce

  Released under the GNU General Public License
*/
  
$expected_query tep_db_query("select p.products_id, pd.products_name, p.products_image,  p.products_price, products_date_available as date_expected from " TABLE_PRODUCTS " p, " .  TABLE_PRODUCTS_DESCRIPTION " pd where to_days(products_date_available) >= to_days(now()) and p.products_id = pd.products_id and pd.language_id = '" . (int)  $languages_id "'order by " EXPECTED_PRODUCTS_FIELD " " EXPECTED_PRODUCTS_SORT " limit " MAX_DISPLAY_UPCOMING_PRODUCTS); 
  if (
tep_db_num_rows($expected_query) > 0) {
?>

<!-- upcoming_products //-->
 <tr>
            <td>
  <?php
  
  $info_box_contents 
= array();
  
$info_box_contents[] = array('text' => TABLE_HEADING_UPCOMING_PRODUCTS);
  new 
contentBoxHeading($info_box_contentsfalsefalsetep_href_link(FILENAME_UPCOMING_PRODUCTS), $column_location);

  
$row 0;
  
$col 0;
  
$info_box_contents = array();
    while (
$expected tep_db_fetch_array($expected_query)) {

//TotalB2B start & TotalB2B start
if ($new_price tep_get_products_special_price($expected['products_id'])) {
      
$expected['products_price'] = $new_price;
    
$info_box_contents[$row][$col] = array('params' => 'class="TrentaTre"',
                                           
'text' => '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $new_products['products_id']) . '">'
                                            
tep_image(DIR_WS_IMAGES $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a><br />
                                           <a href="' 
tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">' $expected['products_name'] . '</a>
                                           <br />' 
$currencies->display_price_nodiscount($expected['products_price'], tep_get_tax_rate($expected['products_tax_class_id'])));
    } else {
       
tep_xppp_getproductprice($expected['products_id']);
    
$info_box_contents[$row][$col] = array('params' => 'align="center"',
                                           
'text' => '<a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">'
                                            
tep_image(DIR_WS_IMAGES $expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a><br />
                                           <a href="' 
tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $expected['products_id']) . '">' $expected['products_name'] . '</a>
                                           <br />' 
$currencies->display_price($expected['products_id'], $expected['products_price'], tep_get_tax_rate($expected['products_tax_class_id'])));
    }
//TotalB2B end & TotalB2B end

    
$col ++;
      if (
$col 2) {
        
$col 0;
        
$row ++;
      }
    }
    
  new 
contentBox($info_box_contents);
?>

 </tr>
            </td>
<!-- upcoming_products_eof //-->

<?php
  
}
?>

Grazie ancora pe aver trovato questo bug....
Loggato

  Massimo
shieciny73
Visitatore
« Risposta #7 il: Novembre 15, 2009, 11:19:15 pm »

io molto volentieri ma dovresti comunicarmi il tuo nick di registrazione su sc4me che come robyro non ti trovo
Loggato
Pagine: [1]
  Stampa  
 
Salta a:  

Powered by MySQL Powered by PHP Oscomtemplate | Powered by SMF 1.1.15.
© 2005, Simple Machines. All Rights Reserved.
Traduzione Italiana a cura di SMItalia

Powered by Enplin.it
XHTML 1.0 Valido! CSS Valido!