We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How Edit Sold Out Label/Badge on Product Grid

Solved

How Edit Sold Out Label/Badge on Product Grid

fairbear95
Tourist
6 0 2

Hi,

I've been trying to fix how "Sold Out" appears on our product listing grids. I'd ideally like it to appear like our "SALE" badge does - as wrapped text on the top left corner of the product image, but only on the grid pages and not on the product page. We're happy with how the product pages look, its just the collection grids!

 

Any ideas on what I need to do? 

 

I am using the Luxe Theme. Website is https://www.clkequestrian.com.au/

Accepted Solution (1)

topnewyork
Astronaut
1552 192 253

This is an accepted solution.

Hi @fairbear95,


1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.css / based.css file and paste the code in the bottom of the file.

.card-product--text-section {
    position: static !important;
}

.card-product-badge.badge-sold-out {
    position: absolute !important;
    top: 3px;
    left: 12px;
    text-align: left;
    width: 24%;
    z-index: 2;
    display: inline-block;
    margin-bottom: 18px;
    text-align: center;
    background-color: var(--badge-bg-color);
    color: var(--badge-txt-color);
    border-radius: var(--badge-corner-radius);
    border: var(--badge-border-width) solid rgba(var(--badge-border));
    box-sizing: border-box;
    padding: 8px 7px;
    font-size: 1.2rem !important;
    font-weight: 400;
    text-transform: var(--badge-text-case);
    line-height: 1;
    margin-right: 3px;
}

 

topnewyork_0-1750767250739.png

 


Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month

View solution in original post

Replies 6 (6)

Moeed
Shopify Partner
7764 2082 2568

Hey @fairbear95 

 

Yes that is for sure possible but since the way your product card is coded, doing that with CSS only won't be possible and you'll have to drag the code of the sold out badge in your product media and then add some custom coding and CSS to display it properly. This will require good coding knowledge so if you're not familiar with coding then I would highly recommend you to hire a Shopify developer can help out with that.

 

Feel free to connect with me and I would be more than happy to give you a helping hand.

 

Best,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


fairbear95
Tourist
6 0 2

Thanks @Moeed ! You may be right there 😅 

I will take another look overnight and if I can't fix it I will definitely reach out.

topnewyork
Astronaut
1552 192 253

This is an accepted solution.

Hi @fairbear95,


1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.css / based.css file and paste the code in the bottom of the file.

.card-product--text-section {
    position: static !important;
}

.card-product-badge.badge-sold-out {
    position: absolute !important;
    top: 3px;
    left: 12px;
    text-align: left;
    width: 24%;
    z-index: 2;
    display: inline-block;
    margin-bottom: 18px;
    text-align: center;
    background-color: var(--badge-bg-color);
    color: var(--badge-txt-color);
    border-radius: var(--badge-corner-radius);
    border: var(--badge-border-width) solid rgba(var(--badge-border));
    box-sizing: border-box;
    padding: 8px 7px;
    font-size: 1.2rem !important;
    font-weight: 400;
    text-transform: var(--badge-text-case);
    line-height: 1;
    margin-right: 3px;
}

 

topnewyork_0-1750767250739.png

 


Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
fairbear95
Tourist
6 0 2

Thank you so much for providing a solution @topnewyork ! Really appreciate it.

 

I've added it and noticed only a couple things:

1) There's a variance between desktop and mobile positioning

2) The "Sold Out" font and look remains the same - not mimicking the "SALES" badge look and positioning - but that's ok. I sense this may require further aid. 

topnewyork
Astronaut
1552 192 253

Hi @fairbear95,

Please add this code in theme.css/base.css

.card-product-badge.badge-sold-out {
    position: absolute !important;
    top: 3px;
    left: 12px;
    display: inline-block;
    margin-bottom: 18px;
    text-align: center;
    background-color: var(--badge-bg-color);
    color: #454545;
    border-radius: var(--badge-corner-radius);
    border: var(--badge-border-width) solid rgba(var(--badge-border));
    box-sizing: border-box;
    padding: 8px 7px !important;
    font-size: 1rem !important;
    font-weight: 400;
    text-transform: var(--badge-text-case);
    line-height: 1;
    margin-right: 3px;
}

.card-product--text-section {
    position: static !important;
}


Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
fairbear95
Tourist
6 0 2

Oh my gosh. You're a legend! It worked perfectly thank you so much! 😃