How to create new controller in aimoes shop

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Charles
Posts: 8
Joined: 27 Aug 2019, 05:52

How to create new controller in aimoes shop

Post by Charles » 11 Sep 2019, 12:43

Hello all,

I am using aimeos shop in typo3, I am just beginner for creating the custom plugin in aimoes. My goal is to create a new controller which can be called from the root URL. But I do not succeed in the creation of a new controller. I have searched a lot but can't get the clear definition

Example : Root_url/index.php?controller=newcontroller&action=index

Please guide me for this implementation

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: How to create new controller in aimoes shop

Post by aimeos » 11 Sep 2019, 16:29

What you want is to create a new TYPO3 extbase controller and create a plugin from that.
That's a bit difficult to explain so we will show you the code in the Aimeos extension you can copy/paste/adapt from ...

1.) Implement a new Extbase controller in your own extension (keep care about the correct directories):
https://github.com/aimeos/aimeos-typo3/ ... roller.php

2.) Set up autoloading correctly:
https://github.com/aimeos/aimeos-typo3/ ... on#L34-L39

3.) Add such a block to your ext_localconf.php to register your Extbase controller:
https://github.com/aimeos/aimeos-typo3/ ... hp#L47-L52
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply