Klemart3D Posted December 24, 2014 Share Posted December 24, 2014 Salut à tous, J'ai fait un duplicata du thème Prestashop par défaut, et j'ai opéré quelques modifications sur les templates qui affichent des listes de produits (notamment le nombre d'item par lignes). Et depuis, j'ai un souci au niveau au survol d'un produit en version desktop : le produit survolé affiche bien le bloc d'infos habituel, mais la hauteur de ce bloc n'est plus détectée (le height du <li> n'est pas reconnu) ce qui a pour effet de décaler tous les autres produits en dessous : Le plus étrange est que sur une page de Recherche, ce problème n'apparait pas. Au niveau du code, sur une page catégorie (où ça bug) : - normal : style="height: auto; margin-bottom: 0px;" - hover : style="margin-bottom: 0px;" > le height a disparu Sur une page recherche qui fonctionne correctement (comme dans la démo Prestashop) : - normal : style="height: auto; margin-bottom: 0px;" - hover : style="height: 616px; margin-bottom: -167px;" Je pense que cela se passe dans la fonction blockHover du fichier global.js : function blockHover(status) { $(document).off('mouseenter').on('mouseenter', '.product_list.grid li.ajax_block_product .product-container', function(e){ if ($('body').find('.container').width() == 1170) { var pcHeight = $(this).parent().outerHeight(); var pcPHeight = $(this).parent().find('.button-container').outerHeight() + $(this).parent().find('.comments_note').outerHeight() + $(this).parent().find('.functional-buttons').outerHeight(); $(this).parent().addClass('hovered').css({'height':pcHeight + pcPHeight, 'margin-bottom':pcPHeight * (-1)}); } }); $(document).off('mouseleave').on('mouseleave', '.product_list.grid li.ajax_block_product .product-container', function(e){ if ($('body').find('.container').width() == 1170) $(this).parent().removeClass('hovered').css({'height':'auto', 'margin-bottom':'0'}); }); } Après test, les 2 variables (pcHeight et pcPHeight) sont bien définies dans une page Recherche mais pas dans une page Catégorie produit. Quelqu'un aurait une idée ? Je sais que je suis proche du but, mais voilà plusieurs heures que je sèche ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now