Shopify themes, liquid, logos, and UX
Hi I'm trying to change the description text for different variants of my product. I have two different variants but each variant includes different items so I want to be able to have different text in the description/what's included text. My website is PulseDevice.com and I'm using Impact Theme.
To have dynamic descriptions per variant you will either need to pay for an app or customize your theme.
Though some themes may re-render the product-information section when a variant changes which can let you use metafields directly to achieve this.
In the admin for the content try making a test variant metafield definition holding a test description.
Then in the theme reference the variant metafield with a custom liquid block i.e. {{ product.selected_variant.metafields.content.description }}
Though in most themes this info wont update when the variant is changed , so theyneed both liquid and javascript customizations.
If you need this customization built for you then contact me by my email for services, or DM me(slower).
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Good Luck.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
It could be easier to split your product into 2 separate products and implement product variations as per https://support.maestrooo.com/article/307-product-creating-product-variations-that-link-to-different...
As seen in demo store at https://impact-theme-sound.myshopify.com/products/mw07-plus-atomobili-lamborghini-polished-black-mat...
Because these would be separate products you'd be able to configure their product page templates with different texts.
Hi @epoll24,
The Easify Product Options app offers a couple of solutions that might interest you 🤗:
Simple settings:
Let me know which approach you prefer, and I can guide you through the setup. Alternatively, reach out to the Easify team via the in-app live chat for assistance.
Hi Epoll24,
You can utilize the metafield (Custom Data) feature, to store the description unique to each of the product variants.
You can go to your store Settings > Custom Data > Variants, and create a custom definition, with name "Variant Description" , Namespace and key "custom.variant_description", set the type to "Rich Text" .
After creating this definition, you can go to your product > select the variant, and scroll to metafield sections, and find the "Variant Description" , and you can enter the description you want for that variant.
After this, you can go to your store theme > Customize, and navigate to the product page template, and click "Add block" under the "Product information" section, and select "Custom Liquid". Next, you can click into this "Custom Liquid" block, and paste the code below :
{% for variant in product.variants %} <div class="yagi-variant-description" data-variant-id="{{ variant.id }}" style="display:none;"> {{ variant.metafields.custom.variant_description | metafield_tag }} </div> {% endfor %} <script> function yagiHideAllVariantDescriptionExcept(variant){ document.querySelectorAll('.yagi-variant-description').forEach(el => { el.style.display = 'none'; }); const descriptionEl = document.querySelector(`.yagi-variant-description[data-variant-id="${variant}"]`); if (descriptionEl){ descriptionEl.style.display = 'block'; } } const queryString = location.search; const urlParams = new URLSearchParams(queryString); var variantId = '{{ product.variants.first.id }}'; if(urlParams.get('variant')){ variantId = urlParams.get('variant'); } yagiHideAllVariantDescriptionExcept(variantId); document.addEventListener("DOMContentLoaded", (event) => { document.querySelector("input[type='hidden'].product-variant-id").addEventListener('change', yagiVariantChanged); }); function yagiVariantChanged() { if (document.querySelector('.product-variant-id')?.value !== variantId) { variantId = document.querySelector('.product-variant-id')?.value; if(!variantId) { variantId == '{{ product.variants.first.id }}' } yagiHideAllVariantDescriptionExcept(variantId); } } </script>
Click "Save", then go to your online store, and navigate to the product , you should see the description show / hide based on the variant you have selected.
If you would like to follow a step-by-step guide with screenshots for this, you can follow this guide I wrote here : https://yagisoftware.com/articles/how-to-set-different-description-for-each-product-variant-in-shopi...
Hope this can help!
Regards,
Axel Kee
Hello Epoll24,
You can utilize the metafield (Custom Data) feature in the Store Settings, to save the description unique to each product variants.
You can go to your store Settings > Custom Data > Variants, and create a custom definition, with name "Variant Description" , Namespace and key "custom.variant_description", set the type to "Rich Text" .
After creating this definition, you can go to your product > select the variant, and scroll to metafield sections, and find the "Variant Description" , and you can enter the description you want for that variant.
After this, you can go to your store theme > Customize, and navigate to the product page template, and click "Add block" under the "Product information" section, and select "Custom Liquid". Next, you can click into this "Custom Liquid" block, and paste the code below :
{% for variant in product.variants %} <div class="yagi-variant-description" data-variant-id="{{ variant.id }}" style="display:none;"> {{ variant.metafields.custom.variant_description | metafield_tag }} </div> {% endfor %} <script> function yagiHideAllVariantDescriptionExcept(variant){ document.querySelectorAll('.yagi-variant-description').forEach(el => { el.style.display = 'none'; }); const descriptionEl = document.querySelector(`.yagi-variant-description[data-variant-id="${variant}"]`); if (descriptionEl){ descriptionEl.style.display = 'block'; } } const queryString = location.search; const urlParams = new URLSearchParams(queryString); var variantId = '{{ product.variants.first.id }}'; if(urlParams.get('variant')){ variantId = urlParams.get('variant'); } yagiHideAllVariantDescriptionExcept(variantId); document.addEventListener("DOMContentLoaded", (event) => { document.querySelector("input[type='hidden'].product-variant-id").addEventListener('change', yagiVariantChanged); }); function yagiVariantChanged() { if (document.querySelector('.product-variant-id')?.value !== variantId) { variantId = document.querySelector('.product-variant-id')?.value; if(!variantId) { variantId == '{{ product.variants.first.id }}' } yagiHideAllVariantDescriptionExcept(variantId); } } </script>
Click "Save", then go to your online store, and navigate to the product , you should see the description show / hide based on the variant you have selected.
If you would like to follow a step-by-step guide with screenshots for this, you can follow this guide I wrote here : https://yagisoftware.com/articles/how-to-set-different-description-for-each-product-variant-in-shopi...
Hope this can help!
Regards,
Axel Kee
Hi good day, i have a question. I want to add another description by using this variation. yagi-variant-key_products variant.metafields.custom.variant_key-products
How to do it by using this code. thank you so much
{% for variant in product.variants %} <div class="yagi-variant-description" data-variant-id="{{ variant.id }}" style="display:none;"> {{ variant.metafields.custom.variant_description | metafield_tag }} </div> {% endfor %} <script> function yagiHideAllVariantDescriptionExcept(variant){ document.querySelectorAll('.yagi-variant-description').forEach(el => { el.style.display = 'none'; }); const descriptionEl = document.querySelector(`.yagi-variant-description[data-variant-id="${variant}"]`); if (descriptionEl){ descriptionEl.style.display = 'block'; } } const queryString = location.search; const urlParams = new URLSearchParams(queryString); var variantId = '{{ product.variants.first.id }}'; if(urlParams.get('variant')){ variantId = urlParams.get('variant'); } yagiHideAllVariantDescriptionExcept(variantId); document.addEventListener("DOMContentLoaded", (event) => { document.querySelector("input[type='hidden'].product-variant-id").addEventListener('change', yagiVariantChanged); }); function yagiVariantChanged() { if (document.querySelector('.product-variant-id')?.value !== variantId) { variantId = document.querySelector('.product-variant-id')?.value; if(!variantId) { variantId == '{{ product.variants.first.id }}' } yagiHideAllVariantDescriptionExcept(variantId); } } </script>
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025