How do I get simple product name of configurable into checkout Order summary?
You have to write a small extension for that.
1.app/code/Vendor/Namespace/etc/module.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Vendor_Namespace" setup_version="1.0.0">
</module>
</config>
2.app/code/Vendor/Namespace/etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Checkout\Model\DefaultConfigProvider">
<plugin name="AddAttPlug" type="Vendor\Namespace\Plugin\ConfigProviderPlugin" />
</type>
</config>
3. app/code/Vendor/Namespace/Plugin/ConfigProviderPlugin.php
<?php
namespace Vendor\Namespace\Plugin;
class ConfigProviderPlugin extends \Magento\Framework\Model\AbstractModel
{
public function afterGetConfig(\Magento\Checkout\Model\DefaultConfigProvider $subject, array $result)
{
$items = $result['totalsData']['items'];
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
for($i=0;$i<count($items);$i++){
$quoteId = $items[$i]['item_id'];
$quoteNext = ($quoteId + 1);
$quote = $objectManager->create('\Magento\Quote\Model\Quote\Item')->load($quoteNext);
$simpleProName = $quote->getName();
$items[$i]['childname'] = $simpleProName;
}
$result['totalsData']['items'] = $items;
return $result;
}
}
4.app/code/Vendor/Namespace/registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Vendor_Namespace',
__DIR__
);
5.Copy the file (details.html) from below path for your theme.
vendor/magento/module-checkout/view/frontend/web/template/summary/item/details.html
And then Replace the
<strong class="product-item-name" data-bind="text: $parent.name">
by
<strong class="product-item-name" data-bind="text: $parent.childname">
Thanks. Sejal Shah. I refer your extension to do this.