I've been tasked with importing from a non Magento store into Magento 1.9. We have over 236k orders that need to be imported. So far I've successfully written services (c#) to manage importing customers, categories, attributes and products directly into mysql. Now I need to do the orders. However, I'm stuck on what the information is in the product_options field that is serialized.


Can anyone point to somewhere that defines what each item is (s:15, a:2, s:3, etc) or explain to me what each item that needs to go into the serialization?


1 Answer 1


The string you posted is the serialized version of the array

array (
  'info_buyRequest' => 
  array (
    'qty' => 1,
    'options' => 
    array (

a:1 means that what follows after that is an array with 1 element.
s:15 means that what follows after that is a string with 15 characters
i means that what follows is an integer.

I don't know the equivalent of the serialize function from php to C#, but if you only have simple products in the orders you need to import then I suggest using the same string as above and change only the 1 from i:1 to the quantity of the product in that specific order.

If you have configurable products or custom options it's going to be horrible. In this case the options section can have a lot of different values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.