Adding a custom graphic with orderEditAddCustomItem mutation

Schmidtc63
Shopify Partner
90 13 23

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
1436 235 489

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