【发布时间】:2021-06-11 01:55:17
【问题描述】:
我正在尝试从 Opencart 3 Products 字段“Date_available”获取最新日期并将其发布到标题页面的最顶部。我目前正在通过在设置/存储页面中手动添加日期来完成此操作,在该页面中我放置了一个链接到数据库变量的文本框 - 我使用 cotroller Settings.php 中的代码:
if (isset($this->request->post['config_updated'])) {
$data['config_updated'] = $this->request->post['config_updated'];
} else {
$data['config_updated'] = $this->config->get('config_updated');
}
以及sttings twig中的代码:
<div class="form-group">
<label class="col-sm-2 control-label" for="input-updated">{{ entry_updated }}</label>
<div class="col-sm-10">
<input type="text" name="config_updated" value="{{ config_updated}}" placeholder="{{ entry_updated}}" id="input-updated" class="form-updated" />
</div>
</div>
在这里我可以输入日期并显示为图像: enter image description here 产品最后更新时间:25/05/2020 : 21:12:32
如何在 oc_products_date_available 中找到最新日期并将其显示在上述位置?任何帮助表示赞赏。
【问题讨论】: