Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #25123

    Hello,

    I have no idea where this is in the code or how to do it, but I would greatly appreciate some help on this one.

    Basically in Enfold with WooCommerce installed, when you add a product it adds the nice ajax symbol top right of the shopping cart and then you can hover over it and see the items you have added and view cart and checkout.

    If you hover over those items you can then click on them and be taken to that product.

    Due to the fact I’m building a course website and have used ‘add to cart’ buttons and not actually the product pages. I want it so I can’t click on the items in the cart widget (ajax thing) I want it so people can just use it as a reference to see what’s in their cart and click to checkout or see cart etc..

    So in short I just want the items to still show exactly how they are but not hyperlinks or.. clicking on the items takes me straight to the cart and not the product?

    Hopefully that makes sense, been trying to find out where it’s putting the link tags then I could properly nut it out, but I’m here as a last resort.

    Cheers,

    Daniel :)

    #125841

    Hi,

    Not sure if this is the one you’re looking for. Add this on your custom.css or Quick CSS. This will disable the link.

    .cart_list.product_list_widget li a {
    cursor: default;
    pointer-events: none !important;
    }

    Regards,

    Ismael

    #125842

    Hello Ismrael,

    Always with the great replies!

    This works great for Firefox and Chrome, though for IE when I hover it doesn’t show but I can still click and be taken through to the item. Is there any way around this for IE or not really?

    Cheers mate,

    Daniel

    #125843

    Hi Daniel,

    You can use a bit of javascript to unwrap the links. In your js>avia.js file add this line:

    $('.cart_list.product_list_widget li a').contents().unwrap();

    right after the document ready(function) like this:

    $(document).ready(function()
    {
    $('.cart_list.product_list_widget li a').contents().unwrap();

    Regards,

    Devin

    #125844

    Hello Devin,

    Thanks for the reply, though that didn’t seem to work for IE9? Maybe my IE is buggared. On everything else it’s fine.

    Cheers,

    Daniel

    #125845

    I don’t know of any specific reason why it wouldn’t but hopefully that gets you close enough. In the end you may want to look into digging into the woocommerce hooks/filters which is the proper way to do something like this.

    Neither of us just happen to know the proper syntax off hand unfortunately .

    Regards,

    Devin

    #125846

    Okay, cheers for the update and help. :)

    Regards,

    Daniel

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Unlinking the links of the Enfold WooCommerce Dropdown’ is closed to new replies.