0

I want to get details of custom options which selected whenever customer choose at order time.

Thanks

0

Please try this:

foreach ($order->getAllItems() as $item) {
    $options = $item->getProductOptions();        
    if (isset($options['options']) && !empty($options['options'])) {        
        foreach ($options['options'] as $option) {
            var_dump($option); //Look into the dump data for what you are looking for.
        }
    }
}
5
  • Thank you very much. Jul 5 '19 at 4:00
  • welcome!! if it works :) Jul 5 '19 at 4:02
  • Yes, It is working. Jul 5 '19 at 4:05
  • @sarveshDineshkumarPatel accept the answer so it could help others.
    – Mohit Rane
    Jul 5 '19 at 4:28
  • Yes, I am new here. I accepted thanks. Jul 5 '19 at 4:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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