Is there a generic way of changing the thumbnail of a line item?

Is there a generic way of changing the thumbnail of a line item?

ottero
Shopify Partner
19 0 9

Hey everyone!

 

We are currently building an app for which we need a custom preview image of the product on the line item within the cart. Now I know I can do it with line item properties and then change the theme liquid files to use the URL from the properties. But that requires us to know the structure of the theme and change it. Which is not ideal as it requires us to keep extending it for new themes. The cart API also doesn't seem to support setting the image for some reason. Is there a more generic way to change the thumbnail that does not depend on the theme?

 

Thanks for any help!

Reply 1 (1)

Zentrifuge
Shopify Partner
11 0 1

Trying to achieve the same for my shop here:
To attach custom-generated images to cart line-items. But then, won't we also like to have our custom image stay associated with that line item beyond the checkout process (fulfillment notifications, order history...)? I wonder if that is at all possible.