Settings for a new text type to output in the frontend

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!
pixls
Posts: 26
Joined: 21 Nov 2016, 10:46

Settings for a new text type to output in the frontend

Post by pixls » 08 Dec 2016, 09:07

Hi

We have created a new text type to output in the frontend as a part of the subpart "additional". The templates which we store outside of the aimeos extension folder are read correctly. However we can't get Aimeos to read the Standard.php from outside of the extension folder. To get it to work we had to create a subfolder "OurTextType" and file Standard.php within "src/Client/Html/Catalog/Detail/Additional" in the extension folder.

We would like to also store this file outside of the extension folder. How can we get this to work?

Thanks very much, any help is greatly appreciated

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

Re: Settings for a new text type to output in the frontend

Post by aimeos » 08 Dec 2016, 15:20

You can't "overwrite" classes that way. Composer won't find the class.

Instead, you have to create a new class, e.g. "Myproject" which extends from the original class. There you can overwrite the methods you need. Afterwards, you have to add the configuration so the factory will create objects from your new class:
https://aimeos.org/docs/Configuration/C ... ional/name
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply