Brooklyn theme- Sale tag ON product option button

Highlighted
Explorer
97 0 23

Hi everyone,

 

I am looking for a way to add a little tag with "10% off" and "20% off" for certain variants. An example could be found on dropbottle.com

Capture.JPG

I have inspected their site and added the following code to my theme.scss but it's not working:

.single-option-radio label span {
    position: absolute;
    top: -10px;
    left: 0px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.single-option-radio label:nth-of-type(2) span:before {
    content: '10% off';
}

.single-option-radio label:nth-of-type(3) span:before {
    content: '20% off';
}

.single-option-radio label span:before {
    position: relative;
    background: $colorSecondary;
    padding: 3px 6px 4px 6px;
    top: 0;
    left: 0;
    z-index: 1;
    text-align: center;
    height: 100%;
    color: black;
    border-radius: 10px;
    font-size: 0.875rem;
}

 

Could anyone tell me what I would need to do to achieve this same result? 

My url is pupstarbeds.com/calming-cloud

 

Thank you so much!

0 Likes
Highlighted
Shopify Partner
505 56 78

Hey there @augds,

Each website is different. The code you copied is specific to that website only. For your store, I can help you with a code specific to your store. Message me if you need my help.

If helpful, please Like and Accept Solution
Want to hire me?
Contact Me At
WhatsApp or email me at umairabbascs@gamil.com
Hire me for 1) Theme coding 2) PSD to Shopify 3) Store optimization 4) SEO 5) Store setup 6) and more!
0 Likes