Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it
    Registrato dal
    Mar 2005
    Messaggi
    131

    oscommerce :personalizzazione box con Scrolling specials v1.0

    ciao a tutti
    dunque,
    da solo non riesco quindi provo a chiedere ma anche se non risponde nessuno va bene lo stesso perchè
    credo ci sia da rivedere un po di codice del box.

    Ho trovato la contribution che fa al mio caso.Si chiama Scrolling specials v1.0

    Il box che vorrei fare diventare animato con lo scroll è quello in questa immagine :


    Come si vede anche nel codice del box attuale che riporto sotto, l'immagine cambia ad ogni refresh mentre io vorrei appunto farla scorrere con l'uso della contribution.

    Il codice successivo ,sempre riportato sotto , invece è il codice contenuto nel file specials_scroll.php ossia la contribution.

    Il problema è questo:
    copiando il codice del secondo nel primo funziona tutto perfettamente solo che il box perde tutta la personalizzazione grafica venendo sostituito con un box con la grafica di default.
    Mentre io vorrei rimanesse lo sfondo grigio, l'intestazione con l'immagine ecc coem nell'immagine che ho messo sopra del box perchè tutti gli altri box sono personalizzati in quel modo.

    Ora i codici.
    Codice attuale del box con la grafica personalizzata con lo sfondo grigio, titoli personalizzati ecc come nell'immagine:
    Codice:
    codice:
    <?php 
    /* 
      $Id: whats_new.php,v 1.1.1.1 2003/02/20 01:03:53 ptosh Exp $ 
    
      osCommerce, Open Source E-Commerce Solutions 
      http://www.oscommerce.com 
    
      Copyright (c) 2003 osCommerce 
    
      Released under the GNU General Public License 
    */ 
    
      if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { 
    ?> 
     
    <tr> 
      <td><table width="100%"  border="0" cellspacing="0" cellpadding="0"> 
        <tr> 
          <td>[img]images/design/category4.jpg[/img]</td> 
        </tr> 
        <tr> 
          <td class="design-05" align="center" style="padding:5px " background="images/design/m_30.jpg"><?php 
        $random_product['products_name'] = tep_get_products_name($random_product['products_id']); 
        $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); 
    /* 
        $info_box_contents = array(); 
        $info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW); 
    
        new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW)); 
    */ 
        if (tep_not_null($random_product['specials_new_products_price'])) { 
          $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s>
    '; 
          $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; 
        } else { 
          $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); 
        } 
    /*  $info_box_contents = array(); 
        $info_box_contents[] = array('align' => 'center', 
                                     'text' => '' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '
    ' . $random_product['products_name'] . '
    ' . $whats_new_price); 
    
    */ 
    echo '' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '
    ' . $random_product['products_name'] . '
    ' . $whats_new_price.'' ; 
    
    
        //new infoBox($info_box_contents); 
    ?> 
          </td> 
        </tr> 
        <tr> 
          <td height="18">[img]images/design/m_25.jpg[/img]</td> 
        </tr> 
      </table></td> 
    </tr> 
     
    <?php 
      } 
    ?>

    codice del box della contribution:

    Codice:
    codice:
    <?php 
    /* 
      osCommerce, Open Source E-Commerce Solutions 
      http://www.oscommerce.com 
    
      Copyright (c) 2003 osCommerce 
    
      Released under the GNU General Public License 
    */ 
    
      $rp_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added desc"); 
      if (tep_db_num_rows($rp_query)) { 
    ?> 
     
              <tr> 
                <td> 
    <?php 
        $info_box_contents = array(); 
        $info_box_contents[] = array('text' => BOX_HEADING_SPECIALS); 
    
        new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SPECIALS)); 
    
        while ($random_product = tep_db_fetch_array($rp_query)) { 
       $rp .= '<center>' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '
    ' . $random_product['products_name'] . '
    <s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s>
    <span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); 
       $rp .= "</SPAN>
    \n---------\n"; 
        } 
    
        $info_box_contents = array(); 
        $info_box_contents[] = array('align' => 'center', 
                                     'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "20" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$rp.'</span></MARQUEE>'); 
    
        new infoBox($info_box_contents); 
    ?> 
                </td> 
              </tr> 
     
    <?php 
      } 
    ?>

  2. #2
    per domande sul codice devi postare nell'area specifica, ti sposto in php.

  3. #3
    Utente di HTML.it
    Registrato dal
    Mar 2005
    Messaggi
    131
    ok!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.