0

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

Thanks

1 Answer 1

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. Commented Jul 5, 2019 at 4:00
  • welcome!! if it works :) Commented Jul 5, 2019 at 4:02
  • Yes, It is working. Commented Jul 5, 2019 at 4:05
  • @sarveshDineshkumarPatel accept the answer so it could help others.
    – Mohit Rane
    Commented Jul 5, 2019 at 4:28
  • Yes, I am new here. I accepted thanks. Commented Jul 5, 2019 at 4:48

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.