cancel
Showing results for 
Search instead for 
Did you mean: 

add Minicart & search

SOLVED

add Minicart & search

Hi

 

I extended the luma theme default.xml:

/public_html/app/design/frontend/vendor/luma_ext/Magento_Theme/layout/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.container">
<container name="header-wrapper" label="Page Header" as="header-wrapper" htmlTag="div" htmlClass="header content">
<block class="Magento\Theme\Block\Html\Header\Logo" name="logo">
<arguments>
<argument name="logo_img_width" xsi:type="number">300</argument>
<argument name="logo_img_height" xsi:type="number">207</argument>
</arguments>
</block>
</container>
</referenceContainer>
</body>
</page>

 

But now if I change the layout on categories to my theme, the minicart and search bar disappears.

Where and how do i need to define that?

 

Thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: add Minicart &amp; search

Hi @patrick_tschumi 

 

You can manage the logo size from admin panel also.

 

Just follow the steps from below link and let me know if you stuck anywhere.

 

https://www.magestore.com/magento-2-tutorial/how-to-change-logo-in-magento-2/

 

This is the best way to do the change as in case if you have to change it in future you can easily do it from admin instead of changing it from code.

 

Thanks

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution".

View solution in original post

5 REPLIES 5

Re: add Minicart &amp; search

Hi @patrick_tschumi 

 

Can you please let me know the reason of creating a new file with this code, so that i can suggest a best way to do the changes.

 

Thanks

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution".

Re: add Minicart &amp; search

Hi @Rahul Gupta 

 

I changed the logo size.

 

Regards

Patrick

Re: add Minicart &amp; search

Hi @patrick_tschumi 

 

You can manage the logo size from admin panel also.

 

Just follow the steps from below link and let me know if you stuck anywhere.

 

https://www.magestore.com/magento-2-tutorial/how-to-change-logo-in-magento-2/

 

This is the best way to do the change as in case if you have to change it in future you can easily do it from admin instead of changing it from code.

 

Thanks

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution".

Re: add Minicart &amp; search

@Rahul Gupta  thx, for your help.

 

I did it now this way & it works!

However I had to define that on the Store View level to make it work. Before i tried that on the website level where it was not working and then came up doing that within the xml.

Re: add Minicart &amp; search

Hi @patrick_tschumi 

 

The Scope for logo is Store View.

 

As we can have different store view for a single website with unique logo on each store.

 

So we generally change it on Store View.

 

Thanks

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution".