2

I saw several solutions but I couldn't implement them, I think I'm missing something. This method will be visible in the Magento backend and web service, not being an option visible in the cart. I tried to disable using the Photocolor / MotoBoyPk / view / frontend / layout / checkout_index_index.xml file as below, but I don't know if this is right or if something is still missing.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="shipping-step" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="motoboypk" xsi:type="array">
                                                    <item name="componentDisabled" xsi:type="boolean">true</item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>
  • you want to using css?? – Mohit Patel Jul 10 at 17:00
  • 1
    Easiest way is to create source model for that in syetem.xml and depending upon its value you can set in its custom shipping model . – Anuraag Jul 10 at 18:41
  • With css it would be more complicated. – Sérgio Mordente Jul 10 at 20:05
  • Tanmay, could you point me to an article that deals with this implementation. – Sérgio Mordente Jul 10 at 20:08

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.