Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Shop / WooCommerce
  3. hide Cart Menupoint when empty on mobile

hide Cart Menupoint when empty on mobile

Scheduled Pinned Locked Moved Shop / WooCommerce
10 Posts 2 Posters 278 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    smartin
    wrote on last edited by smartin
    #1
    1. Hi, I know there is a setting for this in:
      "Customize" → "WooCommerce" → "Cart Menupoint" → "Hide when empty"

    However this does not work on "mobile". It still shows the Cart Icon, regardless if "hide when empty" has been ticked or not.

    1. It would also be nice, to just use type (like: "Cart") instead of the "bag icon" (This works for desktop but sadly not for the mobile version)

    2. Furthermore, when I use "Desktop Menu Style" (under Customize" → "Mobile Menu" → "Menu Style") both the "Cart Icon" and the "Menupoint" (in my case the word "Menu" overlap. However if "burger Icons" are bing used then it works and they no longer overlap but sit correctly next to "Sopping bag" Icon.

    Would be great if you guys could look into that. Cheers

    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      hey there!

      so just in general, for mobile i solved it like this:

      the cart mobile menupoint is hidden. instead, there is a cart mobile icon. its not part of the menu so its always visible.
      thats the reasoning behind this.

      1.: on mobile, this is not really a cart menupoint, but its just a mobile cart icon. its not part of the mobile menu

      2.: I think you can just add a cart menu point to your mobile menu?
      https://laytheme.com/documentation/shop-setup.html#cart-menu-point

      3.:
      yea this is because it is not part of the mobile menu, its just an icon sitting in the top right

      when using the desktop menu style for mobile menu,
      you need to set the space top value so it doesn't overlap the cart icon, or change its position and font size

      look, im working on this now:
      customize → woocommerce → cart icon mobile

      will be included with the next update. i think this will solve your issues.

      Screenshot 2023-11-20 at 11.29.51.png

      i think in your case after i released the update, you can enable "Always hide icon, and show cart mobile menu point instead". And then use desktop menu style for mobile menu style.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        smartin
        wrote on last edited by smartin
        #3

        Fantastic @arminunruh! This works great.
        Many many thanks.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          smartin
          wrote on last edited by smartin
          #4

          Hey @arminunruh, just realised that since the update this afternoon the option "Hide when empty" on the cart menupoint on Desktop no longer works. The Cart now always shows, despite it being empty. Please see screenshot attached.

          Screenshot-2023-11-21-at-17.51.37.jpg

          It works fine on mobile however.

          1 Reply Last reply
          0
          • arminunruhA Offline
            arminunruhA Offline
            arminunruh
            Global Moderator
            wrote on last edited by
            #5

            ah yea can u update again now, then it will work

            can u post your website address here? i'd like to see these new settings i did in action :D

            1 Reply Last reply
            0
            • S Offline
              S Offline
              smartin
              wrote on last edited by
              #6

              sure, its martinschgaguler.com

              1 Reply Last reply
              0
              • S Offline
                S Offline
                smartin
                wrote on last edited by
                #7

                Many many thanks. This works fine again! :-D

                1 Reply Last reply
                0
                • arminunruhA Offline
                  arminunruhA Offline
                  arminunruh
                  Global Moderator
                  wrote on last edited by
                  #8

                  i really like your site!!

                  Screenshot 2023-11-30 at 09.37.03.png

                  maybe information can be aligned to menu?

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    smartin
                    wrote on last edited by
                    #9

                    @arminunruh thank you, its the "Space Between (px)" that trigger this additional space.

                    The reason for this is that I have the "cart" menu-point appearing next to "Information". This only shows if somebody adds anything to basket.

                    Would it be possible to show the "Space Between (px)" only when there is more than one menupoints (In my case, as soon as someone adds anything to the cart)?

                    Many many thanks,
                    M

                    1 Reply Last reply
                    0
                    • arminunruhA Offline
                      arminunruhA Offline
                      arminunruh
                      Global Moderator
                      wrote on last edited by
                      #10

                      ah damn, ok i put it on my todo list

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      I also code custom websites or custom Lay features.
                      💿 Email me here: 💿
                      info@laytheme.com

                      Before you post:
                      1. When using a WordPress Cache plugin, disable it or clear your cache.
                      2. Update Lay Theme and all Lay Theme Addons
                      3. Disable all Plugins
                      4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                      This often solves issues you might run into

                      When you post:
                      1. Post a link to where the problem is
                      2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                      3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                      Online Users
                      Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                      laytheme.com
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Search