I am trying to push an image to the checkout cart using $cart->addProduct($product, $request);
If I use custom options in a normal product this is how my request looks like.
$_FILES:
array(2) {
["options_76_file"] => array(5) {
["name"] => string(14) "Conference.jpg"
["type"] => string(10) "image/jpeg"
["tmp_name"] => string(14) "/tmp/phpkKRgHA"
["error"] => int(0)
["size"] => int(938613)
}
["options_80_file"] => array(5) {
["name"] => string(16) "capra-felice.jpg"
["type"] => string(10) "image/jpeg"
["tmp_name"] => string(14) "/tmp/php8SXzIk"
["error"] => int(0)
["size"] => int(93196)
}
}
Request:
array(7) {
["uenc"] => string(76) "aHR0cDovL2Rldi5rd2lrd2ViLmNvbS5hdS9uc2ovYWNjZXNzc29yaWVzL3NpbmdsZXQuaHRtbA,,"
["product"] => string(2) "22"
["related_product"] => string(0) ""
["options_76_file_action"] => string(8) "save_new"
["options"] => array(1) {
[77] => string(3) "251"
}
["options_80_file_action"] => string(8) "save_new"
["qty"] => string(1) "1"
}
As you might have noticed I am passing 2 images. Now I am trying to the same thing from my custom controller. I manage to add the product to the cart , but I cannot find the function that is responsible of saving the files to the order. Does anyone know how Magento handle this ? Thanks Soipo