Hello Everyone,
I want to Know how Magento 2 serialize configurable data while saving. I am trying to duplicate the product creation form on front end, and everything is working great, but during creation of configurable product in bulk (with approx >20 attr), it’s not saving the data of configurable section, and after some more debugging, I found In core Magento serialize the configurable data and send it in key ‘configurable-matrix-serialized’ but I am receiving configurable data at key ‘configurable-matrix’(In array() format not a serialize data).
In The format i am receving data:
[configurable-matrix] => Array ( [0] => Array ( [product_link] => http://192.168.0.140/magento/marketplace/platinum/csproduct/vproducts/edit/id/%25id%25/ [name] => test merchant product 1-ff [sku] => test merchant product 1-ff [status] => 1 [price] => 1,111.00 [price_currency] => $ [price_string] => $1,111.00 [weight] => 12 [qty] => [variationKey] => 15 [configurable_attribute] => {"color":"15"} [thumbnail_image] => http://192.168.0.140/magento/marketplace/platinum/pub/static/frontend/Ced/ced/en_US/Magento_Catalog/images/product/placeholder/thumbnail.jpg [swatch_image] => [small_image] => [thumbnail] => [attributes] => Color: ff [canEdit] => 1 [newProduct] => 1 [record_id] => 0 ) )
the format In which, in core send data in admin section:
[configurable-matrix-serialized] => [{"id":null,"product_link":"http://192.168.0.140/magento/marketplace/platinum/admin/catalog/product/edit/id/%25id%25/","name":"merchant 1 pro 3-ff","sku":"merchant 1 pro 3-ff","status":1,"price":"1,212.00","price_currency":"$","price_string":"$1,212.00","weight":"12","qty":"","variationKey":"15","configurable_attribute":"{\"color\":\"15\"}","thumbnail_image":"http://192.168.0.140/magento/marketplace/platinum/pub/static/adminhtml/Magento/backend/en_US/Magento_Catalog/images/product/placeholder/thumbnail.jpg","media_gallery":{"images":{}},"image":[],"attributes":"Color: ff","was_changed":true,"canEdit":1,"newProduct":1,"record_id":0}]