karen.sale Posted May 10 Share Posted May 10 How/where can I insert a code block showing a product's SKU (above the price) on hover. Link to comment
Beyondspace Posted May 11 Share Posted May 11 22 hours ago, karen.sale said: How/where can I insert a code block showing a product's SKU (above the price) on hover. Do you have any screenshots or sample so we can refer to check? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
creedon Posted May 12 Share Posted May 12 I have some existing code that I spruced up a bit and made available. It is similar to the effect you are requesting. Please see Store Page Detail Sku Add. This code adds the sku in the product description based on some trigger text you add to the description. If you can live with the difference in how this code works give it a go. Let us know how it goes, if you do give it a go. 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. Link to comment
karen.sale Posted May 15 Author Share Posted May 15 This is a 7.0 website. https://www.leonardsantiques.com/chairs-1 Link to comment
karen.sale Posted May 22 Author Share Posted May 22 Creedon, your solution is interesting, but requires me (or my clients) to add something to each-and-every-one of the thousands of products in the database. Does anyone have any other ideas? Again, "on hover" over the product image shows the Product title and price. I'd like display the SKU, as well. (see above or below). This is a 7.0 website. https://www.leonardsantiques.com/chairs-1 Link to comment
creedon Posted May 22 Share Posted May 22 Quote requires me (or my clients) to add something to each-and-every-one of the thousands of products in the database. I realize my effect wasn't exactly what you were looking for. One thing that makes the product list page more difficult to create an effect like this is Squarespace doesn't expose the SKUs to the grid structure. If they did, they probably would have added a feature to show that SKU in some manner. Given that the SKUs are not exposed, one is left with how to get the data. This would involve some amount of custom code, hitting the JSON version of the store page, manipulating the data, and finally get the SKUs onto the page. I've not actually done this and I know of no code that does, so this is an educated guess that it is technically possible to achieve. Here is a possible manual alternative. Export products as CSV (docs on support site). In Google Sheets restructure the Description field to insert the SKU as part of the description. Import the CSV which replaces the descriptions. This would leave you with the SKUs as part of the description as you've done. I'd try a few products at first to get the hang of the process, then go whole hog. The SKU's being added in this way would only make sense for products with no variants. Again this is not exactly what you want but is closer without a lot of JavaScript coding. 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. Link to comment
Solution karen.sale Posted May 23 Author Solution Share Posted May 23 Thanks for your help! Just as I suspected... a lot of JavaScript coding. Instead, I have already done just as you suggested (Great minds think alike?) and have altered a CSV. Just waiting to test on a copy of the website, when (and if) it ever finishes copying 1600+ item details! creedon 1 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