Oscomtemplate

Supporto Contributions italiane => Supporto Contributions Italiane => Topic iniziato da: masmaz su Settembre 29, 2008, 04:26:13 pm



Titolo: upcoming_products - prodotti in arrivo
Post di: masmaz su 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.........


Titolo: Re: upcoming_products - prodotti in arrivo
Post di: mike su 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 /|\


Titolo: Re: upcoming_products - prodotti in arrivo
Post di: masmaz su Settembre 29, 2008, 05:41:12 pm
 :)X
bhe ma se uno clicca sull'articolo in arrivo, oltre che visualizzare la descrizione in basso vede scritta la data di arrivo  ;)  O0


Titolo: Re: upcoming_products - prodotti in arrivo
Post di: suppaman73 su 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?????

Hai qualche idea ????
grazie, soprattutto molto utile il codice!!!!!!!


Titolo: Re: upcoming_products - prodotti in arrivo
Post di: masmaz su 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ò..........


Titolo: Re: upcoming_products - prodotti in arrivo
Post di: suppaman73 su Ottobre 29, 2008, 12:57:38 pm
Grazie, troppo gentile, casomai poi mi fai sapere?

Anche perché se lo indicizza google, non è carino  ;D

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

Grazie
ciao


Titolo: Re: upcoming_products - prodotti in arrivo
Post di: masmaz su Ottobre 29, 2008, 01:14:00 pm
Ciao
ho trovato il diffettuccio, mi ero dimenticato di mettere una piccola stringa che richiamava il prezzo....  /|\

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


Titolo: upcoming_products prodotti in arrivo
Post di: shieciny73 su 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


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