Loading... 首先自己也是刚接触,本来就是码的能力就低,基本上只有砍功能的能力,没有加的能力。 为什么选用OpenCar,因为Baidu相关网页比较多。中文阅读比较好理解,阅读也比较轻松(别提Ecshop了)。但事实特别打脸。目前遇到的两个问题,基本都是查询国外网站解决的。 #### 首先以上安装上移动`storage`目录 > 官方墙裂简易将 `storage`移动到非可访问目录下。 自动移动不过去,手动移动报错。修改Ngnix 和php.ini 跨站访问权限。具 体问题Google一下吧。有很多相关文章。 #### 分类页面input 加入购物车数量 > 修改`common.js` #### 改官网3.0版本加中午包 官网商城可能找不到中文包可以通过下面链接手动下载 <button class="btn m-b-xs btn-success btn-addon" onclick='window.open("https://cloud.guaishow.cn/Opencart/%E4%B8%AD%E6%96%87%E8%AF%AD%E8%A8%80%E5%8C%85","_blank")'><i class="glyphicon glyphicon-paperclip"></i>Opencart 3.0中文包</button> > 1. 下载语言包。下载后名称为: zh_cn.ocmod.zip >2. 登录您的网站后台,打开如下路径:extensions->installer >点击upload按钮,进行安装。 >3. 安装完毕后,访问后续路径 system->localisation->languages,点击界面右上角的新增按钮 >填写相关信息: >Language Name: 简体中文 >Code: zh-cn >Locale: zh-CN,zh-CN.UTF-8,zh-cn >Status: Enabled >Sort Order: 1 >4. 设定后台默认显示语言 >设置路径为 system -> settings -> Edit Store ->Local Tab Page > 5. 保存,安装结束。 ### 加 Export / Import插件 直接商城搜索下载就好,安装时记得申请和填写API 安装后记得添加用户组对应插件权限,后刷新缓存。 ####Opencart 去掉描述字符两个点.. `catalog/controller/product/category.php` ####在目录中显示型号 <div class="tip inlineBlock warning"> 所有改造均基于Opencart3.0.2.0 和原版主题 </div> 在这个文件中: ` catalog \ controller \ product \ category .php` 查找: ``` $data['products'][] = array( ``` 在其后添加: ``` 'model' => $result['model'], ``` 在此文件中: ` catalog \ view \ theme \ default \ template \ product \ category .twig ` 查找: ``` <h4><a href="{{ product.href }}">{{ product.name }}</a></h4> ``` 在其后添加: ``` {% if product.model is defined %}Product Code: {{ product.model }}{% endif %} ``` 刷新 #### 修改型号 SUK等为模糊搜索 > `catalog/model/catalog/product.php` <div class="hideContent">该部分仅登录用户可见</div> #### 点击主类目显示所有子类目商品 (非类目书) <div class="tip inlineBlock warning"> 只是顺便看到觉得可能有用记录一下,未试验 </div> 转到`catalog/controller/product/category.php` 找到 ``` 'filter_category_id' => $category_id, ``` 然后添加这行 ``` 'filter_sub_category' => true, ``` ####SQL删除多余国家和地区只保留中国 安装OpenCart,其中一项繁重的工作就是要把除了中国之外的其他国家和地区删除掉,地区足有数千个,国家有239个,每页显示20个,翻页也翻到吐。 <div class="tip inlineBlock error"> DELETE危险,如无把握请提前备份SQL </div> `44为中国 默认SQL编码,如有改动请自行更改` ``` DELETE FROM `oc_country` WHERE `country_id` != '44'; DELETE FROM `oc_zone` WHERE `country_id` != '44'; ``` 现在,当您访问类别名称时,它将显示所有子类别的产品 如有疑问请留言 ~~ 暂时就遇见一个问题一个需求,有改动再记录吧。(被百度引导到mycncart,装的是2.0,现在官网是3.0。诶)~~ Last modification:October 26, 2019 © Allow specification reprint Support Appreciate the author WeChat Like 0 如果觉得我的文章对你有用,请帮忙点一下上面的广告