cancel
Showing results for 
Search instead for 
Did you mean: 

trouble moving search and minicart to header panel

Re: trouble moving search and minicart to header panel

I am using a theme by HiddenTechies called Apparel Pro (https://www.hiddentechies.com/apparel-pro-responsive-theme-magento-2.html)

 

Changed to destination="page.top" and now those elements are at least appearing--thanks (see screenshot below). I think I need to determine the correct name to use for destination to get them in the top part of the header (the yellow part). How do I do that?

 

pl-screenshot-2.png

Re: trouble moving search and minicart to header panel

@ed_geis 

Can you inspect and check in  structure what you seen as in default it shown like so what you seen in your Capture.PNG

Re: trouble moving search and minicart to header panel

Your image isn't displaying, but I inspected the page in my browser and I can see that that part of the header is contained within <div class="panel header"> but not sure how this translates to what I should use in default.xml.

 

Here's a screenshot of what I'm seeing (you can inspect the page directly at https://dev.peruvianlink.com).

 

inspect.png

Re: trouble moving search and minicart to header panel

@ed_geis 

as you use  header.panel.wrapper as destination and check it work or not.

Re: trouble moving search and minicart to header panel

No, that's not it either.

Where can I go to determine the name of that header location? Is that in one of the templates?

I found the header.phtml in the original theme:

<?php
$themeHelper = $this->helper('Hiddentechies\Hiddentheme058\Helper\Data');
$headerStaticBlock = $themeHelper->getConfigValue('hiddentheme058/header_settings/header_static_block');
$headerStaticBlock = $themeHelper->getConfigValue('hiddentheme058/header_settings/header_static_block');
?>
<?php echo $this->getChildHtml("top.promotion"); ?>
<header class="page-header header-type1">
<div class="panel wrapper">
<div class="panel header">
<?php echo $this->getChildHtml("header.links"); ?>
<?php echo $this->getChildHtml("skip_to_content"); ?>
<?php echo $this->getChildHtml("currency"); ?>
<?php echo $this->getChildHtml("store_language"); ?>
</div>
</div>
<div class="header content">
<div class="header-logo">
<?php echo $this->getChildHtml("logo"); ?>
</div>
<?php echo $this->getChildHtml("minicart"); ?>
<?php
if ($headerStaticBlock != '') {
echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($headerStaticBlock)->toHtml();
}
?>
<?php echo $this->getChildHtml("top.search"); ?>
</div>
<?php echo $this->getChildHtml("navigation.sections"); ?>
</header>

Re: trouble moving search and minicart to header panel

Hi @ed_geis 
you can override this in your theme and move the 

<div class="panel wrapper">
<div class="panel header">
<?php echo $this->getChildHtml("header.links"); ?>
<?php echo $this->getChildHtml("skip_to_content"); ?>
<?php echo $this->getChildHtml("currency"); ?>
<?php echo $this->getChildHtml("store_language"); ?>

<?php echo $this->getChildHtml("top.search"); ?>

<?php echo $this->getChildHtml("minicart"); ?>

</div>
</div>

i hope this work for you

Re: trouble moving search and minicart to header panel

OK--so do I just copy header.phtml to my child theme folder using the same path, and then edit header phtml in that location?

 

Thanks much.

Re: trouble moving search and minicart to header panel

@ed_geis 
on your child theme

Re: trouble moving search and minicart to header panel

Getting closer. I did as you suggested, and have the minicart appearing correctly, but the search box is nowhere to be found.

 

Does it need to be in some special container?

Re: trouble moving search and minicart to header panel

@ed_geis 
<?= $block->getChildHtml('topSearch'); ?>

try it i hope it will work for you.