Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hello!
I would like to know if it is possible to get the translated product title somehow in Flow.
I have used Get product data and for each I would like to do query to get the translated product title but I'm not sure if that is possible. Is there any other way?
Thanks in advance!
This is the query I have used to get the translated product title. (Cleared the id and locale.)
{
product(id: "") {
translations(locale: "") {
value
}
}
}
Can't use translations as a variable, I tried also this but didn't work as shown in the screenshot.
Hi @Toni_A,
The translations on a product are a list of Translation objects. Here are some Translation object docs on the structure of the data in that list.
You'll need to use some Liquid to get the translation you want using strategies outlined in the Liquid variables in Shopify Flow docs.
An example to get the translation for the key foo and locale en could be something like:
{%- assign translation = getProductForEachItem.translations | where: "key", "foo" | where: "locale", "en" | first -%}
{{translation.value}}
Hope that helps!
Thanks so much for your help and reply.
Unfortunately still it says: "'translations' is invalid. Replace this variable."
For some reason it doesn't have access to the translations, am I right? Any ideas?
I changed your "getProductForEachItem.translations" to this: "getProductDataForeachitem.translations" because it said it was invalid and should replace the variable.
Hi DaveMcV,
Sorry to bother but did you have time to check my previous message about your reply?
Thanks in advance!
Hi @Toni_A ,
We looked into it and found a problem with those fields and how Flow is able to access them. It's on the product team's radar to look at so stay tuned!
Hi Dave,
Thank you so much for the help. I will stay tuned, hopefully there will be a fix or solution to this. Thanks!
Best,
Toni
Hi Dave,
Sorry to bother again with this. Any news? I'm stuck with my issue because I would really need a translated title to be used in flows. Thanks!
We have a feature in the works to be able to access fields that require arguments (like translations and metafields), but are focused on metafields currently. We can't offer a timeline at the moment for when translations will be available.
Cheers @paul_n , yeah I know you in April '24 couldn't offer a timeline for when translations will be available, do you have anything more concrete at this time?
Being able to work with translations in Flow would def be a game changer for us dealing with multiple languages.
Not yet. At the moment we are focused on fields required for Flow to adopt new API versions.
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024