Minicart - Html text showing raw , required formatted text in magento 2Magento 2 Open minicart when item is addedMagento : Quick View Add to Cart not Showing Product in Minicart Witout Refreshing PageMagento 2 minicart showing count multiple timeMagento 2, minicart, change “Go to Checkout” text to “Checkout” onlyUpdate Minicart programatically in magento 2Magento 2: Customer logout after minicart showing product.Decode HTML Knockout JS - MinicartMagento 2 I Want to add Dropdown Quantity Box In Minicartmove minicart before top.search magento 2.2Minicart - Html text reflecting raw , required formatted text in magento 2
Pushout commutative diagram
4*4*4 Rubiks cube Top Layer Issue
Turing patterns
Required to check-in in person at international layover airport
Does there exist a word to express a male who behaves as a female?
Smooth switching between 12v batteries, with toggle switch
Do any instruments not produce overtones?
Why does the Schrödinger equation work so well for the Hydrogen atom despite the relativistic boundary at the nucleus?
Trapping Rain Water
PL/SQL function to receive a number and return its binary format
Why is the relationship between frequency and pitch exponential?
How is it possible that Gollum speaks Westron?
Why is the past conditionel used here?
Efficient integer floor function in C++
How hard would it be to convert a glider into an powered electric aircraft?
My coworkers think I had a long honeymoon. Actually I was diagnosed with cancer. How do I talk about it?
Version 2 - print new even-length arrays from two arrays
When writing an error prompt, should we end the sentence with a exclamation mark or a dot?
Did the first version of Linux developed by Linus Torvalds have a GUI?
Do the English have an ancient (obsolete) verb for the action of the book opening?
Why don't B747s start takeoffs with full throttle?
Select items in a list that contain criteria #2
What are the words for people who cause trouble believing they know better?
What LISP compilers and interpreters were available for 8-bit machines?
Minicart - Html text showing raw , required formatted text in magento 2
Magento 2 Open minicart when item is addedMagento : Quick View Add to Cart not Showing Product in Minicart Witout Refreshing PageMagento 2 minicart showing count multiple timeMagento 2, minicart, change “Go to Checkout” text to “Checkout” onlyUpdate Minicart programatically in magento 2Magento 2: Customer logout after minicart showing product.Decode HTML Knockout JS - MinicartMagento 2 I Want to add Dropdown Quantity Box In Minicartmove minicart before top.search magento 2.2Minicart - Html text reflecting raw , required formatted text in magento 2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
In mini cart i am trying to put a custom/formatted text but it reflecting raw html over there, required for magento 2.
Using Magento 2.2.4.
I expect html formatted text but the actual output raw text on minicart
magento2 mini-cart
New contributor
add a comment |
In mini cart i am trying to put a custom/formatted text but it reflecting raw html over there, required for magento 2.
Using Magento 2.2.4.
I expect html formatted text but the actual output raw text on minicart
magento2 mini-cart
New contributor
add a comment |
In mini cart i am trying to put a custom/formatted text but it reflecting raw html over there, required for magento 2.
Using Magento 2.2.4.
I expect html formatted text but the actual output raw text on minicart
magento2 mini-cart
New contributor
In mini cart i am trying to put a custom/formatted text but it reflecting raw html over there, required for magento 2.
Using Magento 2.2.4.
I expect html formatted text but the actual output raw text on minicart
magento2 mini-cart
magento2 mini-cart
New contributor
New contributor
New contributor
asked May 28 at 16:29
Rishabh ShuklaRishabh Shukla
1
1
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Try following way:
app/code/SR/MagentoCommunity/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="MagentoCheckoutCustomerDataDefaultItem">
<plugin name="sr_DefaultItem"
type="SRMagentoCommunityPluginCheckoutCustomerDataDefaultItem" sortOrder="1"/>
</type>
</config>
app/code/SR/MagentoCommunity/Plugin/Checkout/CustomerData/DefaultItem.php
<?php
namespace SRMagentoCommunityPluginCheckoutCustomerData;
class DefaultItem
public function afterGetItemData(
MagentoCheckoutCustomerDataDefaultItem $subject,
$item
)
if (isset($item['options']))
$options = $item['options'];
foreach ($options as $key => $option)
$item['options'][$key]['value'] = html_entity_decode($option['value']);
return $item;
Overwrite following template for change render type:
vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
Now modify
<span data-bind="text: option.value"></span>
to
<span data-bind="html: option.value"></span>
Output:
[Update]
Add following code in di.xml
<type name="MagentoCheckoutModelDefaultConfigProvider">
<plugin name="st_config_provider"
type="SRMagentoCommunityPluginCheckoutModelDefaultConfigProvider" sortOrder="1"/>
</type>
app/code/SR/MagentoCommunity/Plugin/Checkout/Model/DefaultConfigProvider.php
<?php
namespace SRMagentoCommunityPluginCheckoutModel;
use MagentoFrameworkSerializeSerializerJson;
class DefaultConfigProvider
/**
* @var Json
*/
private $json;
/**
* DefaultConfigProvider constructor.
* @param Json $json
*/
public function __construct(
Json $json
)
$this->json = $json;
public function afterGetConfig(
MagentoCheckoutModelDefaultConfigProvider $subject,
array $result
)
$items = $result['totalsData']['items'];
foreach ($items as $index => $item)
if (isset($item['options']))
$options = $this->json->unserialize($item['options']);
foreach ($options as $key => $option)
if (isset($option['full_view']))
$options[$key]['full_view'] = html_entity_decode($option['full_view']);
$item['options'] = $this->json->serialize($options);
$result['totalsData']['items'][$index] = $item;
return $result;
OR
Add following code in di.xml
<type name="MagentoQuoteModelCartCartTotalRepository">
<plugin name="checkout_item_sidebar"
type="SRMagentoCommunityPluginQuoteModelCartCartTotalRepository" sortOrder="1"/>
</type>
app/code/SR/MagentoCommunity/Plugin/Quote/Model/Cart/CartTotalRepository.php
<?php
namespace SRMagentoCommunityPluginQuoteModelCart;
use MagentoFrameworkSerializeSerializerJson;
class CartTotalRepository
/**
* @var Json
*/
private $json;
/**
* DefaultConfigProvider constructor.
* @param Json $json
*/
public function __construct(
Json $json
)
$this->json = $json;
public function afterGet(
MagentoQuoteModelCartCartTotalRepository $subject,
$quoteTotals
)
$quoteItems = $quoteTotals->getItems();
$items = [];
/** @var MagentoQuoteModelCartTotalsItem $item */
foreach ($quoteItems as $index => $item)
if ($options = $item->getOptions())
$options = $this->json->unserialize($options);
foreach ($options as $key => $option)
if (isset($option['full_view']))
$options[$key]['full_view'] = html_entity_decode($option['full_view']);
$item->setOptions($this->json->serialize($options));
$items[$index] = $item;
$quoteTotals->setItems($items);
return $quoteTotals;
Now it's working on minicart, but still not working checkout page.
– Rishabh Shukla
May 28 at 19:34
Your question is about minicart, why you test in checkout page. For other page like checkout, cart page etc you need to do same things.
– Sohel Rana
May 28 at 21:49
Please mention checkout page method for plugin.
– Rishabh Shukla
May 29 at 5:47
Check updated answer
– Sohel Rana
May 29 at 7:36
Is it working for you? If yes, accept this answer that will help other.
– Sohel Rana
May 30 at 6:35
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Rishabh Shukla is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f276447%2fminicart-html-text-showing-raw-required-formatted-text-in-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try following way:
app/code/SR/MagentoCommunity/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="MagentoCheckoutCustomerDataDefaultItem">
<plugin name="sr_DefaultItem"
type="SRMagentoCommunityPluginCheckoutCustomerDataDefaultItem" sortOrder="1"/>
</type>
</config>
app/code/SR/MagentoCommunity/Plugin/Checkout/CustomerData/DefaultItem.php
<?php
namespace SRMagentoCommunityPluginCheckoutCustomerData;
class DefaultItem
public function afterGetItemData(
MagentoCheckoutCustomerDataDefaultItem $subject,
$item
)
if (isset($item['options']))
$options = $item['options'];
foreach ($options as $key => $option)
$item['options'][$key]['value'] = html_entity_decode($option['value']);
return $item;
Overwrite following template for change render type:
vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
Now modify
<span data-bind="text: option.value"></span>
to
<span data-bind="html: option.value"></span>
Output:
[Update]
Add following code in di.xml
<type name="MagentoCheckoutModelDefaultConfigProvider">
<plugin name="st_config_provider"
type="SRMagentoCommunityPluginCheckoutModelDefaultConfigProvider" sortOrder="1"/>
</type>
app/code/SR/MagentoCommunity/Plugin/Checkout/Model/DefaultConfigProvider.php
<?php
namespace SRMagentoCommunityPluginCheckoutModel;
use MagentoFrameworkSerializeSerializerJson;
class DefaultConfigProvider
/**
* @var Json
*/
private $json;
/**
* DefaultConfigProvider constructor.
* @param Json $json
*/
public function __construct(
Json $json
)
$this->json = $json;
public function afterGetConfig(
MagentoCheckoutModelDefaultConfigProvider $subject,
array $result
)
$items = $result['totalsData']['items'];
foreach ($items as $index => $item)
if (isset($item['options']))
$options = $this->json->unserialize($item['options']);
foreach ($options as $key => $option)
if (isset($option['full_view']))
$options[$key]['full_view'] = html_entity_decode($option['full_view']);
$item['options'] = $this->json->serialize($options);
$result['totalsData']['items'][$index] = $item;
return $result;
OR
Add following code in di.xml
<type name="MagentoQuoteModelCartCartTotalRepository">
<plugin name="checkout_item_sidebar"
type="SRMagentoCommunityPluginQuoteModelCartCartTotalRepository" sortOrder="1"/>
</type>
app/code/SR/MagentoCommunity/Plugin/Quote/Model/Cart/CartTotalRepository.php
<?php
namespace SRMagentoCommunityPluginQuoteModelCart;
use MagentoFrameworkSerializeSerializerJson;
class CartTotalRepository
/**
* @var Json
*/
private $json;
/**
* DefaultConfigProvider constructor.
* @param Json $json
*/
public function __construct(
Json $json
)
$this->json = $json;
public function afterGet(
MagentoQuoteModelCartCartTotalRepository $subject,
$quoteTotals
)
$quoteItems = $quoteTotals->getItems();
$items = [];
/** @var MagentoQuoteModelCartTotalsItem $item */
foreach ($quoteItems as $index => $item)
if ($options = $item->getOptions())
$options = $this->json->unserialize($options);
foreach ($options as $key => $option)
if (isset($option['full_view']))
$options[$key]['full_view'] = html_entity_decode($option['full_view']);
$item->setOptions($this->json->serialize($options));
$items[$index] = $item;
$quoteTotals->setItems($items);
return $quoteTotals;
Now it's working on minicart, but still not working checkout page.
– Rishabh Shukla
May 28 at 19:34
Your question is about minicart, why you test in checkout page. For other page like checkout, cart page etc you need to do same things.
– Sohel Rana
May 28 at 21:49
Please mention checkout page method for plugin.
– Rishabh Shukla
May 29 at 5:47
Check updated answer
– Sohel Rana
May 29 at 7:36
Is it working for you? If yes, accept this answer that will help other.
– Sohel Rana
May 30 at 6:35
add a comment |
Try following way:
app/code/SR/MagentoCommunity/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="MagentoCheckoutCustomerDataDefaultItem">
<plugin name="sr_DefaultItem"
type="SRMagentoCommunityPluginCheckoutCustomerDataDefaultItem" sortOrder="1"/>
</type>
</config>
app/code/SR/MagentoCommunity/Plugin/Checkout/CustomerData/DefaultItem.php
<?php
namespace SRMagentoCommunityPluginCheckoutCustomerData;
class DefaultItem
public function afterGetItemData(
MagentoCheckoutCustomerDataDefaultItem $subject,
$item
)
if (isset($item['options']))
$options = $item['options'];
foreach ($options as $key => $option)
$item['options'][$key]['value'] = html_entity_decode($option['value']);
return $item;
Overwrite following template for change render type:
vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
Now modify
<span data-bind="text: option.value"></span>
to
<span data-bind="html: option.value"></span>
Output:
[Update]
Add following code in di.xml
<type name="MagentoCheckoutModelDefaultConfigProvider">
<plugin name="st_config_provider"
type="SRMagentoCommunityPluginCheckoutModelDefaultConfigProvider" sortOrder="1"/>
</type>
app/code/SR/MagentoCommunity/Plugin/Checkout/Model/DefaultConfigProvider.php
<?php
namespace SRMagentoCommunityPluginCheckoutModel;
use MagentoFrameworkSerializeSerializerJson;
class DefaultConfigProvider
/**
* @var Json
*/
private $json;
/**
* DefaultConfigProvider constructor.
* @param Json $json
*/
public function __construct(
Json $json
)
$this->json = $json;
public function afterGetConfig(
MagentoCheckoutModelDefaultConfigProvider $subject,
array $result
)
$items = $result['totalsData']['items'];
foreach ($items as $index => $item)
if (isset($item['options']))
$options = $this->json->unserialize($item['options']);
foreach ($options as $key => $option)
if (isset($option['full_view']))
$options[$key]['full_view'] = html_entity_decode($option['full_view']);
$item['options'] = $this->json->serialize($options);
$result['totalsData']['items'][$index] = $item;
return $result;
OR
Add following code in di.xml
<type name="MagentoQuoteModelCartCartTotalRepository">
<plugin name="checkout_item_sidebar"
type="SRMagentoCommunityPluginQuoteModelCartCartTotalRepository" sortOrder="1"/>
</type>
app/code/SR/MagentoCommunity/Plugin/Quote/Model/Cart/CartTotalRepository.php
<?php
namespace SRMagentoCommunityPluginQuoteModelCart;
use MagentoFrameworkSerializeSerializerJson;
class CartTotalRepository
/**
* @var Json
*/
private $json;
/**
* DefaultConfigProvider constructor.
* @param Json $json
*/
public function __construct(
Json $json
)
$this->json = $json;
public function afterGet(
MagentoQuoteModelCartCartTotalRepository $subject,
$quoteTotals
)
$quoteItems = $quoteTotals->getItems();
$items = [];
/** @var MagentoQuoteModelCartTotalsItem $item */
foreach ($quoteItems as $index => $item)
if ($options = $item->getOptions())
$options = $this->json->unserialize($options);
foreach ($options as $key => $option)
if (isset($option['full_view']))
$options[$key]['full_view'] = html_entity_decode($option['full_view']);
$item->setOptions($this->json->serialize($options));
$items[$index] = $item;
$quoteTotals->setItems($items);
return $quoteTotals;
Now it's working on minicart, but still not working checkout page.
– Rishabh Shukla
May 28 at 19:34
Your question is about minicart, why you test in checkout page. For other page like checkout, cart page etc you need to do same things.
– Sohel Rana
May 28 at 21:49
Please mention checkout page method for plugin.
– Rishabh Shukla
May 29 at 5:47
Check updated answer
– Sohel Rana
May 29 at 7:36
Is it working for you? If yes, accept this answer that will help other.
– Sohel Rana
May 30 at 6:35
add a comment |
Try following way:
app/code/SR/MagentoCommunity/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="MagentoCheckoutCustomerDataDefaultItem">
<plugin name="sr_DefaultItem"
type="SRMagentoCommunityPluginCheckoutCustomerDataDefaultItem" sortOrder="1"/>
</type>
</config>
app/code/SR/MagentoCommunity/Plugin/Checkout/CustomerData/DefaultItem.php
<?php
namespace SRMagentoCommunityPluginCheckoutCustomerData;
class DefaultItem
public function afterGetItemData(
MagentoCheckoutCustomerDataDefaultItem $subject,
$item
)
if (isset($item['options']))
$options = $item['options'];
foreach ($options as $key => $option)
$item['options'][$key]['value'] = html_entity_decode($option['value']);
return $item;
Overwrite following template for change render type:
vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
Now modify
<span data-bind="text: option.value"></span>
to
<span data-bind="html: option.value"></span>
Output:
[Update]
Add following code in di.xml
<type name="MagentoCheckoutModelDefaultConfigProvider">
<plugin name="st_config_provider"
type="SRMagentoCommunityPluginCheckoutModelDefaultConfigProvider" sortOrder="1"/>
</type>
app/code/SR/MagentoCommunity/Plugin/Checkout/Model/DefaultConfigProvider.php
<?php
namespace SRMagentoCommunityPluginCheckoutModel;
use MagentoFrameworkSerializeSerializerJson;
class DefaultConfigProvider
/**
* @var Json
*/
private $json;
/**
* DefaultConfigProvider constructor.
* @param Json $json
*/
public function __construct(
Json $json
)
$this->json = $json;
public function afterGetConfig(
MagentoCheckoutModelDefaultConfigProvider $subject,
array $result
)
$items = $result['totalsData']['items'];
foreach ($items as $index => $item)
if (isset($item['options']))
$options = $this->json->unserialize($item['options']);
foreach ($options as $key => $option)
if (isset($option['full_view']))
$options[$key]['full_view'] = html_entity_decode($option['full_view']);
$item['options'] = $this->json->serialize($options);
$result['totalsData']['items'][$index] = $item;
return $result;
OR
Add following code in di.xml
<type name="MagentoQuoteModelCartCartTotalRepository">
<plugin name="checkout_item_sidebar"
type="SRMagentoCommunityPluginQuoteModelCartCartTotalRepository" sortOrder="1"/>
</type>
app/code/SR/MagentoCommunity/Plugin/Quote/Model/Cart/CartTotalRepository.php
<?php
namespace SRMagentoCommunityPluginQuoteModelCart;
use MagentoFrameworkSerializeSerializerJson;
class CartTotalRepository
/**
* @var Json
*/
private $json;
/**
* DefaultConfigProvider constructor.
* @param Json $json
*/
public function __construct(
Json $json
)
$this->json = $json;
public function afterGet(
MagentoQuoteModelCartCartTotalRepository $subject,
$quoteTotals
)
$quoteItems = $quoteTotals->getItems();
$items = [];
/** @var MagentoQuoteModelCartTotalsItem $item */
foreach ($quoteItems as $index => $item)
if ($options = $item->getOptions())
$options = $this->json->unserialize($options);
foreach ($options as $key => $option)
if (isset($option['full_view']))
$options[$key]['full_view'] = html_entity_decode($option['full_view']);
$item->setOptions($this->json->serialize($options));
$items[$index] = $item;
$quoteTotals->setItems($items);
return $quoteTotals;
Try following way:
app/code/SR/MagentoCommunity/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="MagentoCheckoutCustomerDataDefaultItem">
<plugin name="sr_DefaultItem"
type="SRMagentoCommunityPluginCheckoutCustomerDataDefaultItem" sortOrder="1"/>
</type>
</config>
app/code/SR/MagentoCommunity/Plugin/Checkout/CustomerData/DefaultItem.php
<?php
namespace SRMagentoCommunityPluginCheckoutCustomerData;
class DefaultItem
public function afterGetItemData(
MagentoCheckoutCustomerDataDefaultItem $subject,
$item
)
if (isset($item['options']))
$options = $item['options'];
foreach ($options as $key => $option)
$item['options'][$key]['value'] = html_entity_decode($option['value']);
return $item;
Overwrite following template for change render type:
vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
Now modify
<span data-bind="text: option.value"></span>
to
<span data-bind="html: option.value"></span>
Output:
[Update]
Add following code in di.xml
<type name="MagentoCheckoutModelDefaultConfigProvider">
<plugin name="st_config_provider"
type="SRMagentoCommunityPluginCheckoutModelDefaultConfigProvider" sortOrder="1"/>
</type>
app/code/SR/MagentoCommunity/Plugin/Checkout/Model/DefaultConfigProvider.php
<?php
namespace SRMagentoCommunityPluginCheckoutModel;
use MagentoFrameworkSerializeSerializerJson;
class DefaultConfigProvider
/**
* @var Json
*/
private $json;
/**
* DefaultConfigProvider constructor.
* @param Json $json
*/
public function __construct(
Json $json
)
$this->json = $json;
public function afterGetConfig(
MagentoCheckoutModelDefaultConfigProvider $subject,
array $result
)
$items = $result['totalsData']['items'];
foreach ($items as $index => $item)
if (isset($item['options']))
$options = $this->json->unserialize($item['options']);
foreach ($options as $key => $option)
if (isset($option['full_view']))
$options[$key]['full_view'] = html_entity_decode($option['full_view']);
$item['options'] = $this->json->serialize($options);
$result['totalsData']['items'][$index] = $item;
return $result;
OR
Add following code in di.xml
<type name="MagentoQuoteModelCartCartTotalRepository">
<plugin name="checkout_item_sidebar"
type="SRMagentoCommunityPluginQuoteModelCartCartTotalRepository" sortOrder="1"/>
</type>
app/code/SR/MagentoCommunity/Plugin/Quote/Model/Cart/CartTotalRepository.php
<?php
namespace SRMagentoCommunityPluginQuoteModelCart;
use MagentoFrameworkSerializeSerializerJson;
class CartTotalRepository
/**
* @var Json
*/
private $json;
/**
* DefaultConfigProvider constructor.
* @param Json $json
*/
public function __construct(
Json $json
)
$this->json = $json;
public function afterGet(
MagentoQuoteModelCartCartTotalRepository $subject,
$quoteTotals
)
$quoteItems = $quoteTotals->getItems();
$items = [];
/** @var MagentoQuoteModelCartTotalsItem $item */
foreach ($quoteItems as $index => $item)
if ($options = $item->getOptions())
$options = $this->json->unserialize($options);
foreach ($options as $key => $option)
if (isset($option['full_view']))
$options[$key]['full_view'] = html_entity_decode($option['full_view']);
$item->setOptions($this->json->serialize($options));
$items[$index] = $item;
$quoteTotals->setItems($items);
return $quoteTotals;
edited May 29 at 7:48
answered May 28 at 17:14
Sohel RanaSohel Rana
24.3k34663
24.3k34663
Now it's working on minicart, but still not working checkout page.
– Rishabh Shukla
May 28 at 19:34
Your question is about minicart, why you test in checkout page. For other page like checkout, cart page etc you need to do same things.
– Sohel Rana
May 28 at 21:49
Please mention checkout page method for plugin.
– Rishabh Shukla
May 29 at 5:47
Check updated answer
– Sohel Rana
May 29 at 7:36
Is it working for you? If yes, accept this answer that will help other.
– Sohel Rana
May 30 at 6:35
add a comment |
Now it's working on minicart, but still not working checkout page.
– Rishabh Shukla
May 28 at 19:34
Your question is about minicart, why you test in checkout page. For other page like checkout, cart page etc you need to do same things.
– Sohel Rana
May 28 at 21:49
Please mention checkout page method for plugin.
– Rishabh Shukla
May 29 at 5:47
Check updated answer
– Sohel Rana
May 29 at 7:36
Is it working for you? If yes, accept this answer that will help other.
– Sohel Rana
May 30 at 6:35
Now it's working on minicart, but still not working checkout page.
– Rishabh Shukla
May 28 at 19:34
Now it's working on minicart, but still not working checkout page.
– Rishabh Shukla
May 28 at 19:34
Your question is about minicart, why you test in checkout page. For other page like checkout, cart page etc you need to do same things.
– Sohel Rana
May 28 at 21:49
Your question is about minicart, why you test in checkout page. For other page like checkout, cart page etc you need to do same things.
– Sohel Rana
May 28 at 21:49
Please mention checkout page method for plugin.
– Rishabh Shukla
May 29 at 5:47
Please mention checkout page method for plugin.
– Rishabh Shukla
May 29 at 5:47
Check updated answer
– Sohel Rana
May 29 at 7:36
Check updated answer
– Sohel Rana
May 29 at 7:36
Is it working for you? If yes, accept this answer that will help other.
– Sohel Rana
May 30 at 6:35
Is it working for you? If yes, accept this answer that will help other.
– Sohel Rana
May 30 at 6:35
add a comment |
Rishabh Shukla is a new contributor. Be nice, and check out our Code of Conduct.
Rishabh Shukla is a new contributor. Be nice, and check out our Code of Conduct.
Rishabh Shukla is a new contributor. Be nice, and check out our Code of Conduct.
Rishabh Shukla is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f276447%2fminicart-html-text-showing-raw-required-formatted-text-in-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown