DanielKeiran Posted September 7 Share Posted September 7 Hi, our site is going live soon and we noticed that the cart icon and account login buttons are missing from the mobile view. After inspecting both the mobile and web views I'm finding that the code is the same, but for some reason the mobile view is hiding the cart and login button. Mangels Vineyards (squarespace.com) I have attached two images showing the issue Thanks for any help you all can provide. DanielKeiran Link to comment
tuanphan Posted September 9 Share Posted September 9 Hi, How did you add Cart icon? Use customs code or? If custom code, which code did you use? 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
DanielKeiran Posted September 22 Author Share Posted September 22 Well, the page was set up by another employee who used the default setting to add the cart. So it shows up on the website just fine. But when I switch to the mobile view it is not there. So, the answer your question, we did not use custom code for the cart. When I view the code for the website and mobile view it appears the cart is in the code, but not visible in the mobile view. Are there snippits out there that will add the cart to the mobile view or make it visible? Link to comment
tuanphan Posted September 25 Share Posted September 25 I see your Cart icon is Commerce7 cart icon, it is not SS cart icon, SS has no C7 cart icon by default, so I thought you added it with code Can you check your site Code Injection Header & send this code? I will try tweaking it 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
DanielKeiran Posted September 26 Author Share Posted September 26 <script type="text/javascript"> document.addEventListener('DOMContentLoaded', function(event) { var node = document.createElement('div') var accountNode = document.createElement('div') accountNode.id = 'c7-account' node.appendChild(accountNode) var cartNode = document.createElement('div') cartNode.id = 'c7-cart' node.appendChild(cartNode) var header = document.getElementsByClassName('header-actions header-actions--right')[0] header.appendChild(node) }) </script> Sorry, I talked to the guy who set up the website and he said he injected this. If you can tweak it, that would be great! Thank you. Link to comment
tuanphan Posted October 1 Share Posted October 1 On 9/26/2023 at 11:02 PM, DanielKeiran said: <script type="text/javascript"> document.addEventListener('DOMContentLoaded', function(event) { var node = document.createElement('div') var accountNode = document.createElement('div') accountNode.id = 'c7-account' node.appendChild(accountNode) var cartNode = document.createElement('div') cartNode.id = 'c7-cart' node.appendChild(cartNode) var header = document.getElementsByClassName('header-actions header-actions--right')[0] header.appendChild(node) }) </script> Sorry, I talked to the guy who set up the website and he said he injected this. If you can tweak it, that would be great! Thank you. Try changing this line var header = document.getElementsByClassName('header-actions header-actions--right')[0] to this var header = querySelectorAll('header-actions header-actions--right') (Remember to save a copy of all code somewhere, just for backup) 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
DanielKeiran Posted October 2 Author Share Posted October 2 I tried that replacement, but then the cart and login button vanished on the webpage as well. I put it back how it was. I do appreciate your assistance though. Any other thoughts? I'm flummoxed. It's almost as though the cart is hiding on the mobile side somewhere. Regards, Daniel 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