How to hide cart icon when cart is empty
-
Just adding WooCommerce to this site so it’s in staging. I know that using CSS I can set it to #et-top-navigation .et-cart-info {display: none;}. But then you don’t get the cart when there are items in the cart either. I’ve Googled and have found plugins that are meant to work with this cart icon but when I try them the icon in the top left displays no matter what I have the plugin set to. I found nothing useful when Googling about this. I tried.
### WordPress Environment ### Home URL: https://staging2.omtownyoga.com Site URL: https://staging2.omtownyoga.com WC Version: 3.2.5 Log Directory Writable: ✔ WP Version: 4.9.1 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: en_US ### Server Environment ### Server Info: Apache/2.4.18 (Unix) mod_hive/6.6 OpenSSL/1.0.1e-fips mod_fastcgi/2.4.6 PHP Version: 7.2.0 PHP Post Max Size: 8 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.53.0 OpenSSL/1.0.2k SUHOSIN Installed: – MySQL Version: 5.6.36 Max Upload Size: 2 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 3.2.5 WC Database Prefix: omtown_ Total Database Size: 17.72MB Database Data Size: 15.73MB Database Index Size: 1.99MB omtown_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB omtown_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB omtown_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB omtown_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.05MB omtown_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB omtown_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB omtown_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB omtown_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB omtown_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB omtown_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB omtown_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB omtown_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB omtown_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB omtown_woocommerce_log: Data: 0.02MB + Index: 0.02MB omtown_calendar: Data: 0.00MB + Index: 0.00MB omtown_calendar_categories: Data: 0.00MB + Index: 0.00MB omtown_calendar_config: Data: 0.00MB + Index: 0.00MB omtown_commentmeta: Data: 8.61MB + Index: 0.16MB omtown_comments: Data: 0.00MB + Index: 0.01MB omtown_croer_meta: Data: 0.00MB + Index: 0.00MB omtown_croer_posts: Data: 0.00MB + Index: 0.00MB omtown_ebud_events: Data: 0.00MB + Index: 0.00MB omtown_ebud_groups: Data: 0.00MB + Index: 0.00MB omtown_ebud_messages: Data: 0.00MB + Index: 0.00MB omtown_ebud_queue: Data: 0.00MB + Index: 0.00MB omtown_ebud_subscribers: Data: 0.00MB + Index: 0.00MB omtown_ebud_subscriptions: Data: 0.00MB + Index: 0.00MB omtown_ec3_schedule: Data: 0.00MB + Index: 0.00MB omtown_et_bloom_stats: Data: 0.31MB + Index: 0.07MB omtown_failed_jobs: Data: 0.02MB + Index: 0.00MB omtown_faqtastic_groups: Data: 0.00MB + Index: 0.00MB omtown_faqtastic_questions: Data: 0.00MB + Index: 0.00MB omtown_faqtastic_related: Data: 0.00MB + Index: 0.00MB omtown_headway_elements: Data: 0.02MB + Index: 0.01MB omtown_headway_leafs: Data: 0.04MB + Index: 0.00MB omtown_headway_options: Data: 0.49MB + Index: 0.00MB omtown_iwp_backup_status: Data: 0.02MB + Index: 0.00MB omtown_links: Data: 0.00MB + Index: 0.00MB omtown_login_security_solution_fail: Data: 0.54MB + Index: 0.31MB omtown_mailchimp_carts: Data: 0.02MB + Index: 0.00MB omtown_ninja_table_items: Data: 0.02MB + Index: 0.02MB omtown_options: Data: 0.39MB + Index: 0.04MB omtown_postmeta: Data: 0.59MB + Index: 0.08MB omtown_posts: Data: 0.44MB + Index: 0.05MB omtown_queue: Data: 0.02MB + Index: 0.00MB omtown_redirection_groups: Data: 0.00MB + Index: 0.00MB omtown_redirection_items: Data: 0.00MB + Index: 0.00MB omtown_redirection_logs: Data: 0.05MB + Index: 0.00MB omtown_redirection_modules: Data: 0.00MB + Index: 0.00MB omtown_rg_form: Data: 0.02MB + Index: 0.00MB omtown_rg_form_meta: Data: 0.02MB + Index: 0.00MB omtown_rg_form_view: Data: 0.02MB + Index: 0.03MB omtown_rg_incomplete_submissions: Data: 0.02MB + Index: 0.02MB omtown_rg_lead: Data: 0.02MB + Index: 0.03MB omtown_rg_lead_detail: Data: 0.02MB + Index: 0.06MB omtown_rg_lead_detail_long: Data: 0.02MB + Index: 0.00MB omtown_rg_lead_meta: Data: 0.02MB + Index: 0.05MB omtown_rg_lead_notes: Data: 0.02MB + Index: 0.03MB omtown_termmeta: Data: 0.00MB + Index: 0.01MB omtown_terms: Data: 0.00MB + Index: 0.00MB omtown_term_relationships: Data: 0.00MB + Index: 0.01MB omtown_term_taxonomy: Data: 0.00MB + Index: 0.00MB omtown_usermeta: Data: 0.01MB + Index: 0.01MB omtown_users: Data: 0.00MB + Index: 0.00MB omtown_wfBadLeechers: Data: 0.00MB + Index: 0.00MB omtown_wfBlockedCommentLog: Data: 0.02MB + Index: 0.00MB omtown_wfBlockedIPLog: Data: 0.00MB + Index: 0.00MB omtown_wfBlocks: Data: 0.00MB + Index: 0.00MB omtown_wfBlocksAdv: Data: 0.00MB + Index: 0.00MB omtown_wfConfig: Data: 0.26MB + Index: 0.01MB omtown_wfCrawlers: Data: 0.00MB + Index: 0.00MB omtown_wfFileMods: Data: 0.83MB + Index: 0.19MB omtown_wfHits: Data: 0.49MB + Index: 0.09MB omtown_wfHoover: Data: 1.39MB + Index: 0.19MB omtown_wfIssues: Data: 0.00MB + Index: 0.00MB omtown_wfKnownFileList: Data: 0.41MB + Index: 0.06MB omtown_wfLeechers: Data: 0.01MB + Index: 0.02MB omtown_wfLockedOut: Data: 0.00MB + Index: 0.00MB omtown_wfLocs: Data: 0.00MB + Index: 0.00MB omtown_wfLogins: Data: 0.08MB + Index: 0.02MB omtown_wfNet404s: Data: 0.00MB + Index: 0.00MB omtown_wfNotifications: Data: 0.05MB + Index: 0.00MB omtown_wfPendingIssues: Data: 0.02MB + Index: 0.00MB omtown_wfReverseCache: Data: 0.00MB + Index: 0.00MB omtown_wfScanners: Data: 0.00MB + Index: 0.01MB omtown_wfSNIPCache: Data: 0.00MB + Index: 0.00MB omtown_wfStatus: Data: 0.08MB + Index: 0.04MB omtown_wfThrottleLog: Data: 0.00MB + Index: 0.00MB omtown_wfVulnScanners: Data: 0.00MB + Index: 0.00MB omtown_woo_square_integration_deleted_data: Data: 0.02MB + Index: 0.00MB omtown_woo_square_integration_logs: Data: 0.02MB + Index: 0.00MB ### Post Type Counts ### attachment: 161 customize_changeset: 4 custom_css: 1 et_pb_layout: 63 it_boom_bar: 1 nav_menu_item: 8 ninja-table: 1 page: 15 post: 17 product: 7 revision: 33 shop_order: 2 tablepress_table: 1 wp-help: 10 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (25) ### Divi Login: by Gritty Social – 1.0 Advanced Excerpt: by Delicious Brains – 4.2.3 Akismet Anti-Spam: by Automattic – 4.0.1 Bloom: by Elegant Themes – 1.2.22 Disable XML-RPC Pingback: by Samuel Aguilera – 1.1 Divi Booster: by Dan Mossop – 2.6.5 Divi Module Editor: by Gritty Social – 0.3 Dreamstime Stock Photos: by Dreamstime – 2.9 Elegant Themes Updater: by Elegant Themes – 1.0 Google XML Sitemaps: by Arne Brachhold – 4.0.9 MailChimp for WooCommerce: by MailChimp – 2.1.2 – Not tested with the active version of WooCommerce MailChimp for WordPress: by ibericode – 4.1.12 Post Types Order: by Nsp Code – 1.9.3.5 Really Simple SSL: by Rogier Lankhorst – 2.5.24 Rename wp-login.php: by Ella Iseulde Van Dorpe – 2.5.5 Shortcodes Ultimate: by Vladimir Anokhin – 5.0.1 TablePress: by Tobias Bäthge – 1.9 WooCommerce Checkout Manager: by Visser Labs – 4.1.6 – Not tested with the active version of WooCommerce WooCommerce: by Automattic – 3.2.5 WooSquare Pro: by wpexperts.io – 4.2 WooSquare Pro: by wpexperts.io – 4.2 Wordfence Security: by Wordfence – 6.3.22 WP Help: by Mark Jaquith – 1.5.3 WP Rocket: by WP Media – 2.10.12 WPFront Notification Bar: by Syam Mohan – 1.7 ### Settings ### API Enabled: ✔ Force SSL: ✔ Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) ### WC Pages ### Shop base: #4277 - /shop Cart: #4278 - /cart Checkout: #4279 - /checkout My account: #4280 - /my-account Terms and conditions: ❌ Page not set ### Theme ### Name: Divi Version: 3.0.91 Author URL: http://www.elegantthemes.com Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔ ### Templates ### Overrides: –
The page I need help with: [log in to see the link]
-
Hey @sheilahoff,
This particular forum is for questions which are directly related to the features and functionality of the free WooCommerce plugin but not for questions related to any extensions or themes which can work with WooCommerce.
Looking at your system report etc I can see you are using the Divi from Elgantthemes and the cart icon you referred to in the header is being added by the theme from what I can tell.
If you reach out to Elegantthemes support they could maybe offer an alternative code solution for this in place of simply hiding that icon with CSS.
https://www.elegantthemes.com/forum/
I hope this helps
We haven’t heard back from you in a while, so I’m going to mark this as resolved. If you have any further questions, you can start a new thread.
- The topic ‘How to hide cart icon when cart is empty’ is closed to new replies.