In Shopify in the Dawn theme, I want to automatically change the color of a shirt or sweater on a product page, so that the product title and product description also change automatically. How do I do that?
Hi @RikandMoniek ,
You could do this with variant Metafields and a custom script.
1. For each color variant you’d create a title and description metafield.
Settings > Metafields and metaobjects > Variants > Add definition.
2. The script would then select your product title and description and replace this with the value of your variant metafield.
The exact code here would be theme specific
Hope that at least points you in the right direction,
Jake
Hi @RikandMoniek
It’s an advanced theme customization to have a dynamic title based on interaction such as variant or option selection.
That said, some themes may have the title for the PDP(product description page) as a dynamic source setting AND reload the entire product-info area.
So for themes that have that specific behavior you could add some liquid, like {{ product.selected_variant.title }}, to the title setting;
test thoroughly for when there is no variant selected.
If you need this customization added to a theme then contact me for services.
Contact info in forum signature below
.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Hi Jake, thanks for your response. I’ll get to work on this! Greetings Rik
Hi Paul, from all the responses it is indeed clear that I need to do some liquid coding to get a dynamic PDP. I will look further in this direction and try with instructions and codes that I have found. Grt, Rik
Awesome! if you need help there is a link in my bio