C# Magento产品上载图像未显示在.Net中
我有一个内部产品对象和一个Magento产品,我正在尝试将图像上载到Magento产品,但即使图像已上载,它也未设置为产品的缩略图,以下是我的代码:C# Magento产品上载图像未显示在.Net中,c#,.net,magento,soap,C#,.net,Magento,Soap,我有一个内部产品对象和一个Magento产品,我正在尝试将图像上载到Magento产品,但即使图像已上载,它也未设置为产品的缩略图,以下是我的代码: private catalogProductAttributeMediaCreateEntity CreateProductImage(Product product) { var productImageEntitiyInternal = new catalogProductImageFileEntity();
private catalogProductAttributeMediaCreateEntity CreateProductImage(Product product)
{
var productImageEntitiyInternal = new catalogProductImageFileEntity();
productImageEntitiyInternal.content = product.Image;
productImageEntitiyInternal.mime = product.ImageMime;
var productImageEntity = new catalogProductAttributeMediaCreateEntity();
productImageEntity.file = productImageEntitiyInternal;
productImageEntity.types = new[] { "thumbnail", "small_image", "image" }; ;
productImageEntity.position = "0";
productImageEntity.exclude = "0";
return productImageEntity;
}
然后
string imageFileName = _proxy.catalogProductAttributeMediaCreate(_sessionId, magentoProduct.SKU, magentoProduct.Image, "default", null);
其中magentoProduct.image是我刚刚创建的实体
图像已上载,但未设置为prodcut的缩略图图像。我对magento有一点了解。我看到没有flashplayer,我们无法上载任何图像,也无法正确显示图像。因此,如果您尚未安装flashplayer,请先安装它,然后再试一次