DBrabazon Posted September 20 Posted September 20 (edited) Site URL: https://pineapple-seadragon-2hrz.squarespace.com/ Hi Site pwd: Hello I have previously used code from here: The three last products on my site are tagged poa so that they do not show an add to cart button on their pages or the product overview, and I have a separate piece of code so that the text "Contact us for more information" replaces the pricing on the product overview. I then followed the link above for code to add text after every product price in both locations. I need to omit that text from items tagged poa on the product overview. Please see the attached image where the item on the left is correct but the item on the right (tagged poa in order to show custom text instead of pricing) is incorrect. Help with this would be greatly appreciated. Edited September 20 by DBrabazon formatting/clarification
paul2009 Posted September 20 Posted September 20 (edited) 2 hours ago, DBrabazon said: I...followed the link above for code to add text after every product price in both locations. I need to omit that text from items tagged poa @DBrabazon Instead of using the CSS below that adds the text after every product price: .product-price::after { content: ' when collected from our Hobart collection point'; } Use the CSS below instead. This will only add the text when the item doesn't have the POA tag. .grid-item:not(.tag-poa) .product-price::after { content: ' when collected from our Hobart collection point'; } Did this help? Please give feedback by clicking an icon below ⬇️ Edited September 20 by paul2009 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
DBrabazon Posted September 23 Author Posted September 23 (edited) On 9/20/2024 at 8:40 AM, paul2009 said: @DBrabazon Instead of using the CSS below that adds the text after every product price: .product-price::after { content: ' when collected from our Hobart collection point'; } Use the CSS below instead. This will only add the text when the item doesn't have the POA tag. .grid-item:not(.tag-poa) .product-price::after { content: ' when collected from our Hobart collection point'; } Did this help? Please give feedback by clicking an icon below ⬇️ Thank you for your response. I tried this, replacing in Website Tools>Custom CSS: .product-price::after { content: ' when collected from our Hobart collection point'; } with .grid-item:not(.tag-poa) .product-price::after { content: ' when collected from our Hobart collection point'; } And this did fix the problem where "when collected from our Hobart collection point" would show on the products page after POA items, but it had the unwanted side effect of removing "when collected from our Hobart collection point" from product pages. Images attached before and after. Edited September 23 by DBrabazon attachment before/after ordering fix
DBrabazon Posted September 24 Author Posted September 24 22 hours ago, DBrabazon said: Thank you for your response. I tried this, replacing in Website Tools>Custom CSS: .product-price::after { content: ' when collected from our Hobart collection point'; } with .grid-item:not(.tag-poa) .product-price::after { content: ' when collected from our Hobart collection point'; } And this did fix the problem where "when collected from our Hobart collection point" would show on the products page after POA items, but it had the unwanted side effect of removing "when collected from our Hobart collection point" from product pages. Images attached before and after. I was able to fix it myself by adding a code block to each non-POA item's product page. <style>.product-price::after { content: ' when collected from our Hobart collection point'; }</style> Everything seems to be fixed. Thank you!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment