Shopify Product images of an order items

落花浮王杯 提交于 2019-12-04 05:56:26

问题


I want to show the images of products in an order for the plugin I'm developing. But with the response returned for orders(from shopify admin API), in it line_items doesn't contain a product object or any other object that have the link for shopify cdn link of a product image, but the product id.

What I'm planning now is to call the admin api again with product id to get images which looks costly as I have to do it to all the items in an order and do that for all orders.

My question is whether any other way to derive the cdn link for product image given the product id or what could be the best approach for this?

Thanks in advance.


回答1:


Let check the shopify Product API Docs. You can get a list of products by Product API, which is not costly.

Get a list of specific products

GET /admin/products.json?ids=632910392,921728736


来源:https://stackoverflow.com/questions/47861502/shopify-product-images-of-an-order-items

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!