[?] Adaptation contribution boite defilante

Messagepar ZuckBin » Sam 26 Nov 2005, 19:06

Bonjour,

Je n'arrive pas a modifier la contribution boite defilante pour qu'elle fonctionne avec la contribution X-Sell.

Voici mon code:

Code: Tout sélectionner
<?php
include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_XSELL_PRODUCTS);

// BOF Separate Pricing Per Customer
 if(!tep_session_is_registered('sppc_customer_group_id')) {
 $customer_group_id = '0';
 } else {
  $customer_group_id = $sppc_customer_group_id;
 }

if ($HTTP_GET_VARS['products_id']) {
if ($customer_group_id != '0') {
$xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, IF(pg.customers_group_price IS NOT NULL, pg.customers_group_price, p.products_price) as products_price from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_status = '1' and pg.customers_group_id = '".$customer_group_id."' order by sort_order asc limit " . MAX_DISPLAY_ALSO_PURCHASED);
} else {

$xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_status = '1' order by sort_order asc limit " . MAX_DISPLAY_ALSO_PURCHASED);
}
// EOF Separate Pricing Per Customer
$num_products_xsell = tep_db_num_rows($xsell_query);
if ($num_products_xsell >= 1) {

?>

<div class="boites_xsell_text">
<? echo TEXT_XSELL_PRODUCTS; ?>
</div>
<div class="boites_xsell_conteneur">

<?
 
     $info_box_contents = array();
   $row = 0;
     $col = 0;
   echo "<script>n";
     echo "ejs_scroll_largeur = 110n;ejs_scroll_hauteur = 175;nejs_scroll_bgcolor = '#ffffff';nejs_scroll_background = '#ffffff';nejs_scroll_pause_seconde = 1;nejs_scroll_message = new Array;n";
     $x=0;
     while ($xsell = tep_db_fetch_array($xsell_query)) {
       $xsell['specials_new_products_price'] = tep_get_products_special_price($xsell['products_id']);

if ($xsell['specials_new_products_price']) {
     $xsell_price =  '' . $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '&nbsp;&nbsp;';
     $xsell_price .= '<del>' . $currencies->display_price($xsell['specials_new_products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</del>';
   } else {
     $xsell_price =  $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id']));
   }
       $info_box_contents[$row][$col] = array('align' => 'center',
                                              'params' => 'class="smallText" width="100%"',
                                              'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name'] .'</a><br><span id="alignproduct_image_xsell"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></span><br>'.TEXT_PRICE.'<span id="alignproduct_price_xsell">'.$xsell_price. '</span><br />');
                                             
       $col ++;
       if ($col > 2) {
         $col = 0;
         $row ++;
       }
     }

for($i=0,$n=count($info_box_contents);$i<$n;$i++)
{
for($j=0,$m=count($info_box_contents[$i]);$j<$m;$j++)
{

?>

<p class="boites_xsell">
<? echo "ejs_scroll_message[$x]='$info_box_contents[$i][$j]['text']'n";
$x=$x+1;?>
<? //echo $info_box_contents[$i][$j]['text'];?>
</p>

<?
  }
   } ?>
function d(texte)
{
document.write(texte);
}

d('<DIV ID=ejs_scroll_relativ STYLE="position:relative;width:'+ejs_scroll_largeur+';height:'+ejs_scroll_hauteur+';background-color:'+ejs_scroll_bgcolor+';background-image:url('+ejs_scroll_background+')">');
d('<DIV ID=ejs_scroll_cadre STYLE="position:absolute;width:'+(ejs_scroll_largeur-8)+';height:'+(ejs_scroll_hauteur-8)+';top:4;left:4;clip:rect(0 '+(ejs_scroll_largeur-8)+' '+(ejs_scroll_hauteur-8)+' 0)">');
d('<div id=ejs_scroller_1 style="position:absolute;width:'+(ejs_scroll_largeur-8)+';left:0;top:0;" CLASS=ejs_scroll>'+ejs_scroll_message[0]+'</DIV>');
d('<div id=ejs_scroller_2 style="position:absolute;width:'+(ejs_scroll_largeur-8)+';left:0;top:'+ejs_scroll_hauteur+';" CLASS=ejs_scroll>'+ejs_scroll_message[1]+'</DIV>');
d('</DIV></DIV>');

ejs_scroll_mode =1;
ejs_scroll_actuel = 0;

function ejs_scroll_start()
{
if(ejs_scroll_mode == 1)
{
ejs_scroller_haut = "ejs_scroller_1";
ejs_scroller_bas = "ejs_scroller_2";
ejs_scroll_mode = 0;
}
else
{
ejs_scroller_bas = "ejs_scroller_1";
ejs_scroller_haut = "ejs_scroller_2";
ejs_scroll_mode = 1;
}
ejs_scroll_nb_message = ejs_scroll_message.length-1;
if(ejs_scroll_actuel == ejs_scroll_nb_message)
ejs_scroll_suivant = 0;
else
ejs_scroll_suivant = ejs_scroll_actuel+1;
if(document.getElementById)
document.getElementById(ejs_scroller_bas).innerHTML = ejs_scroll_message[ejs_scroll_suivant];
ejs_scroll_top = 0;
if(document.getElementById)
setTimeout("ejs_scroll_action()",ejs_scroll_pause_seconde*1000)
}

function ejs_scroll_action()
{
ejs_scroll_top -= 1;
document.getElementById(ejs_scroller_haut).style.top = ejs_scroll_top;
document.getElementById(ejs_scroller_bas).style.top = ejs_scroll_top+ejs_scroll_hauteur;
if((ejs_scroll_top+ejs_scroll_hauteur) > 0)
setTimeout("ejs_scroll_action()",10)
else
ejs_scroll_stop()
}

function ejs_scroll_stop()
{
ejs_scroll_actuel = ejs_scroll_suivant;
ejs_scroll_start()
}
ejs_scroll_start();
</script>
<?  }
 }
?>
</div>
<div class="clearboth"></div>
<br />

Merci de votre aide.
_____________________
osCSS 1.0.1 + Full Rewriting + contribs...
ZuckBin
Membre actif
 
Messages: 18
Inscription: Sam 10 Sep 2005, 12:47

Messagepar sidarus » Lun 31 Juil 2006, 11:49

Some news ?
sidarus
Membre très actif
 
Messages: 396
Inscription: Mar 03 Mai 2005, 23:34
Localisation: Geneva (CH)


Retourner vers Plugin

 


  • Articles en relation
    Réponses
    Vus
    Dernier message

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 1 invité

cron