Yoline Posted July 5, 2020 Share Posted July 5, 2020 Site URL: https://www.elgalgorestaurante.com/es/para-llevar Hello, I would like to make my website more user friendly but the product page is a big headache. To help my customers find the best meal I use the category option as a filter but when using it, it loads the age again and again. https://elgalgorestaurante.squarespace.com/es/para-llevar The filter works but every time you choose a type of meal, you have to scroll down. How can I change that? I suppose that I have to use anchors links but I don't know where to put then and make then work. Someone has an idea ? Thanks CptFeeny 1 Link to comment
CptFeeny Posted July 31, 2020 Share Posted July 31, 2020 (edited) @Yoline, I am having the same problem. I agree, it's annoying to have the page reload to the top each time a category is chosen. I want my customers to easily switch between categories without having to scroll down from the top of the page each time. Have you found an answer by contacting Squarespace support? Or have you privately emailed/messaged any of the community developers? I'm surprised this question hasn't been asked and answered before. I will contact Squarespace support when they are available. But I will directly ask some of the community developers... @tuanphan @rwp @paul2009 I agree with you that anchor links are part of the solution. I know how to add an anchor link using a code block right above the categories, but I don't know how to change where the categories link to. I've even tried looking at the Inspector, but I don't have any experience coding. Here's my website: www.BrendanAlexPhoenix.comVersion 7.0– York family (Jones template) And here's the product page with categories: www.BrendanAlexPhoenix.com/prints (I have three product pages: Cards/Prints/Free) I wonder if this has to be done via the 'Code Injection' under 'Advance' for each product page. Hopefully we can get this solved sooner than later this time. 🙂 Solving this problem would greatly help my customers. Edited July 31, 2020 by CptFeeny Link to comment
tuanphan Posted July 31, 2020 Share Posted July 31, 2020 I think the code (you sent me) will work in this case. How do you think? @rwp @CptFeeny You can contact him. CptFeeny 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
rwp Posted July 31, 2020 Share Posted July 31, 2020 (edited) It should work. Is the site 7.1? Click the link in my signature. Click the codepen link on my page. There should be a pen called Scroll to products on cat change. See if that works. Don't forget to follow the instructions in my signature for setting up jQuery. Edited July 31, 2020 by rwp CptFeeny 1 Link to comment
CptFeeny Posted July 31, 2020 Share Posted July 31, 2020 @rwp Thanks for the reply! 🙂 Just checked. Version is 7.0 Updated my original comment. @tuanphan Thank you Link to comment
rwp Posted July 31, 2020 Share Posted July 31, 2020 I haven't tested it on 7.0 Let me know if it works, if not, we can modify it. CptFeeny 1 Link to comment
CptFeeny Posted July 31, 2020 Share Posted July 31, 2020 (edited) @rwp I tried my best to follow the instructions and free code you kindly provided, but it did not work for me. This must be because I have Version 7.0? Here's a screenshot of the code I'm using. Edited July 31, 2020 by CptFeeny Link to comment
rwp Posted July 31, 2020 Share Posted July 31, 2020 @CptFeeny Sent you a message. CptFeeny 1 Link to comment
bbarinaga Posted August 18, 2020 Share Posted August 18, 2020 Hi @rwp, I'm trying to do the same thing but failed. I'm on 7.1 and used the following code on Code Injection / Header: <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> $(document).ready(function() { var catLink = $('a.category-filter-link.category-filter-link-all'); var _href = $(catLink).attr("href"); $(catLink).attr("href", _href + '?'); var urlCat = window.location.href.split("?")[1]; if (urlCat !== undefined) { var prodTop = $('section:nth-of-type(2)') $('html,body').animate({ scrollTop: $(prodTop).offset().top }, 0); } }); </script> I'm not familiar with coding. Could you help me? Thanks! Link to comment
rwp Posted August 18, 2020 Share Posted August 18, 2020 Please post a link to your page. Link to comment
rwp Posted August 19, 2020 Share Posted August 19, 2020 You are missing an opening <script> tag. That being said, the category layout is different on your page, and the code will not work for you. Link to comment
Cozen Posted November 1, 2021 Share Posted November 1, 2021 Hello, I am having similar issue i tried this code on this page but didn't work for me. can somebody help please. i am on 7.1. @rwp @tuanphan Link to comment
tuanphan Posted November 4, 2021 Share Posted November 4, 2021 On 11/1/2021 at 9:03 PM, Cozen said: Hello, I am having similar issue i tried this code on this page but didn't work for me. can somebody help please. i am on 7.1. @rwp @tuanphan Can you share link to your site? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care 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