Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在登录选项下方的 magento 网站顶部显示日期和时间。谁能告诉我如何实现这一目标?
谢谢
您需要在 template/page/html/ 中编辑 header.phtml 文件
插入这个:
<div class="date-time"> <?php echo strftime('%c');?> </div>
以下
<?php echo $this->getChildHtml('topLinks') ?>
然后你可以在你的CSS中添加一个类日期时间并调整它的位置
寻找可以提供给 strftime 函数的不同格式,以便以不同方式获取日期时间