[英]Change Setting Menu Link in the Admin Navigation menu in OpenCart 2.x
I need to change one of the links in the admin navigation menu, specifically the settings item to be transferred to the default store directly. 我需要更改管理导航菜单中的链接之一,尤其是要直接转移到默认存储的设置项。
Can anyone help ? 有人可以帮忙吗?
I found the solution.. 我找到了解决方案。
I changed the link in the admin\\controller\\template\\common\\menu 我更改了admin \\ controller \\ template \\ common \\ menu中的链接
$data['setting'] = $this->url->link('setting/setting', 'token=' . $this->session->data['token'], 'SSL');
and changed the following in the admin\\model\\template\\setting\\setting 并在admin \\ model \\ template \\ setting \\ setting中更改了以下内容
public function editStore($store_id= 0, $data) {
$this->event->trigger('pre.admin.store.edit', $data);
$this->db->query("UPDATE " . DB_PREFIX . "store SET name = '" . $this->db->escape($data['config_name']) . "', `url` = '" . $this->db->escape($data['config_url']) . "', `ssl` = '" . $this->db->escape($data['config_ssl']) . "' WHERE store_id = 0'"); // $this->db->query("UPDATE " . DB_PREFIX . "store SET name = '" . $this->db->escape($data['config_name']) . "', `url` = '" . $this->db->escape($data['config_url']) . "', `ssl` = '" . $this->db->escape($data['config_ssl']) . "' WHERE store_id = '" . (int)$store_id . "'");
$this->cache->delete('store');
$this->event->trigger('post.admin.store.edit', $store_id);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.