Have your say in Community Polls: What was/is your greatest motivation to start your own business?
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.

Adding a custom graphic with orderEditAddCustomItem mutation

Adding a custom graphic with orderEditAddCustomItem mutation

Schmidtc63
Shopify Partner
101 14 29

Occasionally, we edit an order through graphql and add a custom line item. Is there any way to modify that line item to add a custom graphic? 

 

 

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 524

Hey @Schmidtc63, we currently don't offer a way to add custom images to custom line items through GraphQL or REST. There is a bit more detail here in a post from one of my colleagues. One workaround I've seen some folks use is creating an "active" product with an associated product image that is not available through the Online Store sales channel. This helps prevent customers from purchasing it by mistake, while allowing you to offer an image for the product when it's presented in the order's line items to the customer after the order is edited.


 

If your app is able to edit products on merchant's stores, you could potentially set up some logic using the productCreate mutation to create non-visible products when needed. You could use these "non-visible" products in cases where it's needed to have a custom image for certain products on edited orders. I'm also going to forward some feedback on to our product team about this. I can't guarantee anything specific, but I do see how it would be useful/quicker to allow users to set a custom image on custom line items through an API call. Hope this helps!

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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