MeaghanPM Posted August 5, 2021 Posted August 5, 2021 Site URL: https://grapefruit-fox-6gzs.squarespace.com/ Hello, I have two stores on my site because I want one to show up on the navigation and one to be hidden. This is fine, but I noticed the product pages display differently on each store. For the ones under "shop" they display how I'd like them to (proper spacing, markdowns, ect). However, the ones under "create" are formatted all wrong. Ideally, I'd like the "create" product listings to look the same as the "shop" product listings. We used Javascript to make sure the product description showed up before the quantity. However, the javascript is only working on the "Shop" page and not the "Create" page. Here is the Javascript we used: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function() { $('section.ProductItem-additional').insertAfter('.ProductItem-details-excerpt'); }); </script> <style> section.ProductItem-summary { align-items: flex-start !important; margin-bottom: 0px !important; } section.ProductItem-additional { margin-top: 0px !important; margin-bottom: 20px !important; } </style> <script> $(document).ready(function() { The password to view my site is "help"
tuanphan Posted August 8, 2021 Posted August 8, 2021 Hi. Can you share link to 2 stores? We can check easier 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!)
MeaghanPM Posted August 8, 2021 Author Posted August 8, 2021 19 hours ago, tuanphan said: Hi. Can you share link to 2 stores? We can check easier Hi! Here's a link to the store that shows the product descriptions how I'd like them to look: https://grapefruit-fox-6gzs.squarespace.com/config/ And here's the store that shows them formatted weirdly when you click on the individual products: https://grapefruit-fox-6gzs.squarespace.com/config/pages/60d9ecd1a3702b380bbbe566/categories/60d9ecd1a3702b380bbbe56a
creedon Posted August 9, 2021 Posted August 9, 2021 The code is not working on the create site because, at least for the one product I checked, there is no product description so the code can't move the accordion. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
MeaghanPM Posted August 9, 2021 Author Posted August 9, 2021 7 hours ago, creedon said: The code is not working on the create site because, at least for the one product I checked, there is no product description so the code can't move the accordion. Adding descriptions worked! Thank you Creedon!
creedon Posted August 9, 2021 Posted August 9, 2021 @MeaghanPM Excellent! As an alternative the code could, instead adding the accordion after a specific element as is done now, append it to parent element of the specific element. The parent element is almost certainly always going to be there. Whereas its children may be turned on or off depending on certain circumstances. Then you would use the CSS order property to control its order of appearance in relation to the other siblings. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.