I have a custom product attribute which we are using in place of name for some reason. I need to change this through out the site. I got success in getting this in minicart , product and cart page.
but i am unable to find how it is getting render on the checkout summary section
for minicart it is rendering from the file
vendor/magento/module-checkout/CustomerData/DefaultItem.php
protected function doGetItemData()
{
.......
return [
'options' => $this->getOptionList(),
'qty' => $this->item->getQty() * 1,
'item_id' => $this->item->getId(),
'configure_url' => $this->getConfigureUrl(),
'is_visible_in_site_visibility' => $this->item->getProduct()->isVisibleInSiteVisibility(),
'product_name' => $this->item->getProduct()->getName(),
'product_url' => $this->getProductUrl(),
'product_has_url' => $this->hasProductUrl(),
.....
}
but in checkout summary i can't find how it works. Please suggest how can i achieve this.
Thanks
Best Answer
You will have to create a plugin for that. I wanted to add product flavor to order summary. This is the way I created a plugin and achieved what I wanted.
Vendor = Sejal
Files you need to create:
you can override this file in your theme like this
app\design\frontend\Vendor\themename\Magento_Checkout\web\template\summary\item\details.html
Code: registration.php
di.xml
module.xml
ConfigProviderPlugin.php
details.html
Copy vendor\magento\module-checkout\view\frontend\web\template\summary\item\details.html in theme and add
below
That's it! Hope it helps!