Page 1 of 1

Settings for a new text type to output in the frontend

Posted: 08 Dec 2016, 09:07
by pixls
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

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

Posted: 08 Dec 2016, 15:20
by aimeos
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