Hello,
We want to upload multiple images from source XML file and after upload, serialized array of media ids of uploaded images are saving inside custom field.
Can you tell me how can we do that?
Below are the data we have so far:
<AdditionalImages> <Image>EXTERNAL_URL_TO_IMAGE_1</Image> <Image>EXTERNAL_URL_TO_IMAGE_2</Image> <Image>EXTERNAL_URL_TO_IMAGE_3</Image> <Image>EXTERNAL_URL_TO_IMAGE_4</Image> </AdditionalImages>
Destination field rem_property_images contains value as serialized array like below:
a:20:{i:5016;s:4:"5016";i:5017;s:4:"5017";i:5018;s:4:"5018";i:5019;s:4:"5019";i:5020;s:4:"5020";i:5021;s:4:"5021";i:5022;s:4:"5022";i:5023;s:4:"5023";i:5024;s:4:"5024";i:5025;s:4:"5025";i:5026;s:4:"5026";i:5027;s:4:"5027";i:5028;s:4:"5028";i:5029;s:4:"5029";i:5030;s:4:"5030";i:5031;s:4:"5031";i:5032;s:4:"5032";i:5033;s:4:"5033";i:5034;s:4:"5034";i:5035;s:4:"5035";}
In this serialized array key and value both are Media Ids generated after uploadign images.
Can you help us to figure out how can we acheive this final result whcih will save in database for above Source XML?