osCommerce France : Accueil Forum Portail osCommerce France Réponses aux questions Foire aux contributions

Bienvenue invité ( Connexion | Inscription )

 
Reply to this topicStart new topic
> Rollover qui afficherait le descriptif produit, sur l'image produit
uranium
posté 31 Oct 2005, 11:21
Message #1


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 184
Inscrit : 21-May 05
Membre no 5943



Bonjour

je suis à la recherche d'une piste qui pourtait me permettre par du java d'afficher le descriptif produit quand un internaute survole l'image du produit dans une fenetre sans bordure ni barre d'état bref un rectangle tout simple (pas de pop pup classique)

j'ai cherché dans les contrib mais j'ai pas trouver

comme sur ce site

http://www.netflix.com/BrowseSelection?lnkctr=nmhbs

merci

je vais aller voir du coté de ce sujet

http://www.oscommerce-fr.info/forum/index....540&hl=rollover


--------------------
"Si tu travailles avec un marteau-piqueur pendant un tremblement de terre, désynchronise-toi, sinon tu travailles pour rien."
JC Vandamme.
MS2-2 FR - Crelaod 6.1.3
Go to the top of the page
 
mosaic
posté 31 Oct 2005, 11:29
Message #2


Ceinture noire OSC
Icône de groupe

Groupe : Modérateurs
Messages : 2908
Inscrit : 24-October 04
Lieu : Quimper ( Finistère )
Membre no 3567



pas forcément besoin de javascript, voici un tuto sur les popups intelligentes d'openweb

http://www.openweb.eu.org/articles/popup/


--------------------
#mosaic {
autodidacte: max;
derision: min;
ms3: never;
occupation: 9999;
latitude : 48;
longitude : -4.1;
competent: none !important;
}

documentation MS2 / F.A.Q. / Contribes FR / Contribes US
Go to the top of the page
 
uranium
posté 31 Oct 2005, 15:15
Message #3


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 184
Inscrit : 21-May 05
Membre no 5943



Bon j'ai avancé un peu

en fait je veux faire comme sur ce site mais avec mes paramètres

http://www.aquarelle.com/pages/fr/shop.htm

mais en rollover

mais je suis bloqué, si quelqu'un peut m'aider

en fait j'ai pas fait du java (bien que je cherche une solution en java...) car je crois avoir lu un post de Jean luc qui disait que l'on ne pouvait passer que 1 paramètre pour le descritptif des liens

je cherche a afficher le nom puis en dessous la date de sortie puis le descriptif produit

1 er problème je peux afficher soit le nom soit le descriptif mais aps les deux en meme temps

2 - je n'arrive pas a influer sur le design du rectangle jaune (voir dessin)

je crois que c'est normal mais bon...

user posted image


voici le code de ma page new_products.php qui affiche mes nouveautés en page d'accueil (je suis sous creload mais ca vaut pour MS2)

CODE
<!-- new_products //-->
<?php
 $info_box_contents = array();
