Dr_KMcB Posted July 21, 2022 Share Posted July 21, 2022 Site URL: https://drkmcb.com/shop Hello With thanks for your help to add custom code to hide the 'add to cart' button in my shop, I'm now wanting to know how to add a red dot or a way to show an item is sold in the shop. I mentioned in my question yesterday that I want to have the shop without the ecommerce. Hiding 'add to cart' and not setting up a check out is basically what I want, but it would be great to add a red dot to art that recently sold if I can. In case you need to know the code I'm using for hiding add-to-cart, this is what has been injected currently vai Design > Custom CSS: .sqs-add-to-cart-button-wrapper { display: none !important; } Link to comment
tuanphan Posted July 22, 2022 Share Posted July 22, 2022 Hi, I don't see sold-out product. Can you add one? https://drkmcb.com/shop 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
Dr_KMcB Posted July 22, 2022 Author Share Posted July 22, 2022 No worries @tuanphan, I just added this sold painting to my shop: https://drkmcb.com/shop/p/are-you-awake-yet I can't see how to mark it as sold, other than in the description. Link to comment
creedon Posted July 22, 2022 Share Posted July 22, 2022 Not sure this is exactly what you want. I suggest trying to work within the features SS does provide. You can set the product quantity to zero. Doing so will then put the sold out mark on the product. From there if you want something different from Sold Out. Use CSS and/or JavaScript to manipulate the mark. The idea here being take advantage of the underlying elements SS is providing and modify them. 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
creedon Posted July 22, 2022 Share Posted July 22, 2022 By the way lovely cat painting! 😺 Dr_KMcB 1 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
Dr_KMcB Posted July 23, 2022 Author Share Posted July 23, 2022 Thank you @creedon! That pretty much does it! I'm very grateful you showed me how without adding more custom code. I think for now 'sold out' works. Do you know if there is a way to drop 'out' so it just says 'sold'? Link to comment
creedon Posted July 23, 2022 Share Posted July 23, 2022 (edited) 2 hours ago, Dr_KMcB said: Do you know if there is a way to drop 'out' so it just says 'sold'? For that you need a little custom code. Add the following to Store Settings > Advanced > Page Header Code Injection for the store page. Please see per-page code injection. <style> .products.collection-content-wrapper .product-mark.sold-out { visibility : hidden; } .products.collection-content-wrapper .product-mark.sold-out::after { content : 'sold'; visibility : visible; } .sold-out .product-details .product-mark.sold-out { visibility : hidden; } .sold-out .product-details .product-mark.sold-out::before { content : 'sold'; visibility : visible; } </style> This is for v7.1 and specific to the posters need. In the future if you have a unique painting (only 1 available) just set the product quantity to 1 and SS will take care of the rest after it is sold. Let us know how it goes. Edited July 23, 2022 by creedon 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
creedon Posted July 23, 2022 Share Posted July 23, 2022 Opps. Forgot the product listing. Give me a bit. 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
creedon Posted July 23, 2022 Share Posted July 23, 2022 I updated my code. 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
Dr_KMcB Posted August 1, 2022 Author Share Posted August 1, 2022 Thank you so much @creedon, you're a champion! I had to remove the <style> at the start and end, and then it worked. I just popped it underneath the other syntax there to hide the button. I'm very grateful thank you! creedon 1 Link to comment
catalienne Posted October 16, 2022 Share Posted October 16, 2022 On 7/22/2022 at 7:34 PM, tuanphan said: Hi, I don't see sold-out product. Can you add one? https://drkmcb.com/shop Hi @tuanphan any idea re red dot for sold out thanks 🙂 Link to comment
tuanphan Posted October 17, 2022 Share Posted October 17, 2022 22 hours ago, catalienne said: Hi @tuanphan any idea re red dot for sold out thanks 🙂 Like this? .sold-out .pdp-gallery-slides.selected.going-next.sqs-pinterest-products-wrapper.loaded:after { content: ""; background-color: red; width: 50px; height: 50px; display: block; position: absolute; top: 0; right: 0; border-radius: 50%; } 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
catalienne Posted November 8, 2022 Share Posted November 8, 2022 Thank you @tuanphan I was thinking something similar to how art galleries have red dots under the paintings so the red dot would be next to the title of the painting. Thank you Link to comment
tuanphan Posted November 12, 2022 Share Posted November 12, 2022 On 11/8/2022 at 6:04 PM, catalienne said: Thank you @tuanphan I was thinking something similar to how art galleries have red dots under the paintings so the red dot would be next to the title of the painting. Thank you Like this? 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
catalienne Posted November 14, 2022 Share Posted November 14, 2022 Yes thank you mainly in the title in the Shop thanks 🙂 Link to comment
tuanphan Posted November 21, 2022 Share Posted November 21, 2022 On 11/14/2022 at 1:55 PM, catalienne said: Yes thank you mainly in the title in the Shop thanks 🙂 Add to Design > Custom CSS .sold-out h1.pdp-details-title:after { content: ""; background-color: red; display: block; width: 20px; height: 20px; border-radius: 50%; position: absolute; right: -20px; top: 50%; } h1.pdp-details-title { position: relative; display: inline-block; } 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
catalienne Posted November 24, 2022 Share Posted November 24, 2022 Thanks @tuanphan unfortunately nothing happened 😞 Link to comment
tuanphan Posted November 27, 2022 Share Posted November 27, 2022 On 11/24/2022 at 5:13 PM, catalienne said: Thanks @tuanphan unfortunately nothing happened 😞 Try adding this to Settings > Advanced > Code Injection > Header <style> .sold-out h1.pdp-details-title:after { content: ""; background-color: red; display: block; width: 20px; height: 20px; border-radius: 50%; position: absolute; right: -20px; top: 50%; } h1.pdp-details-title { position: relative; display: inline-block; } </style> 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
hannahmunby Posted May 23, 2023 Share Posted May 23, 2023 Hi @tuanphan - I'm trying to do the same for my website www.fendittongallery.com/shards-and-sources, could you help? Thank you! Link to comment
tuanphan Posted May 25, 2023 Share Posted May 25, 2023 On 5/23/2023 at 7:59 PM, hannahmunby said: Hi @tuanphan - I'm trying to do the same for my website www.fendittongallery.com/shards-and-sources, could you help? Thank you! I see you solved? 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
hannahmunby Posted October 17, 2023 Share Posted October 17, 2023 Hi @tuanphan - sorry I never got back to you on this!! I was hoping to be able to add the red dot next to the title underneath the image. Here is a product page. https://www.fendittongallery.com/going-yellow. I have also since update the website to 7.1 so it isn't quite the same now. Thank you! Link to comment
tuanphan Posted October 19, 2023 Share Posted October 19, 2023 On 10/17/2023 at 10:13 PM, hannahmunby said: Hi @tuanphan - sorry I never got back to you on this!! I was hoping to be able to add the red dot next to the title underneath the image. Here is a product page. https://www.fendittongallery.com/going-yellow. I have also since update the website to 7.1 so it isn't quite the same now. Thank you! add to right of title or under title? and how about individual pages? do both (list + detail page) or on list page only 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment