您好,我想在opencart中更改博客的网址。但是面临问题 我点击了此链接,它的网址做得很好,但网址未显示。 https://forum.opencart.com/viewtopic.php?t=186506 我更新了catalog / controller / startup / seo_uls.php文件,相应地添加了这一行
($data['route'] == 'extension/extension/blog/article' && $key == 'article_id'))
我在管理面板>设计> SEO URL中更改了Seo Url “ article_id = 1”到“不同” 在我的博客列表页面上,链接URL自动更改为/ different,但显示的页面未找到。
SEO网址代码如下:
foreach ($data as $key => $value) {
if (isset($data['route'])) {
if (($data['route'] == 'product/product' && $key == 'product_id') || (($data['route'] == 'product/manufacturer/info' || $data['route'] == 'product/product') && $key == 'manufacturer_id') || ($data['route'] == 'information/information' && $key == 'information_id') || ($data['route'] == 'extension/extension/blog/article' && $key == 'article_id')) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "seo_url WHERE `query` = '" . $this->db->escape($key . '=' . (int)$value) . "' AND store_id = '" . (int)$this->config->get('config_store_id') . "' AND language_id = '" . (int)$this->config->get('config_language_id') . "'");