如何在所有页面上添加商店名称?
How to add store name on all pages?
在 opencart 3.0.2.0 中,如何将我的商店名称添加到所有页面(产品、制造商、信息等)?
谢谢
$this->config->get('config_name')
- 店铺名称
如果您尝试将页面标题修改为如下内容:
您的商店 - 产品名称
编辑此文件:
catalog\controller\product\product.php
查找:
$this->document->setTitle($product_info['meta_title']);
替换为:
$this->document->setTitle($this->config->get('config_name') . ' - ' . $product_info['meta_title']);
您可以对其他页面执行相同的操作,例如category.php
,您需要搜索setTitle
。
在 opencart 3.0.2.0 中,如何将我的商店名称添加到所有页面(产品、制造商、信息等)?
谢谢
$this->config->get('config_name')
- 店铺名称
如果您尝试将页面标题修改为如下内容: 您的商店 - 产品名称
编辑此文件:
catalog\controller\product\product.php
查找:
$this->document->setTitle($product_info['meta_title']);
替换为:
$this->document->setTitle($this->config->get('config_name') . ' - ' . $product_info['meta_title']);
您可以对其他页面执行相同的操作,例如category.php
,您需要搜索setTitle
。