Storefront graphql API doesnt support multilingual lineitems in checkoutApi.

Storefront graphql API doesnt support multilingual lineitems in checkoutApi.

ashkan11
Shopify Partner
1 0 0

Hi all,

I am building a custom shopify storefront and using the storefront api to pull data. So far so good, except for the locale/translation.

This pretty much works well on products, but the moment I add a product to a checkout. The translation is not being applied to the lineItems in the checkout. See the query being made to get the checkout lineItems.

 

 

query getCart($checkoutId: ID!) @inContext(language: ZH_CN) {
	node(id: $checkoutId) {
		... on Checkout {
			__typename
			webUrl
			id
			completedAt
			availableShippingRates {
				ready
				shippingRates {
					handle
					title
					price {
						amount
						currencyCode
					}
				}
			}
			orderStatusUrl
			shippingAddress {
				address1
				address2
				city
				province
				phone
				firstName
				lastName
				zip
			}
			subtotalPrice {
				amount
				currencyCode
			}
			totalTax {
				amount
				currencyCode
			}
			totalPrice {
				amount
				currencyCode
			}
			lineItems(first: 250) {
				edges {
					node {
						id
						title
						quantity
						variant {
							id
							title
							product {
								collections(first: 3) {
									edges {
										node {
											title
											description
											id
										}
									}
								}
							}
							availableForSale
							currentlyNotInStock
							image {
								id
								url
							}
							selectedOptions {
								name
								value
							}
							product {
								handle
							}
							priceV2 {
								amount
								currencyCode
							}
						}
					}
				}
			}
		}
	}
}

 


Just some things I already tried:
1. Update the buyeridentity with a country code.
2. Smash my computer
3. Recompile my application.

Reply 1 (1)

mfirghi
Shopify Partner
4 0 0

Any updates on this? Otherwise we would have to create a separate query to translate the line items one by one using the retrieve translation query: Link