Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How can I edit the labels on the checkout contact form field?

How can I edit the labels on the checkout contact form field?

josemco
Shopify Partner
1 0 0

I'm trying to update the labels for some inputs on the checkout page via API (e.g. the "City" field in the contact info form). I can do it via the theme config on my shop settings page, but trying to modify it via Graphql (using translationsRegister) throws me this error:

message: "Locale cannot be the same as the shop's primary locale"

Am I missing a something? Is there a specific endpoint for this? thanks!

Replies 2 (2)

Liam
Community Manager
3108 344 910

Hi Josemco,

 

For updating labels on the checkout page, you might be encountering the error because the primary locale of your shop is set to the same locale that you're trying to update. You cannot update these fields in the same locale as your shop's primary locale. You need to create a separate locale for these changes.

 

For removing the product category, unfortunately, you cannot directly set it to nil or empty. The GraphQL API does not allow setting a relation to null directly. You would need to create a new category, assign the product to this new category, then delete the old category. However, do note that this might affect other products that might be associated with the old category.

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Joda_Stoesser
Shopify Partner
24 0 6

Thanks for the explanation, @Liam.
The "Translate & Adapt" app is able to change values even in the primary language. What API is it using for the theme resource to change the strings for the checkout?

Building Club of Merchants -- the merchant-only community right in your Shopify admin dashboard

CTO @ coders.win for Shopify app development and consulting | All our apps
Please let me know if my reply is helpful by giving it a Like or marking it as the Solution!