Hi! I need some help with customising the css to the custom badge that I just created. Can you help me?
Hello @robertsolcan
here is a code
step 1 Go to Online Store------> Edit code----------------> go to file “settings_schema.json**”** line number 1262
add this code
{
"type": "color_scheme",
"id": "custom_badge_color_scheme",
"label": "Custom badge",
"default": "scheme-3"
}
and then
Step 2
step 1 Go to Online Store------> Edit code----------------> go to file "card-product.liquid" line number 516
replace this code
{%- if card_product.available == false -%}
{{- 'products.product.sold_out' | t -}}
{%- elsif card_product.compare_at_price > card_product.price and card_product.available -%}
{{- 'products.product.on_sale' | t -}}
{%- elsif card_product.metafields.custom.custom_badge != blank -%}
{{ card_product.metafields.custom.custom_badge }}
{%- endif -%}
and Save it
Please check and let me
Thanks
1 Like