Jump to content

How to add a "sold out" badge on top of portfolio simple grid images?

Go to solution Solved by tuanphan,

Recommended Posts

Have you experimented with using a Store page and a Summary block?

The nice thing about a Store page is it has the product mark (sold out) already built-in and will self-maintain when you manipulate the stock levels.

The only question is can you alter the look of the Store page and Summary blocks with custom code to get the pleasing visual result. For your use case you'd probably want to hide some of the more commercy bits. One downside I can see is that the product details page is a bit less free form that a portfolio page. But you wouldn't know if that is a problem until you give it a go.

A downside is that a Business plan is the next level up from Personal.

Down the road you may find the commerce bits useful and you'd be ready to roll by show the bits you had hidden.

If you do give it a go, just add one or two products in and work on the formatting. Then if it goes well, add the rest.

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

If you want to add Sold Out to first - second products only, add this to Design > Custom CSS

a.grid-item[href*="/norway2023"]:before {
    content: "Sold out";
    position: absolute;
    top: 10px;
    left: 0;
    z-index: 9999;
    background-color: white;
    font-family: chauncy-pro;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: .08em;
}
a.grid-item {
    position: relative;
}

image.thumb.png.5976cf3993e1e69854bb13aa2b9ad477.png

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
17 hours ago, tuanphan said:

If you want to add Sold Out to first - second products only, add this to Design > Custom CSS

a.grid-item[href*="/norway2023"]:before {
    content: "Sold out";
    position: absolute;
    top: 10px;
    left: 0;
    z-index: 9999;
    background-color: white;
    font-family: chauncy-pro;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: .08em;
}
a.grid-item {
    position: relative;
}

image.thumb.png.5976cf3993e1e69854bb13aa2b9ad477.png

@tuanphan Amazing! Thank you! How do I go about adding it to each individual grid item for future use?

*EDIT* I figured it out

Edited by autpops
Link to comment
On 12/26/2022 at 7:43 PM, creedon said:

Have you experimented with using a Store page and a Summary block?

The nice thing about a Store page is it has the product mark (sold out) already built-in and will self-maintain when you manipulate the stock levels.

The only question is can you alter the look of the Store page and Summary blocks with custom code to get the pleasing visual result. For your use case you'd probably want to hide some of the more commercy bits. One downside I can see is that the product details page is a bit less free form that a portfolio page. But you wouldn't know if that is a problem until you give it a go.

A downside is that a Business plan is the next level up from Personal.

Down the road you may find the commerce bits useful and you'd be ready to roll by show the bits you had hidden.

If you do give it a go, just add one or two products in and work on the formatting. Then if it goes well, add the rest.

@creedon Yeah, I've played around with the store/products, and it just doesn't give me the design tools that I need for my workshop pages unfortunately. Thanks for the suggestion though!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.