pashapasha1570048753 Posted September 13 Share Posted September 13 (edited) I use product blocks throughout my art website. I don't like the individual product pages as each product typically has other products that specifically pertain to it and so it was just easier to use blocks. However, at the moment, even if an item is sold, it's "add to cart" button still says "purchase" until you click the button and then it says sold out. Is there a css code for the button to just automatically be replaced with "SOLD OUT" if the item quantity falls to zero? Included is a test webpage. **UPDATE** https://www.pashapashanewyork.com/new-page-2 Actually if I could get a little bit of help again, it looks like the "SOLD OUT" only replaces the button when I feature the product image as well? As seen on the page above, both products are actually sold out however the product block where only the button is shown still says "Add to Cart". Is there a way for this code to work also when there is just the button without the product image? Edited September 26 by pashapasha1570048753 Link to comment
pashapasha1570048753 Posted September 13 Author Share Posted September 13 https://www.pashapashanewyork.com/new-page-2 Link to comment
pashapasha1570048753 Posted September 14 Author Share Posted September 14 Thank you! Appreciate this!! Link to comment
pashapasha1570048753 Posted September 27 Author Share Posted September 27 On 9/13/2023 at 3:55 PM, Web_Solutions said: Add the code below on Custom CSS panel in Website > Utilities > Website Tools > Custom CSS. .product-block:has(.sold-out) { .sqs-add-to-cart-button { background: #000; .sqs-add-to-cart-button-inner { display: none; } } .sqs-add-to-cart-button:after { content: "SOLD OUT"; color: #fff; } } Actually if I could get a little bit of help again, it looks like the "SOLD OUT" only replaces the button when I feature the product image as well? As seen on the page above, both products are actually sold out however the product block where only the button is shown still says "Add to Cart". Is there a way for this code to work also when there is just the button without the product image? https://www.pashapashanewyork.com/new-page-2 Link to comment
tuanphan Posted October 1 Share Posted October 1 Hi, Can you share link to a page without image? 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
pashapasha1570048753 Posted October 18 Author Share Posted October 18 https://www.pashapashanewyork.com/new-page-2 Link to comment
tuanphan Posted October 21 Share Posted October 21 On 10/18/2023 at 10:59 PM, pashapasha1570048753 said: https://www.pashapashanewyork.com/new-page-2 I see you figured it out how to change it to Sold out? 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
pashapasha1570048753 Posted October 25 Author Share Posted October 25 On 10/21/2023 at 7:30 AM, tuanphan said: I see you figured it out how to change it to Sold out? It looks like the "SOLD OUT" only replaces the button when I feature the product image as well? As seen on the page above, both products are actually sold out however the product block where only the button is shown still says "Add to Cart". Is there a way for this code to work also when there is just the button without the product image? Link to comment
tuanphan Posted October 27 Share Posted October 27 On 10/26/2023 at 1:03 AM, pashapasha1570048753 said: It looks like the "SOLD OUT" only replaces the button when I feature the product image as well? As seen on the page above, both products are actually sold out however the product block where only the button is shown still says "Add to Cart". Is there a way for this code to work also when there is just the button without the product image? You mean change this to Sold out? You can add this to Website Tools (under Not Linked) > Custom CSS div#block-yui_3_17_2_1_1695745135102_2127 { .sqs-add-to-cart-button-inner { font-size: 0; } .sqs-add-to-cart-button-inner:before { content: "Sold Out"; font-size: 14px; white-space: nowrap; position: relative; top: 2px; }} 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