ShonLevi Posted May 22, 2016 Share Posted May 22, 2016 Hey you guys, Kinda new in prestashop system I tried to manage the module of cart in the top nav - everything works just fine but - When I have 1+ items in my cart hover on ahref opens the cart and summary of my procuts in cart When I have 0 items - the hover not opens the mini cart This is default of this module - I want to modify and edit it to be displayed even though the cart is empty How can I edit that? Thanks Link to comment Share on other sites More sharing options...
dioniz Posted May 23, 2016 Share Posted May 23, 2016 What will you show in empty cart? Link to comment Share on other sites More sharing options...
ShonLevi Posted May 24, 2016 Author Share Posted May 24, 2016 "Empty Cart" or something... it's not so important - I just want to understand where is the code to edit it - there must be in the code somewhere which says - {if} the cart has products -> hover of cart button will open mini cart div {else} -> hover do nothing I want to make hover open mini cart even if the cart is empty... Link to comment Share on other sites More sharing options...
ShonLevi Posted May 25, 2016 Author Share Posted May 25, 2016 Someone can help please? Link to comment Share on other sites More sharing options...
ShonLevi Posted May 26, 2016 Author Share Posted May 26, 2016 Please help, I can't find the files... :\ Link to comment Share on other sites More sharing options...
ShonLevi Posted May 29, 2016 Author Share Posted May 29, 2016 ??????? Link to comment Share on other sites More sharing options...
MichaelEZ Posted September 25, 2020 Share Posted September 25, 2020 Hi... welp never is too late so i just faced same "issue" You just need to go to themes/your_theme/js/modules/blockcart and edit ajax-cart.js Find those lines (im not using default theme so it might be a little different): if (is_touch_enabled) { if ($(this).next('.cart_block:visible').length && !cart_block.isHoveringOver()) $("#header .cart_block").stop(true, true).slideUp(450); else if (ajaxCart.nb_total_products > 0 || parseInt($('.ajax_cart_quantity').html()) > 0) $("#header .cart_block").stop(true, true).slideDown(450); return; } else window.location.href = $(this).attr('href'); }); $("#header .shopping_cart a:first").hover( function(){ if (ajaxCart.nb_total_products > 0 || parseInt($('.ajax_cart_quantity').html()) > 0) $("#header .cart_block").stop(true, true).slideDown(450); }, and just change those (both of them) html()) > 0 to html()) > -1 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