1

I created custom header using below link. http://oxsoftwares.com/add-custom-header-in-custom-theme-magento2/

I want to add currency switcher inside the custom header, how can we call currency switcher inside custom header.

1 Answer 1

1

You need to add following code into your default.xml file.

<referenceBlock name="custom_header">
     <block class="Magento\Directory\Block\Currency" name="currency" before="-" template="currency.phtml"/>
</referenceBlock>

And add below code into your customheader.phtml

<?php echo $this->getChildHtml('currency'); ?>
1
  • hi, in which path template file currency.phtml to be included? Commented Jun 11, 2018 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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