O
O
on_click2019-04-02 13:22:10
opencart
on_click, 2019-04-02 13:22:10

How to output your opencart module to a separate url?

Greetings!
Wrote my module for opencart 2.3 extension/module/ergo
Everything works, the controller in the index returns

return $this->load->view('extension/module/ergo/frontpage', $data);
And I attach them to standard pages through schemes.
I need to separate the views for the product page and the main page of the module (and, accordingly, display the module on a separate url)
At /index.php?route=extension/module/ergo/ - 404 error
Tried to understand how this done in the articles, but nothing came out in the manuals, everything is output as I am now, please tell me where to dig

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zoozag, 2019-04-02
@on_click

In a nutshell: modules return 404 when the method has parameters.

I
Igor Vorotnev, 2017-01-19
@HeadOnFire

Rewrite API
And a couple of tutorials to help:
https://carlalexander.ca/wordpress-adventurous-rew...
https://www.pmg.com/blog/a-mostly-complete-guide-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question