A user seeks to dynamically change product price colors on Dawn 8.0.1 based on product tags, specifically wanting items tagged “Superdeals” to display prices in orange (#ED6A20) across collection and product pages.
Solution Provided:
A detailed code implementation using Liquid templates:
Create a new price-colors.liquid section with customizable color blocks
Add tag-checking logic to card-product.liquid and featured-product.liquid
Tag products with prefix format price:colorname (e.g., price:yellow)
Configure colors in theme customizer by entering tag name without the price: prefix
Extended Implementation:
The solution was successfully expanded to cover:
Cart page (main-cart-items.liquid)
Cart drawer (cart-drawer.liquid)
Instant search results (predictive-search.liquid)
Current Status:
The original poster confirmed the solution works perfectly. A later user encountered an issue where colors weren’t applying, which was resolved by ensuring tag names use lowercase text only. The discussion appears resolved with a working implementation across all requested areas.
Summarized with AI on November 2.
AI used: claude-sonnet-4-5-20250929.
Anyone know how we can change the price color of a product based on product tags? We are using Dawn 8.0.1.
We have specific products that has a flat low price called “Superdeals”, and we want to change the price color for products that has the “Superdeals” tag.
Is there a way to dynamicaly use a rule that say “If product has tag (Superdeals)” → "Change price color to #ED6A20.
We want to use this on both product pages & collection pages.
Go to snippets/card-product.liquid add code below to file( refer the screenshot below)
{%- liquid
assign tagPrice = ''
assign tags = card_product.tags
for tag in tags
if tag contains 'price:'
assign tagPrice = tag | split : 'price:' | last
endif
endfor
-%}
Go to sections/main-product.liquid add code below to file( refer the screenshot below)
{%- liquid
assign tagPrice = ''
assign tags = product.tags
for tag in tags
if tag contains 'price:'
assign tagPrice = tag | split : 'price:' | last
endif
endfor
-%}
Go to sections/featured-product.liquid add code below to file( refer the screenshot below)
{%- liquid
assign tagPrice = ''
assign tags = product.tags
for tag in tags
if tag contains 'price:'
assign tagPrice = tag | split : 'price:' | last
endif
endfor
-%}
Thank you so much for the detailed reply. I tried this code and it worked perfectly! Are we also able to do this for the cart page, the Cart Drawer & instant search results?
Go to sections/predictive-search.liquid add code below to file( refer the screenshot below)
{%- liquid
assign tagPrice = ''
assign tags = product.tags
for tag in tags
if tag contains 'price:'
assign tagPrice = tag | split : 'price:' | last
endif
endfor
-%}
Go to sections/main-cart-items.liquid add code below to file( refer the screenshot below)
{%- liquid
assign tagPrice = ''
assign product = item.product
assign tags = product.tags
for tag in tags
if tag contains 'price:'
assign tagPrice = tag | split : 'price:' | last
endif
endfor
-%}
Go to snippets/cart-drawer.liquid add code below to file( refer the screenshot below)
{%- liquid
assign tagPrice = ''
assign product = item.product
assign tags = product.tags
for tag in tags
if tag contains 'price:'
assign tagPrice = tag | split : 'price:' | last
endif
endfor
-%}
Hello @EBOOST
Thanks for sharing the code and your help, but I have done all the steps but the color didn’t change as it appear in the photo below, please help