?>
<table width="90%" class="productBox" align="center">
 <td>
     <?php  new contentBoxHeading($info_box_contents);

   $new_products_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_PRODUCTS . " p left 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);


 $row = 0;
 $col = 0;
 array();
   while ($new_products = tep_db_fetch_array($new_products_query)) {
   $product_query = tep_db_query("select products_name, products_description3 from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$new_products['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
   $product = tep_db_fetch_array($product_query);
   $product_info_str = '<table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxInformationcontenu">';
   $product_info_str .= '<td class="" colspan="0" align="center">';
   $product_info_str .= '<a class="image" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $product['products_description3'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
   $product_info_str .= '</td><tr>';
   $product_info_str .= '<td class="" colspan="1" align="center">';
//$product_info_str .= ''.substr($new_products['products_name'], 0, 12);
   //$product_info_str .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . '...</a>';
   $product_info_str .= '</td>';
   $product_info_str .= '</table>';
   $info_box_contents[$row][$col] = array('align' => 'center',
                                          'params' => 'class=""',
                                          'text' => $product_info_str);

   $col ++;

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

 new newProductsBox($info_box_contents);
?></td>
 </table>




merci de votre aide


--------------------
"Si tu travailles avec un marteau-piqueur pendant un tremblement de terre, désynchronise-toi, sinon tu travailles pour rien."
JC Vandamme.
MS2-2 FR - Crelaod 6.1.3
Go to the top of the page
 
chihiro
posté 1 Nov 2005, 09:39
Message #4


Ceinture jaune OSC
Icône de groupe

Groupe : Membres
Messages : 58
Inscrit : 20-October 05
Lieu : Saint-Étienne
Membre no 7541



D'une façon générale pour trouver un javascript, il faut aller là :
http://www.editeurjavascript.com/

Ce que tu cherches, c'est une infobulle paramétrable.
Celle que j'utilisais (Copyright Frank Milard ) :


Dans <head>

CODE
<script LANGUAGE="Javascript1.2">
IE4 = (document.all) ? 1 : 0;
NS4 = (document.layers) ? 1 : 0;
VERSION4 = (IE4 | NS4) ? 1 : 0;
if (!VERSION4) event = null;
function helpGetOffset(obj, coord) {
var val = obj["offset"+coord];
if (coord == "Top") val += obj.offsetHeight;
while ((obj = obj.offsetParent )!=null) {
 val += obj["offset"+coord];
 if (obj.border && obj.border != 0) val++;
}
return val;
}
function helpDown () {
if (IE4) document.all.helpBox.style.visibility = "hidden";
if (NS4) document.helpBox.visibility = "hidden";
}
function helpOver (event,texte) {
if (!VERSION4) return;
var ptrObj, ptrLayer;
if (IE4) {
 ptrObj = event.srcElement;
 ptrLayer = document.all.helpBox;
}
if (NS4) {
 ptrObj = event.target;
 ptrLayer = document.helpBox;
}
if (!ptrObj.onmouseout) ptrObj.onmouseout = helpDown;
var str = '<DIV CLASS="helpBoxDIV">'+texte+'</DIV>';
if (IE4) {
 ptrLayer.innerHTML = str;
 ptrLayer.style.top  = helpGetOffset (ptrObj,"Top") + 2;
 ptrLayer.style.left = helpGetOffset (ptrObj,"Left");
 ptrLayer.style.visibility = "visible";
}
if (NS4) {
 ptrLayer.document.write (str);
 ptrLayer.document.close ();
 ptrLayer.document.bgColor = "#FFFFCF";
 ptrLayer.top  = ptrObj.y + 20;
 ptrLayer.left = ptrObj.x;
 ptrLayer.visibility = "show";
}
}
// -->
</SCRIPT>
<STYLE TYPE="text/css">
<!--
#helpBox {
position: absolute;
z-index: 1000;
top: 0px;
left: 0px;
width: 160px;
}
DIV.helpBoxDIV {
width: 160px;
padding: 2px;
background: #FFFFCF;
border: 1px solid #000000;
color: #000000;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 14px;
}
-->
</STYLE>




dans <body> à l'endroit choisi pour l'effet :


CODE
<DIV ID="helpBox"></DIV>
<A HREF="#" onMouseover="helpOver(event,'texte de l\'infobulle')">passez ici</a>


Ça marche, mais je me demande si c'est toujours à la mode, à toi de voir...


--------------------
oscommerce MS2fr/collissimo suivi
Go to the top of the page
 
azer
posté 28 Feb 2006, 02:14
Message #5


Ceinture verte OSC
Icône de groupe

Groupe : Membres
Messages : 744
Inscrit : 26-January 03
Lieu : paris
Membre no 775



CITATION
uranium


t'as reussi a avancer ? je serais aussi interssé et je peux essayer de te donner un coup de main !
tiens nous au courant


--------------------
OSC addict - ms2fr - mail : azerosc (at) gmail.com
Go to the top of the page
 
uranium
posté 28 Feb 2006, 10:41
Message #6


Ceinture orange OSC
Icône de groupe

Groupe : Membres
Messages : 184
Inscrit : 21-May 05
Membre no 5943



Re

J'en suis à ce point la

c'est à dire que j'arrive à afficher un bulle mais j'ai pas fini le code il faut le completer


Image IPB



J'ai un problème qui me les bri... à savoir mes nouveautés sont mis dans un scrollpane, j'ai des produits qui sont juste à coter de mon ascenseur et la bulle ne passe passe au dessus de celui ci

Normal car le code est à l'interieur de la div mais si quequ'un à une soluce je suis preneur


CODE
<style>
a.info {
position: relative;
text-decoration: none;
color: black;
border-bottom: 1px gray dotted;
}
a.info span {
display: none;
width:200 px;
height:200 px;
font-family: Tahoma;
font-size: 10px;
color: #555766;
}
a.info:hover {
background: none; /* correction d'un bug IE */
z-index: 10000;
}
a.info:hover span {
display: inline;
position: absolute;
top: 2em;
left: 1em;
background-image: url("/dvd/images/fond_nouv.gif");
text-align: left;
color: white;
padding: 5px;
text-decoration: none;

}

</style>




CITATION
<?php
$info_box_contents = array();
?>
<div style="height:420px; width:726px; overflow:auto;"><table width="100%" class="productBox" align="center">
<td>
<?php new contentBoxHeading($info_box_contents);

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_quantity from " . TABLE_PRODUCTS . " p left 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);


