Closed thisiscab closed 8 years ago
@cabouffard this is an awfully long PR again. If we merge some of the changes from #28 and #16 into master, will it make the code review shorter here?
Yes
@braidn @DanielWright @bryanmtl
Hey, that's the best I can do in terms of PR length. I have merged the latest master. Would you guys mind to take a look and CR it? If it's too long to review, I'll just merge it into master.
@cabouffard LGMT
The way that Shopify works is that the images are associated with the product and not with the variant.
When we export the product, we have to first save the product with the associated variant and after the save has been completed, we can then associated the images with the variants.
Else there are no ways for us to know the variant_id and then associated the image with the variant_id if the variant has never been saved before.
When we update a variant at the moment, we only update the variant without the knowledge of the product, that means that we can't update the variant image, since the variant would have to know about it's product. We could do it in two phases but I don't think it's worth the effort at the moment, since this case is kind of an edge case.