0

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

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'); ?>
  • hi, in which path template file currency.phtml to be included? – jafar pinjar Jun 11 '18 at 6:30

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.