$row = 0;
$col = 0;
array();
while ($new_products = tep_db_fetch_array($new_products_query)) {
$product_query = tep_db_query("select products_name, products_description1, products_description2, products_description3 from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$new_products['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
$product = tep_db_fetch_array($product_query);
$product_info_str = '<table border="0" bgcolor="#F4F4F4" width="100%" cellspacing="0" cellpadding="0" class="boxInformationcontenu">';
$product_info_str .= '<td width="500" class="image" colspan="1" align="center">';
$product_info_str .= '<br><a class="info" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $product[''], MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT).'<span>'.'<table>'.$product['products_name'].'<br>'.$product['products_description1'].$product['products_description2'].$product['products_description3']. '</table>'.'</span>'.'</a><br><br>'.'</td>';
$product_info_str .= '<tr valign="middle"><td class="" colspan="1" align="center">';
if ($new_products['products_quantity'] > 0) {
$product_info_str .= tep_image(DIR_WS_IMAGES . 'stock_on.gif', TEXT_INFO_STOCK_ON, "10", "10").'&nbsp;'.TEXT_STOCK_ON;
} else {
$product_info_str .= tep_image(DIR_WS_IMAGES . 'stock_on_order.gif', TEXT_INFO_STOCK_OUT, "10", "10").'&nbsp;'.TEXT_INFO_STOCK_OUT;
}
$product_info_str .= '</td></tr>';
$product_info_str .= '<tr><td class="" colspan="1" align="center">';
$product_info_str .= '<br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_template_image_button('button_continue.gif', IMAGE_BUTTON_BUY_NOW) . '</a>'.'<br><br>';
$product_info_str .= '</td></tr>';
$product_info_str .= '</table>';
$info_box_contents[$row][$col] = array('align' => 'center',
'params' => 'class=""',
'text' => $product_info_str);

$col ++;

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

new newProductsBox($info_box_contents);
?></td>
</table> </div>


--------------------
"Si tu travailles avec un marteau-piqueur pendant un tremblement de terre, désynchronise-toi, sinon tu travailles pour rien."
JC Vandamme.
MS2-2 FR - Crelaod 6.1.3
Go to the top of the page
 

Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :

 



RSS Version bas débit Nous sommes le : 28th March 2024 - 19:50
Ce site est déclaré auprès de la commision Nationale
de l'Informatique et des Libertés (déclaration n°: 1043896)