Jump to content

MOVING THE SOLD OUT BADGE FOR 7.1 (PRODUCT STATUS)

Recommended Posts

Hi

I've found and added custom CSS to my 7.1 site in order to move the SOLD OUT badge on top of the product on the shop page, however, when i open the product its replicating the design and placing the sold out badge in a strange position. Without being able to edit the HTML anyone know what i can do so that i can change the position of the badge within the product page to somewhere .

Current shop page with sold out badge where i want it:

1568715337_Screenshot2020-12-02at22_23_28.thumb.png.a988e2b1ca070395013076b4a99b54f1.png

 

Current badge inside the product page NOT where i want it:

982190039_Screenshot2020-12-02at22_25_02.png.fe347b0f753e17fac2547ef00b49924f.png

 

How, if i keep the badge within the product page it would be better for it to be positioned. Or im happy for it show in a different way, any suggestions welcome!

98161518_Screenshot2020-12-02at22_26_35.png.5f98946fc6fea3c740ae28328780f09b.png

 

Here is my current code:

.product-mark.sold-out {
    background: #C98A36 !important;
    color: #EFEADA !important;
 font-family: 5TH AVENUE REG;
   letter-spacing: 2px;
  font-weight: 400;
 position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 15px;
  border-radius: 50%;
    width: 55px;
    height: 55px;
  justify-content: center;
  align-items: center;
  text-align: center;
  display: flex;
}

 

Thanks you!!

 

Edited by HalcyonDazeStore
Link to comment
  • HalcyonDazeStore changed the title to MOVING THE SOLD OUT BADGE FOR 7.1 (PRODUCT STATUS)
On 12/5/2020 at 11:58 PM, tuanphan said:

try edit this


.product-mark.sold-out

to this


.view-list.product-mark.sold-out

 

Doing that just gets rid of the code work ive done completely, even on the front product page.
This is how it looked anyway before the code.
I dont mind if it looks like that when you go into the product but i want the circular badge to stay on the shop front product thumbnail

365473790_Screenshot2020-12-07at23_05_13.thumb.png.c059226c66fa4bd3205d18dbc90b9a1a.png

 

1500958696_Screenshot2020-12-07at23_06_48.thumb.png.f4d89f52c07de345ed92a31869f2c440.png

 

Any other suggestions?

Thanks!

Link to comment

try this code

.view-list .product-mark.sold-out {
    background: #C98A36 !important;
    color: #EFEADA !important;
 font-family: 5TH AVENUE REG;
   letter-spacing: 2px;
  font-weight: 400;
 position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 15px;
  border-radius: 50%;
    width: 55px;
    height: 55px;
  justify-content: center;
  align-items: center;
  text-align: center;
  display: flex;
}
.view-item .product-mark.sold-out {
    background: #C98A36 !important;
    color: #EFEADA !important;
 font-family: 5TH AVENUE REG;
   letter-spacing: 2px;
  font-weight: 400;
    display: inline-block;
    padding: 15px;
  border-radius: 50%;
    width: 55px;
    height: 55px;
  justify-content: center;
  align-items: center;
  text-align: center;
  display: flex;
}

 

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
1 minute ago, tuanphan said:

try this code


.view-list .product-mark.sold-out {
    background: #C98A36 !important;
    color: #EFEADA !important;
 font-family: 5TH AVENUE REG;
   letter-spacing: 2px;
  font-weight: 400;
 position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 15px;
  border-radius: 50%;
    width: 55px;
    height: 55px;
  justify-content: center;
  align-items: center;
  text-align: center;
  display: flex;
}
.view-item .product-mark.sold-out {
    background: #C98A36 !important;
    color: #EFEADA !important;
 font-family: 5TH AVENUE REG;
   letter-spacing: 2px;
  font-weight: 400;
    display: inline-block;
    padding: 15px;
  border-radius: 50%;
    width: 55px;
    height: 55px;
  justify-content: center;
  align-items: center;
  text-align: center;
  display: flex;
}

 

PERFECT!! It worked!!!
Thank you so much 🙂

Link to comment
  • 1 month later...
22 hours ago, andreavictory said:

This code works perfectly! 

Question: What do I need to change to move the sold tag to the left side of the image on the front page, and make it centre on the listing page?

Thanks!

Screen Shot 2021-01-19 at 11.03.51 AM.png

Screen Shot 2021-01-19 at 11.04.19 AM.png

Can you share link to product in screenshot? We can check easier

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
  • 2 years later...

Hi @tuanphan I used this customm css on my website and it looks like the images attached.

Can I have a rectangle instead of a circle like the post from above?
Can I have the SOLD OUT text all in one line instead of 2 lines?

Also, dont know why there is more padding under the text on my circle, can we make it look with even amount of space on all sides of the rectangle?

My shop page is: www.gastonduflos.com/shop

Thank you so much!

 

Screenshot 2023-09-28 at 10.56.45 am.png

Screenshot 2023-09-28 at 10.56.54 am.png

Link to comment
On 9/28/2023 at 8:00 AM, GastonDuflos said:

Hi @tuanphan I used this customm css on my website and it looks like the images attached.

Can I have a rectangle instead of a circle like the post from above?
Can I have the SOLD OUT text all in one line instead of 2 lines?

Also, dont know why there is more padding under the text on my circle, can we make it look with even amount of space on all sides of the rectangle?

My shop page is: www.gastonduflos.com/shop

Thank you so much!

 

Screenshot 2023-09-28 at 10.56.45 am.png

Screenshot 2023-09-28 at 10.56.54 am.png

Add this CSS under

.product-mark.sold-out {
    white-space: nowrap;
    border-radius: 0 !important;
    height: auto !important;
    width: auto !important;
    display: inline-block !important;
}

image.png.0732f505d9aed5b2b84cdec2af3a7565.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
On 10/1/2023 at 8:01 PM, tuanphan said:

Add this CSS under

.product-mark.sold-out {
    white-space: nowrap;
    border-radius: 0 !important;
    height: auto !important;
    width: auto !important;
    display: inline-block !important;
}

image.png.0732f505d9aed5b2b84cdec2af3a7565.png

 

Thanks @tuanphan any idea why the text on the product page is dark grey and in the shop page is white? Please see the image you attached above.

Page: https://www.gastonduflos.com/shop/p/sea-of-dreams


I'd like both texts to be white. This is how the code looks like:

// Sold Out Badge in shop page and product page //
.view-list .product-mark.sold-out {
    background: #121212 !important;
    color: white !important;
 position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 15px;
  border-radius: 50%;
    width: 55px;
    height: 55px;
  justify-content: center;
  align-items: center;
  text-align: center;
  display: flex;
  
}
.view-item .product-mark.sold-out {
    background: #121212 !important;
    color: #white !important;
    display: inline-block;
    padding: 15px;
  justify-content: center;
  align-items: center;
  text-align: center;
  display: flex;
}

.product-mark.sold-out {
    white-space: nowrap;
    border-radius: 0 !important;
    height: auto !important;
    width: auto !important;
    display: inline-block !important;
}

Thank you so much!

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.