Jump to content

[solved] Cart slides out when deleting item


Recommended Posts

I'm using the Ajax cart in the right sidebar where items are added. When I delete all items in the cart, it slides out/hides untill the page is reloaded. It doesn't even come back when I add more items.

 

How can I disable all the sliding out, I need it to stay in place no matter if it has items or not.

 

In the ajax-cart.js there is alot of slideup functions, don't know if I have to comment all of them or what to do.

 

 

Found out how to fix this in ajax-cart.js in 1.5

 

Line 311 - Comment first line

if($('#cart_block dl.products dt').length == 0)
 {
//   $("#cart_block").stop(true, true).slideUp(200);
    $('#cart_block_no_products:hidden').slideDown(450);
    $('#cart_block dl.products').remove();
}

 

Line 681 - When hovering over the cart in the header, the sidebar cart will hide again, to disable that I used 1>1 in the function. For some reason the ajax stops working if the line is commented, so I just had to make the function false

 

setTimeout(function() {
if (!shopping_cart.isHoveringOver() && !cart_block.isHoveringOver() && 1>1)
$("#cart_block").stop(true, true).slideUp(450);
}, 200);

Edited by Bibihest (see edit history)
Link to comment
Share on other sites

  • 5 weeks later...
×
×
  • Create New...