Page 1 of 1

4.1.0.0 ROUTING

Posted: Wed Jan 29, 2025 10:26 pm
by D3MO
Can someone share some light:)

My custom file is under: ROOT\extension\modulename\catalog\controller\account\file.php



takes me to page not found:

namespace

namespace Opencart\Catalog\Controller\Extension\Modulename\Account;



tried various routes:

4.1.0.0/index.php?route=extension/modulename/controller/account/file&language=en-gb&customer_token=bedc531298401681f32115c34e
4.1.0.0/index.php?route=extension/modulename/account/file&language=en-gb&customer_token=bedc531298401681f32115c34e

nothing works

Re: 4.1.0.0 ROUTING

Posted: Thu Jan 30, 2025 12:10 am
by JNeuhoff
D3MO wrote:
Wed Jan 29, 2025 10:26 pm
Can someone share some light:)

My custom file is under: ROOT\extension\modulename\catalog\controller\account\file.php



takes me to page not found:

namespace

namespace Opencart\Catalog\Controller\Extension\Modulename\Account;



tried various routes:

4.1.0.0/index.php?route=extension/modulename/controller/account/file&language=en-gb&customer_token=bedc531298401681f32115c34e
4.1.0.0/index.php?route=extension/modulename/account/file&language=en-gb&customer_token=bedc531298401681f32115c34e

nothing works
Assuming your extension name is modulename then the namespace would probably be this one:

namespace Opencart\Catalog\Controller\Extension\modulename\Account;

and the URL would be this:

whatever/index.php?route=extension/modulename/account/file&language=en-gb&customer_token=bedc531298401681f32115c34e

Have you made sure that your file.php contains a function index( ) ?

Re: 4.1.0.0 ROUTING

Posted: Thu Jan 30, 2025 12:34 am
by D3MO
Found it. what was wrong and not a namespace. opencart needs a good howto. as now we will be tracking what and where must be added

Re: 4.1.0.0 ROUTING

Posted: Thu Jan 30, 2025 12:46 am
by JNeuhoff
So what did you find? Could you share your solution here so others can benefit from it, too, on this forum?