Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
378564fa
Commit
378564fa
authored
Sep 19, 2022
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化首页币种模板
parent
a2b45967
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
app/design/frontend/Joshine/breeze/Magento_Directory/templates/currency.phtml
+46
-0
No files found.
app/design/frontend/Joshine/breeze/Magento_Directory/templates/currency.phtml
0 → 100644
View file @
378564fa
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* Currency switcher
*
* @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
()
:
''
?>
<?php
$objectManager
=
\Magento\Framework\App\ObjectManager
::
getInstance
();
// Instance of Object Manager
$currencyModel
=
$objectManager
->
create
(
'Magento\Directory\Model\Currency'
);
// Instance of Currency Model
?>
<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
)
?>
/
<?=
$currencyModel
->
load
(
$currentCurrencyCode
)
->
getCurrencySymbol
();
?>
</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
)
?>
/
<?=
$currencyModel
->
load
(
$_code
)
->
getCurrencySymbol
();
?>
</a>
</li>
<?php
endif
;
?>
<?php
endforeach
;
?>
</ul>
</div>
</div>
<?php
endif
;
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment