Skip to content

Unable to add custom item renderer for mini-cart #5965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MagePsycho opened this issue Aug 3, 2016 · 1 comment
Closed

Unable to add custom item renderer for mini-cart #5965

MagePsycho opened this issue Aug 3, 2016 · 1 comment

Comments

@MagePsycho
Copy link
Contributor

Unable to add custom renderer for mini-cart.
File: app/code/MagePsycho/Test/view/frontend/layout/checkout_cart_sidebar_item_renderers.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="minicart">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="minicart_content" xsi:type="array">
                            <item name="config" xsi:type="array">
                                <item name="itemRenderer" xsi:type="array">
                                    <item name="free_gift" xsi:type="string">testRenderer</item>
                                </item>
                            </item>
                            <item name="children" xsi:type="array">
                                <item name="item.renderer" xsi:type="array">
                                    <item name="config" xsi:type="array">
                                        <item name="displayArea" xsi:type="string">testRenderer</item>
                                        <item name="template" xsi:type="string">MagePsycho_Test/minicart/item/free</item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

On inspection, I saw that custom renderer got added to the itemRenderer list. But not the item.renderer > displayArea

is there any limitation with custom renderer for mini-cart?
Note: Custom item renderer works fine for Cart page though.

@veloraven
Copy link
Contributor

@MagePsycho
I'm closing this issue as the GitHub issue tracker is intended for technical issues only.
Please refer to the Community Forums or the Magento Stack Exchange site for technical questions.
If you think it to be an issue than please create new GitHub report following the Issue reporting guidelines: with steps to reproduce, actual result and expected result. Please, also identify which version of Magento you are running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants