0

magento2 while overriding class using preference, its not working in Enterprise Edition 2.3.5

In checkout_cart_index.xml

<referenceBlock name="checkout.cart.crosssell">
            <action method='setCustomTemplate'>
            </action>
            <arguments>
                <argument name="type" xsi:type="string">crosssell</argument>
                <argument name="group_name" xsi:type="string">native</argument>
            </arguments>
            <block class="Magento\Framework\View\Element\RendererList" name="category.product.type.details.renderers.native" as="details.renderers">
                <block class="Magento\Framework\View\Element\Template" as="default"/>
                <block class="Magento\Swatches\Block\Product\Renderer\Listing\Configurable" as="configurable" template="Vendor_Module::checkout/cart/product/native.phtml" >
                    <arguments>
                        <argument name="type" xsi:type="string">shoppingcart-native</argument>
                    </arguments>
                </block>
            </block>
        </referenceBlock>

In frontend/di.xml

<preference for="Magento\Checkout\Block\Cart\Crosssell" type="Vendor\Module\Block\Checkout\Cart\NativeBlock" />
  • Show your code. – Sohel Rana Jun 5 at 14:17
  • Please check updated question – Zarna Parekh Jun 5 at 14:28

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.