Jump to content

Prestashop 1.7.5 Custom module doesn't show up in list


Recommended Posts

Hello,

I'm following the module creation doc from prestashop guide ( this one )

I've done the first step (adding the very basic content of the main class) But when the guide say "you know can see it in the module page in your back office", it doesn't show up in the list.

Here's my class 

 

<?php

if (!defined('_PS_VERSION_')) {
    exit;
}

class infinitescroll extends Module {
    public function __construct() {
        $this->name = 'infinitescroll';
        $this->tab = 'front_office_features';
        $this->version = '1.0.0';
        $this->author = 'Vico motor';
        $this->need_instance = 0;
        $this->ps_versions_compliancy = ['min' => '1.5' , 'max' => '1.8'];
        $this->bootstrap = true;
        
        parent::__construct();
        
        $this->displayName = $this->l('Infinite Scroll');
        $this->description = $this->l('random words');
        
        $this->confirmUninstall = $this->l('delete?');
        
        if(!Configuration::get('INFINITESCROLL_NAME')) {
            $this->warning = $this->l('no name');
        }
        
    }

 

Link to comment
Share on other sites

I only get this error

 

Translation not found.
[▼
  "id" => "Administration"
  "domain" => "AdminModulesFeature"
  "locale" => "fr-FR"
]

and 

Matched route "admin_module_manage".

[▼
  "route" => "admin_module_manage"
  "route_parameters" => [▼
    "category" => null
    "keyword" => null
    "_controller" => "PrestaShopBundle\Controller\Admin\Improve\ModuleController::manageAction"
    "_legacy_controller" => "AdminModulesManage"
    "_legacy_link" => [▼
      "AdminModulesManage"
      "AdminModulesSf"
    ]
    "_route" => "admin_module_manage"
  ]
  "request_uri" => "my_url/admin/index.php/improve/modules/manage?_token=95Eszc01qKnjQDD01tOw0bCrB_471mL8-201r-PkPSI"
  "method" => "GET"
]

This one is not an error, it says "Infos"

Edited by Vico_b (see edit history)
Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

In your infinitescroll.php file you set the tab attribute - section that shall contain the module in PrestaShop’s back office modules list: 

$this->tab = 'front_office_features';

but your module appears in Other category.

I also build my custom module (a payment module) and I want it to appear in Payment category but despite my settings $this->tab = 'payments_gateways'; the module is listed also in Other category. In fact it doesn't matter what you put on tab attribute, the module is always listed in Other category. Why?

Edited by ionut71 (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 8 months later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...