I am trying to get custom option value (SKU) from Configure product custom option

$customOptions = $objectManager->get('Magento\Catalog\Model\Product\Option')->getProductOptionCollection($_product);

foreach($customOptions as $optionKey => $optionVal):
               foreach($optionVal->getValues() as $valuesKey => $valuesVal) {
                     // echo //$valuesVal->getId().' '.$valuesVal->getTitle();
                     echo $valuesVal->getSku();

but i can't get SKU..

Please assist me.


1 Answer 1


Please change the code as below


echo $valuesVal->getSKU();


echo $valuesVal->getSku();
  • not get anything .. blank
    – Bhavesh
    Commented Aug 9, 2020 at 9:47
  • What are you getting when write print_r($valuesVal->getData());? Commented Aug 9, 2020 at 10:17
  • I added new Filed in Custom option and get value, Thank You.
    – Bhavesh
    Commented Aug 11, 2020 at 6:42

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.