A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello,
I would like use the unitPriceMeasurement field for my products, in the documentation it says that it exists under ProductVariant object but when I fetch it in Shopify GraphiQL API I cannot find it.
Someone can provide me with any information about this?
Thank you.
I have the same problem. The error message is "Field 'unitPriceMeasurement' doesn't exist on type 'ProductVariant'".
It is supposed to be only for customers in certain countries. You get that field if you are Germany for example, but not Canada. At least that is how it looked a few years ago when they introduced the unit pricing schema. Maybe it is just an oversight... I dunno. Is this released in general now?
I tried that on a dev store which have the country set to Germany. The unit price field then enabled on the store and I set some test values for products already. Still the API is saying that it's not available.
Not sure then. A Dev Store should have everything turned on. Maybe it requires an actual setting of the API itself to turn that on. Meaning you have to ask if you want it and it won't work unless you qualify.
I tried it on a live client store which is located in Germany. The merchant has the unit prices setup and configured. Same error that I got on the dev store.
When the dev store was configured to be in a different country, the option was not available. It's only available after switching to Germany, inline with what is said here: https://help.shopify.com/en/manual/intro-to-shopify/initial-setup/sell-in-germany/price-per-unit
Who should I contact to check whether this API can be "turned on", if it needs to be?
Thanks.
Hi David,
the link you provided only talks about the integration of the unitprices in a theme that does not support them by default yet,
but not the write access to the ProductVariant fields through the api.
We are also located in Germany ourselves and face this problem every day, especially when bigger clients who want to migrate to shopify from another shop system or need to update their unitprices through an ERP-software.
It is frustrating since the api needs to exist internally (I'm pretty sure the admin-frontend also only triggers an api..) and is just not published or documented.
Calling out to the german partner manager Roman Zenner did not help yet.
The thread was discussed by a lot of people in the german partner slack channel but nothing happened.
Even noticing losing potential plus leads due to that lack of api support did not bother them.
A very sad story. 😞
we are still hoping for the best.
It is money left on the table for sure. Not the first case, not the first time. I guess you just want to keep monitoring the API released in GQL to see when those aspects are covered.
In Germany, the unit price is mandatory information in several product categories, and sellers could be punished if they don't provide this information for their products. We as a Shopify-App should have access to this information to transfer product data to marketplaces like eBay and Amazon.
We have the same problem to access to override tax.
If Shopify doesn't want to implement these features, German sellers have to switch to another shop-systems.
This was already sent up as a feature request to the feature requests backlog. We'll see how that develops as the dev and product teams have to weigh up the PPU API factors of viability, global demand, feasibility, system stability, all moving parts, and so on and so forth...
It may be a yay or a nay. Drücke die Daumen!
Hi Matthias & @RiadhMa & @HunkyBill @magnalister
(how) did you fix or work around this issue?
thanks in advance
chris
No one has fixed this issue. Shopify has been ignoring this for 16+ years. Maybe in the next API release there will be a few bones to play with.
Hi Chris,
we found a solution by adding the fields of UnitPriceMeasurement as metafields to ProductVariantInput.
This maintains the structure and you can easily replace the unit_price snippets in templates with new field names like:
item.variant.unit_price
becomes
item.variant.metafields.unit_price_item.unit_price.value
You simply define the metafields in your shop: https://[[YOUR_SHOP]].myshopify.com/admin/metafields/productvariant
Upside:
If Shopify ever decides to add the feature to the API you only search and replace your metafields.
Downside:
The Shopify settings for UnitPriceMeasurement are completely ignored.
The funny thing about this is that for all intents, I would bet the farm that Shopify internally just uses metafields for these kinds of things anyway. So no loss or gain there, just a re-invention!
Hi!
We have the same problem and want to use the solution with the metafields.
But this doesn´t solve that on the checkout/summary page (not the basket page) the unit price will not be shown and without shopify plus it`s not possible to custom edit the summary template.
Or miss i something?
No, we can't modify the order template either.
The unit price for items in the order summary is displayed only when you manually enter a unit price in on the products admin.
Looks like Shopify either has to add unit price management to the API or allow modifing order summary prices for all humans.
It's still the same. It is not part Admin API 2202-04 and it is not yet in 2022-07 release candidate. Especially for German shops this information is relevant!