Closed dupreesi closed 7 months ago
Hi @dupreesi, thank you for your feedback!
Indeed, image(s) for products is not supported yet. Do you have a particular deadline regarding this issue?
Currently the DFC model supports image only as an URL (which could be used to populate the src attribute). But I suppose this will not be enough for you as you are mentioning dimensions and others, right? We have an ongoing discussion about how to support image attributes here: https://github.com/datafoodconsortium/ontology/discussions/77.
What does the product_id
refers to? We have a SKU attribute that could perhaps hold this information.
What does the id
refers to?
Hi @lecoqlibre Just wanting to clarify - we could probably work with being able to embed the image URL within suppliedProduct.
Does the typescript Connector currently support that?
@dupreesi - we'd potentially need to download the image to store in Shopify & assign some values to the extra fields (can we derive dimensions from the image, & add alt text from product name) ?
@lecoqlibre
The blocker here is the inability to retrieve the exported suppliedProduct:image:url
.
We can live without the wider Image object for now. How quickly can you include this field in the typescript Import functionality ?
I just pushed a new version alpha.8 on npm which support product images (commit).
Can you try it @dupreesi?
Example:
const suppliedProduct = connector.createSuppliedProduct({
semanticId: "http://myplatform.com/tomato",
description: "Awesome tomato",
images: ["http://example.org/image1", "http://example.org/image2"]
});
suppliedProduct.addImage("http://example.org/image3");
suppliedProduct.getImages(); // will return ["http://example.org/image1", "http://example.org/image2", "http://example.org/image3"]
Hi @lecoqlibre, amazing thanks for the swift updates! I will try and let you know how it went!
It works like a charm @lecoqlibre
I think this seems resolved, so closing.
Hey, I'm currently facing an issue that the connector cannot yet seem to handle image related data. We're using the connector in order to export and import product data between Shopify shops. Shopify expects us to provide the following parameters so that we can create Products and their Variants and render them including images:
To note: a Shopify product instance could have multiple images. Wondering if their is a way for us to 1) Add image data to a SuppliedProduct (at least I think we'd need id, src, productId, alt) 2) Retrieve these fields (I can see that there is a getImage() method as part of Exhibitable which doesn't seem to be linked to the SuppliedProduct class)
Thanks for your great work :)