minicart
minicart copied to clipboard
Unable to Remove Item when "minicart-showing" class is not on body
@jeffharrell Im building minicartjs themes and would like to place the cart in a sidebar or checkout page.
The "remove item" button only works when an Item is added to cart which will add a "minicart-showing" class to the body allowing for the "remove item" function to be executed.
How can I allow the "remove item" function if the cart is always visible? and I also need to disable closing the cart based on click event outside the cart. On mobile, it seems to close inadvertently at times.
Here is a plunker example. http://plnkr.co/edit/DMmUOTapAWWMH5UWQSVL?p=preview
You can force the cart to be shown after it's been rendered. You can also use the config object to set the cart's parent element.
http://plnkr.co/edit/YMHImV7WtCm0hcTe3YG3?p=preview
@rpowis not understanding your solution. your plunker version doesn't remove an item when cart is populated.
Try emptying the cart. adding an item, then clicking anywhere outside the cart. and then try pressing the "x" button. Im using Chrome on mac
oh i see what you mean. my plunker solves page refreshes but not paypal.minicart.view.hide()
being triggered