When i print the order item there's an index product_options, i want to make the value is readable, because the current value seems like encoded or something

foreach($order->getAllItems() as $item){
 $data = $item->getData();

here's the result:

"product_options": "a:1:{s:15:\"info_buyRequest\";a:5:{s:4:\"uenc\";s:112:\"aHR0cDovL3ZpdGFtaW5kaXNrb24uY29tL2luZGV4LnBocC9maWx0ZXJwcm9kdWN0cy9maWx0ZXJwcm9kdWN0cy9sb2FkUHJvZHVjdHNCbG9jay8,\";s:7:\"product\";s:1:\"2\";s:8:\"form_key\";s:16:\"z0Ntafc7OHiqMgIx\";s:7:\"options\";s:4:\"cart\";s:3:\"qty\";i:1;}}"

1 Answer 1


use php function unserialize() or just call getProductOptions() on your order item ($item)

Your Answer

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

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