Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #1109565
Making cart icon show only when items are in cart
Closed

Comments

  •  2
    Gabriel started the conversation

    Currently I added in some code to only show the cart icon when the user is logged in but notice since I am using a plugin called member pro 2 from wpmu dev which allows you to control the menus based on memberships I see a issue where the cart icon goes away due to the menu switches.

    So I figured a simple solution would be to only show the cart icon when items are added. Any input to do this would be great. 

  •  7,121
    Oliver replied

    HI!

    Code which adds the cart icon is in the:

    /wp-content/themes/thegem/inc/woocommerce.php

    line 512

    You can use somthing like this:

    if ($count > 0) {
     code of the card
    }
    

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver