CCR Code for a Label "Various Sizes" on Product Pictures in Product Grid

sophiaemli
Excursionist
14 1 1

Hi!

 

I want to add little labels on my product pictures in the product grid view, that say something like "various sizes" or "various colours", it should look like this (this is the given example product for the crave theme): 

 

sophiaemli_0-1697268826980.png

 

Can anyone help me with some CSS code I could add in my custom CSS ?

Thanks a lot in advance for any suggestions!! 🙂

 

 

Replies 4 (4)

Ugurcan
Shopify Expert
336 6 34

This cannot be done with CSS, you need to modify the liquid code first and then styles can be added.

Pasilobus, Inc - Shopify Experts -- www.pasilobus.com - Fast, efficient apps that do not slow down your store, Stellar support & Premier Services
sophiaemli
Excursionist
14 1 1

Oh ok, do you have a suggestion for the liquid code? 🙂

PaulNewton
Shopify Partner
6275 574 1324

Your searching for "badge" customizations, this will vary wildly depending on theme.

For Dawn based themes plenty of existing topics to research if DIY'ing it.

 

Example logic {% unless product.has_only_default_variant %}various sizes {% endunless %}

 

If you need this customization built then contact me by mail for services.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail.
Contact info in signature.

 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


sophiaemli
Excursionist
14 1 1

Ok, thank you! 🙂