Chicagogolfconnection Posted August 28, 2023 Share Posted August 28, 2023 Hello, I have an online shop with a range of categories. On the mobile view, I have an issue that the categories are listed horizontally and customers are making it clear that it's not obvious that you can scroll to the right to view additional categories. The image I attached shows a scroll bar but that doesn't show on an actual phone (screenshot from desktop editor). Does anyone know of alternative setups for the categories on mobile? Dropdown would probably work. Link to comment
tuanphan Posted August 29, 2023 Share Posted August 29, 2023 We can show it on 2 or 3 rows, or change it to dropdown. What do you think? What is shop page url? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Chicagogolfconnection Posted August 30, 2023 Author Share Posted August 30, 2023 See below for the shop url. My guess is that a dropdown would be the most effective. What do you think after looking at the page? https://www.chicagogolfconnection.com/store-2-1 Link to comment
FelipePrologic Posted August 30, 2023 Share Posted August 30, 2023 Hu Guys. Hope you guys are well and having a good week so far. I'm having exactly the same issue, also they are not in the same category order I created. Plea guy if someone know how can I fix it, please share the info with me. Cheers, Felipe Prologic Skin Care Australia tuanphan 1 Link to comment
tuanphan Posted September 2, 2023 Share Posted September 2, 2023 On 8/30/2023 at 6:10 PM, Chicagogolfconnection said: See below for the shop url. My guess is that a dropdown would be the most effective. What do you think after looking at the page? https://www.chicagogolfconnection.com/store-2-1 To Website > Website Tools > Code Injection > Footer > Then check again on real mobile <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(function() { var catItem = $('.category-item .category-link:not(.child)'); var itemTag = $(catItem).html(); var catDrop = "<select name='Categories' id='categories' class='catDrop'>"; if (itemTag !== undefined) { catItem.each(function(i) { var fixLoc = $(this).html().trim().replace(/\s+/g, '-').replace(/&/g, '').replace('amp;', '').replace('--', '-').toLowerCase(); catDrop = catDrop + '<option value=' + fixLoc + '>' + $(this).html() + '</option>'; i++; }); catDrop = catDrop + "</select>"; $(catDrop).insertAfter($('.page-section:first-of-type')); } var urlCat = window.location.href.split("/shop/")[1]; if (urlCat !== undefined) { var fixCat = urlCat.replace(/\%27/g, "'") $(".catDrop").val(fixCat); } $(".catDrop").change(function() { if ($(this).val() == "all") { window.location = "/shop/"; } else { window.location = "/shop/" + $(this).val(); } }); }); </script> <style> @media screen and (max-width:767px) { nav.category-filter-wrapper { display: none; } } </style> Chicagogolfconnection 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Chicagogolfconnection Posted September 8, 2023 Author Share Posted September 8, 2023 tuanphan - that code was very helpful. It worked well in terms of creating a drop down, however it is located at the bottom of the shop page. Is there any way it can replace the existing mobile navigation at the top of the page? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment