4

I have set logo in header but it is showing in all pages except checkout page.Please tell how to set it.enter image description here

3
  • Somehow this is default practice now. I guess it has to do with removing clutter on the checkout pages. Dec 2 '16 at 7:49
  • check my updated answer Dec 2 '16 at 8:00
  • have you get solution? Dec 9 '16 at 10:00
7

Override checkout_index_index.xml file and write below code.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" <!--here you can also use **layout="checkout"** -->xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
    <move element="logo" destination="header-wrapper"/>
  </body>
</page>

NOTE: in Magento 2.1 one extra layout is available for checkout layout="checkout".

or if you want to remove extra sign in link from checkout page you can use below code in same file checout_index_index.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" <!--here you can also use **layout="checkout"** -->xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <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="authentication" xsi:type="array">
                                <item name="config" xsi:type="array">
                                    <item name="componentDisabled" xsi:type="boolean">true</item>
                                </item>
                            </item>
                        </item>
                    </item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
 </page>

after that, you can see checkout something like this.

enter image description here

20
  • where is located Dec 1 '16 at 12:53
  • vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml you can override by using this path app/design/frontend/{Vendor}/{Theme}/Magento_Checkout/layout/override/theme/Magento/blank/checkout_index_index.xml Dec 1 '16 at 13:29
  • override means add folder for this path and create file to checkout_i‌​ndex_index.xml Dec 2 '16 at 4:13
  • yes, if you are using app/design path otherwise you can override in your extension. Dec 2 '16 at 4:29
  • Hello i have add but it is showing in ourshop.in/migrate/checkout/cart link meas cart page but not dispay ni chechout page Dec 2 '16 at 6:50
3

Sometime it is a generic or feel like a serious issue like in luma theme or other magento theme(s), logo is appearing in checkout page but not in our custom theme.

So the actual problem is with our customization in our custom theme.

More detail : If we see a page layout file of checkout that is vendor/magento/module-checkout/view/frontend/page_layout/checkout.xml

in that a statement is there that is <move element="logo" destination="checkout.header.wrapper"/>

and

As we know the order of merging xml files are module(s) -> parent theme -> current theme (custom theme).

so if any of our custom theme module (global handler i.e. default or checkout effected handler) override the same move statement of logo (with different destination) then chances of logo not appear in checkout is 99%.

If logo appear after customization in checkout then no issue.

else need to create a file if not exist in your custom theme app/design/frontend/[NAMESPACE]/[THEME]/Magento_Checkout/layout/checkout_cart_index.xml

and add the line (copy the line from checkout page layout) that is <move element="logo" destination="checkout.header.wrapper"/>

best place to added this move statement before body close tag to avoid override issue in same file :).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.