douhuang3740 2017-08-13 15:41
浏览 134
已采纳

OpenCart 3没有显示我的模块

I'm fairly new to OpenCart but I know PHP and MVC platforms. I want to make an importer for OpenCart to import some products from a CSV and the photos for them.

However, I've been struggling for the last 2 hours trying to see my module in the admin. I created an admin/controller/module/custom_importer.php:

<?php
class ControllerModuleCustomImporter extends Controller {

}

and a language file admin/language/en-gb/module/custom_importer.php:

$_['heading_title'] = 'Custom Importer';

However, in my admin I can't seem to find the module at all. It's the simplest, emptiest module. What am I doing wrong?

Opencart: Version 3.0.2.0

  • 写回答

1条回答 默认 最新

  • doujiang2641 2017-08-13 18:19
    关注

    The path you are using is wrong. Put your file in admin/controller/extension/module/custom_importer.php. Note the class name changes in a corresponding way.

    <?php
    class ControllerExtensionModuleCustomImporter extends Controller {
    
    }
    

    The language file goes in admin/language/en-gb/extension/module/custom_importer.php.

    <?php
    $_['heading_title'] = 'Custom Importer';
    

    Now go to Extensions->Extensions and choose Modules. You will see Custom Importer.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题