Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/Magento_Directory/templates/currency.phtml b/Magento_Directory/templates/currency.phtml
- new file mode 100644
- index 0000000..431cb0e
- --- /dev/null
- +++ b/Magento_Directory/templates/currency.phtml
- @@ -0,0 +1,29 @@
- +<?php /* @var \Magento\Directory\Block\Currency $block */ ?>
- +<?php if ($block->getCurrencyCount() > 1): ?>
- +<?php $currencies = $block->getCurrencies(); ?>
- +<?php $currentCurrencyCode = $block->getCurrentCurrencyCode(); ?>
- +<?php $id = $block->getIdModifier() ? '-' . $block->getIdModifier() : '' ?>
- +<div class="switcher currency switcher-currency" id="switcher-currency<?= $block->escapeHtmlAttr($id) ?>">
- + <strong class="label switcher-label"><span><?= $block->escapeHtml(__('Currency')) ?></span></strong>
- + <div class="actions dropdown options switcher-options">
- + <div class="action toggle switcher-trigger"
- + id="switcher-currency-trigger<?= $block->escapeHtmlAttr($id) ?>"
- + data-mage-init='{"dropdown":{}}'
- + data-toggle="dropdown"
- + data-trigger-keypress-button="true">
- + <strong class="language-<?= $block->escapeHtml($block->getCurrentCurrencyCode()) ?>">
- + <span><?= $block->escapeHtml($currentCurrencyCode) ?></span>
- + </strong>
- + </div>
- + <ul class="dropdown switcher-dropdown" data-target="dropdown">
- + <?php foreach ($currencies as $_code => $_name): ?>
- + <?php if ($_code != $currentCurrencyCode): ?>
- + <li class="currency-<?= $block->escapeHtmlAttr($_code) ?> switcher-option">
- + <a href="#" data-post='<?= /* @noEscape */ $block->getSwitchCurrencyPostData($_code) ?>'><?= $block->escapeHtml($_code) ?> - <?= $block->escapeHtml($_name) ?></a>
- + </li>
- + <?php endif; ?>
- + <?php endforeach; ?>
- + </ul>
- + </div>
- +</div>
- +<?php endif; ?>
- diff --git a/Magento_Theme/layout/default.xml b/Magento_Theme/layout/default.xml
- index b035d55..f5e032c 100644
- --- a/Magento_Theme/layout/default.xml
- +++ b/Magento_Theme/layout/default.xml
- @@ -27,6 +27,7 @@
- </referenceContainer>
- <move element="minicart" destination="header-content-right" />
- + <move element="currency" destination="header-content-right" before="-" />
- <move element="store_language" destination="header-wrapper" before="logo" />
- <move element="store_switcher" destination="footer-toolbar-bottom" before="-" />
- <move element="navigation.sections" destination="header.container"/>
- diff --git a/web/css/source/argento_theme/layout/_header.less b/web/css/source/argento_theme/layout/_header.less
- index f3f4892..b27e1b0 100644
- --- a/web/css/source/argento_theme/layout/_header.less
- +++ b/web/css/source/argento_theme/layout/_header.less
- @@ -38,7 +38,8 @@
- .wishlist,
- .customer-dropdown,
- - .customer.switcher {
- + .customer.switcher,
- + .currency.switcher {
- display: none;
- }
- }
- @@ -195,6 +196,10 @@
- .header-content-right {
- .right(25px);
- + .currency.switcher {
- + display: block;
- + }
- +
- .customer.switcher {
- display: block;
- .margin-left(0);
- diff --git a/web/css/source/argento_theme/pages/_home.less b/web/css/source/argento_theme/pages/_home.less
- index 34a176f..839786c 100644
- --- a/web/css/source/argento_theme/pages/_home.less
- +++ b/web/css/source/argento_theme/pages/_home.less
- @@ -258,8 +258,11 @@
- background: transparent;
- }
- - .switcher-language .switcher-trigger {
- - color: #fff;
- + .switcher-language,
- + .switcher-currency {
- + .switcher-trigger {
- + color: #fff;
- + }
- }
- .block-search.folded .action.search {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement