I am looking to automatically publish items to a shopify store from an existing web-app. I need to be able to create items with images to do so. I have been able to create items on shopify via the python api – but am not sure on how to add the images. Here is what I have right now:
all_products = Product.objects.all()[0:7]
for p in all_products:
images=[]
image={}
image["src"] = p.image.url
new_product = shopify.Product()
new_product.product_type = p.category()
new_product.body_html = p.description
new_product.title = p.caption
new_product.vendor = "atisundar"
new_product.images = images
new_product.save()
How do I add images to this?
new_product.images does not seem to work.
Any and all help is greatly appreciated. 🙂
Thank you.
I figured it out. 🙂