Shop Categories

X

Hiding cart icon in menu when empty

Home Forums Agama Pro Hiding cart icon in menu when empty

Tagged: , , ,

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #9050
    Marketing@Nix
    Participant

    I am looking to hide the cart icon in the top menu when there are no items in the cart but visible as soon as an item has been added. How would I go about doing this?

    I see that the icon can be toggled on and off in the customization settings but I can’t seem to find this function in the themes settings.

    Thanks in advance.

    #9051
    Jerry
    Keymaster

    Hello there,

    This feature doesn’t exists in Agama Pro theme, but we can try to make this possible for you if you share with use your website url and admin user/pass in private reply.

    Regards

    #9053
    Marketing@Nix
    Participant
    This reply has been marked as private.
    #9054
    Jerry
    Keymaster

    You can make backup but it’s not necessary since we are pros and know what we are doing 😉

    Thanks

    #9055
    Marketing@Nix
    Participant

    Sounds good! Let me know if you have difficulties accessing the site.

    Thanks!

    #9056
    Jerry
    Keymaster

    Everything is fine, i have logged-in successfully.

    We will let you know the progress of modification but you can expect it tomorrow to be finished since it is too late here right now (10:54pm).

    Regards

    #9057
    Marketing@Nix
    Participant

    No problem. I’ll check back in tomorrow then. Thanks, Jerry

    #9059
    Jerry
    Keymaster

    You are welcome 😉

    #9075
    Marketing@Nix
    Participant

    Hi Jerry! Just checking in to see if there’s any update. Were you able to find a solution?

    #9077
    Jerry
    Keymaster

    I have checked it and i will need a FTP host, user & pass to be able to make proper changes to child theme.

    Regards

    #9078
    Marketing@Nix
    Participant

    Hi Jerry, I don’t have access to our FTP host. Is there any way you could outline what needs to be done so I can pass it along to the person that does?

    #9079
    Jerry
    Keymaster

    Yes, i will prepare a jQuery code for you tomorrow and send you details how to apply it into child theme.

    Regards

    #9080
    Marketing@Nix
    Participant

    Awesome! Thanks for your help!

    #9086
    Jerry
    Keymaster

    Hello there,

    The solution is below.

    $('div.cart_count').filter(function() {
       if( $(this).text().trim() === "0" ) {
          $('li.vision-custom-menu-item.vision-main-menu-cart').hide();
       }
    });

    The code above i have inserted in your child theme and it should be working.

    This is not best solution since it uses jQuery and cart is visible on page load but hidden with delay… it would be best to code this via PHP but we are not working on big customization’s so you will need to find someone to do it for you.

    Regards

    #9087
    Marketing@Nix
    Participant

    Thanks for all your help, Jerry. I’ll see if we can get it working somewhere down the line.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.