I am trying to import multiple images via DataPort. This is how my product node looks like:
<Product>
<ProductId>12</ProductId>
<Images><ProductImage>
<ProductImageId>0</ProductImageId>
<ProductId>12</ProductId>
<ImageUrl>~/Assets/ProductImages/34430_short.jpg</ImageUrl>
<ImageAltText>Stool</ImageAltText>
</ProductImage>
</Images>
</Product>
This imports the additional image fine, but it is overwriting my options, templates, and manufacturer data for the product. How do I only import additional images without including all the other fields?
How to import ONLY multiple images?
How to import ONLY multiple images?
Basem Emara:
http://BasemEmara.com
http://BasemEmara.com
Re: How to import ONLY multiple images?
The problem with the above xml is that when importing the product the import routine thinks that you want to re-set the product data. So, you have to include all other fields as well.
If you have already setup the product data on website then the best way to do so is to export the product xml data and then embed the image details same way as you are doing above and re-import the data.
If you have already setup the product data on website then the best way to do so is to export the product xml data and then embed the image details same way as you are doing above and re-import the data.
Thanks for your support
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Re: How to import ONLY multiple images?
That creates a real mess (merging, matching, formatting xml). Why can't it just ignore the fields that I am leaving out? If this can not be done with DataPort, how can I do this with the database?
Basem Emara:
http://BasemEmara.com
http://BasemEmara.com
Re: How to import ONLY multiple images?
You can use a sql query like the following:
where last 22 represents OrderBy value. Although it is not required to provide the OrderBy but it is recommended to provide a value, for each subsequent image for the same product the OrderBy value can simply be incremented by one.
Code: Select all
INSERT INTO ac_ProductImages(ProductId,ImageUrl,ImageAltText,OrderBy)
VALUES (4,'~/Assets/ProductImages/a.jpg','',22);
Thanks for your support
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter