0

I am trying to insert the Magento 2 checkout form into another layout. I tried a few things but I think this somehow needs to be expanded:

my_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="My\Module\Block\Order\ShippingCheckoutOverview" cacheable="false" name="my_module" template="mytemplate.phtml" />
            <block class="Magento\Checkout\Block\Cart\Grid" name="checkout.cart.form" as="cart-items" template="Magento_Checkout::cart/form.phtml" after="my_module">
                <block class="Magento\Framework\View\Element\RendererList" name="checkout.cart.item.renderers" as="renderer.list"/>
                <block class="Magento\Framework\View\Element\Text\ListText" name="checkout.cart.order.actions"/>
            </block>
        </referenceContainer>
    </body>
</page>

The Error I am getting is:

1 exception(s):
Exception #0 (RuntimeException): Renderer for type "simple" does not exist.

Exception #0 (RuntimeException): Renderer for type "simple" does not exist.
<pre>#1 Magento\Checkout\Block\Cart\AbstractCart->getItemRenderer() called at [vendor/magento/module-checkout/Block/Cart/AbstractCart.php:133]
#2 Magento\Checkout\Block\Cart\AbstractCart->getItemHtml() called at [vendor/magento/module-checkout/view/frontend/templates/cart/form.phtml:42]
#3 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#4 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#5 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#6 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#7 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php:26]
#8 Magento\Framework\View\TemplateEngine\Php\Interceptor->render() called at [vendor/magento/framework/View/Element/Template.php:271]
#9 Magento\Framework\View\Element\Template->fetchView() called at [vendor/magento/framework/View/Element/Template.php:301]
#10 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1100]

Thanks for your help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.