0

In Magento, by default, the sales order items for configurable products are showing the parent product SKU. How can we show the child product SKU for configurable products? I have tried changing the code in the function at vendor/magento/module-sales/Block/Adminhtml/Items/Column/DefaultColumn.php

public function getSku()
    {

        return $this->getItem()->getSku();
    }

to

public function getSku()
    {

        return $this->getItem()->getProduct()->getData('sku');
    }

But it still shows the parent SKU.

2
  • 1
    can you confirm the behavior on default magento, I have checked the default magento(2.4.5) where i have confirmed it will show your child product SKU only Feb 3 at 20:17
  • Yes. I am using ver. 2.3.4
    – Akhilesh
    Feb 6 at 11:05

0

Your Answer

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

Browse other questions tagged or ask your own question.