cancel
Showing results for 
Search instead for 
Did you mean: 

Show child SKU on sales order

Show child SKU on sales order

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.

1 REPLY 1

Re: Show child SKU on sales order

Hello @akhilesh4u66f7 

 

By default, Magento displays the SKU of the child product. To change this, you should first verify if the relevant file has been overridden. Additionally, check if any customizations have been made to the "Items Ordered" section on the sales order view page.

 

Hope it helps !

If you find our reply helpful, please give us kudos.

 

A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.

 

WebDesk Solution Support Team

Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789

 

 

Thank You,


WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789


Location: 150 King St. W. Toronto, ON M5H 1J9