Products having special characters like TM
, I am importing products using ™
for TM
, it appears as expected on product detail and listing page. But when the product is added to cart, in mini-cart I see ™
string instead of TM
.
How can I import or create products with the product name containing special characters in Magento 2
?
Best Answer
You need to override some file to resolve this:
copy this file in your theme:
Magento rendering your product name as text
<a data-bind="attr: {href: product_url}, text: product_name"></a>
. You can change it fromtext
tohtml
like this<a data-bind="attr: {href: product_url}, html: product_name"></a>
.Maybe you are facing same on the checkout page in the summary section you need to do same for that but with this file.
From
<strong class="product-item-name" data-bind="text: $parent.name"></strong>
To<strong class="product-item-name" data-bind="html: $parent.name"></strong>
.