Select Page
Cart Icon0

Click on the cart to go to Cart page

If you want to make Divi Mini Cart icon sending you to The cart page on “Click”, follow those steps:

1. Go to Dashboart > DIvi > Divi Mini Cart and enable “Show mini cart on hover”


2. Go to Dashboart > DIvi > Integration > … add code to the <body> … and paste the code bellow:

<script>
window.addEventListener('DOMContentLoaded',function(){
    if(typeof divi_mini_cart_options === 'undefined' || typeof etCore !== 'undefined' ){return;}
    if(!divi_mini_cart_options.hover){return;}
    const links = document.querySelectorAll('.mini-cart-info');
    links.forEach(function(item){
        let colision = false;
        item.addEventListener('mouseenter', function(e){
        colision = true;
        setTimeout(function(){colision = false;},100);
        });
        item.addEventListener('click', function(e){
            if(colision){return;}
            window.location = item.href;
        })
    });
});
</script>

Now on HOVER the icon the Mini Cart will open and on CLICK will send you to WooCommerce Cart Page.

This code is added to the current page so go click on the icon !