Jump to content

Change sold button to a custom JPEG image (Squarespace 7.1)

Recommended Posts

  • Replies 4
  • Views 1.6k
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

First find this code & change background to background-color

.view-list .product-mark.sold-out {
    background: #000 !important;
    color: #fff !important;
    font-family: FUTURACUSTOM;
    letter-spacing: 0px;
    line-height: 0px;
    font-size: 16px;
    position: absolute;
    transform: rotate(
-20deg
);
    top: 10px;
    right: 10px;
    display: center;
    padding: 20px;
    border-radius: 100%;
    width: 20px;
    height: 20px;
    justify-content: center;
    align-items: center;
    text-align: center;
    display: flex;
}

Next, add this code

/* Sold out badge image */
.product-mark.sold-out {
    background-image: url(https://cdn.pixabay.com/photo/2021/01/04/12/07/cat-5887341__340.jpg) !important;
    background-size: cover;
    color: transparent !important;
    background-repeat: no-repeat;
}

image.thumb.png.10dbdf1ae697f21fa21e4bcb0820c379.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
  • Susana_SQSP changed the title to Change sold button to a custom JPEG image (Squarespace 7.1)
  • 2 weeks later...
  • 2 years later...

use the code

.view-list .product-mark.sold-out {
    background-color: #000 !important;
    color: transparent !important;
    font-family: FUTURACUSTOM;
    letter-spacing: 0;
    line-height: 0px;
    font-size: 16px;
    position: absolute;
    transform: rotate(-20deg);
    top: 10px;
    right: 10px;
    display: center;
    padding: 20px;
    border-radius: 100%;
    width: 20px;
    height: 20px;
    justify-content: center;
    align-items: center;
    text-align: center;
    display: flex
}

.product-mark.sold-out {
    background-image: url(https://static1.squarespace.com/static/6294f8aa0bbab5232bb56b51/t/659ecddad08dad14354261df/1704906202442/2+copia.jpg) !important;
    background-size: cover;
    color: transparent !important;
    background-repeat: no-repeat
}

@media screen and (min-width: 768px) {
    .ProductItem .ProductItem-details .product-mark.sold-out {
        position:absolute;
        top: 0%;
        left: -75%;
        z-index: 9999;
        width: 70px;
        height: 70px
    }
}

@media screen and (max-width: 767px) {
    .ProductItem .ProductItem-details .product-mark.sold-out {
        position:absolute;
        top: -45% !important;
        left: 0;
        z-index: 9999;
        width: 50px;
        height: 50px
    }
}

 

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

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.