How to overwrite templates

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!
Shopmister
Posts: 92
Joined: 15 Jan 2021, 11:02

How to overwrite templates

Post by Shopmister » 19 Feb 2021, 09:15

TYPO3 Version
TYPO3 Version
10.4.12
Webserver
Apache
PHP Version
7.3.19-1~deb10u1
Database (Default)
MySQL 5.5.5-10.3.27-MariaDB-0+deb10u1
Application Context
Production
Operating System
Linux 4.19.0-9-amd64

Good morning,
my question is, how i can overwrite templates in aimeos. Because the paths of files are for me very complicated. Normal extensions in tpo3 have a Recourses, an COnfigurations and an Classesfolder. And nromal i would overwrite the templates only with my own extensions from the Resources/Private/Extensions/AImeos...folder. But i see in Aimeos are the files not in these folders and i see so much php. Im write with php and html are together in the files??
How can i overwrote the template Files, and wich are the template files ^^?
ANd with wich typoscriptcode?
I Did read some doku for that. But i dont understood.
I hope you know what i want to say.

Ps. Maybe you have an doku about the structure of the Aimeos Extension
Ps.2 : Can i set Typopscript Configurations in my own Extension too, without place it in the TEmplate/ Setup[config] in Backend?

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

Re: How to overwrite templates

Post by aimeos » 22 Feb 2021, 14:17

Overwriting templates is explained here:
https://aimeos.org/docs/latest/frontend ... templates/

You don't need any additional configuration.
Shopmister wrote: 19 Feb 2021, 09:15 Ps.2 : Can i set Typopscript Configurations in my own Extension too, without place it in the TEmplate/ Setup[config] in Backend?
Yes, sure. That's a standard TYPO3 feature and you can use it in your own Aimeos TYPO3 extenstion too.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Shopmister
Posts: 92
Joined: 15 Jan 2021, 11:02

Re: How to overwrite templates

Post by Shopmister » 23 Feb 2021, 07:10

Yes, sure. That's a standard TYPO3 feature and you can use it in your own Aimeos TYPO3 extenstion too.
AH good! i think i tested it then with false configurations. was maybe the reason why it didnt worked
Overwriting templates is explained here:
https://aimeos.org/docs/latest/frontend ... templates/

You don't need any additional configuration.
1) Do i understand right. The srcfolders are the folders where the things in to change for overwrite? If i change things in the srcfolderfiles it overwrite the templates?

2) Fluid templates working too, i did read. And i can delete from the overwriting files the phplines? And the sysetm use then, the php from standard and the html/fluid from the srcfolders?

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

Re: How to overwrite templates

Post by aimeos » 24 Feb 2021, 08:21

Shopmister wrote: 23 Feb 2021, 07:10 1) Do i understand right. The srcfolders are the folders where the things in to change for overwrite? If i change things in the srcfolderfiles it overwrite the templates?
Copy the template you want to overwrite into the
./typo3conf/ext/<yourext>/Resources/Private/Extensions/<yourext>/client/html/templates/
e.g.:
./typo3conf/ext/<yourext>/Resources/Private/Extensions/<yourext>/client/html/templates/catalog/detail/body-standard.php

This file will be used instead of the original one.
Shopmister wrote: 23 Feb 2021, 07:10 2) Fluid templates working too, i did read. And i can delete from the overwriting files the phplines? And the sysetm use then, the php from standard and the html/fluid from the srcfolders?
It does also work with Fluid files in the same directory named e.g. catalog/detail/body-standard.html. The problem with Fluid is that you need VHS too to call methods like getRefItems() on the objects. Fluid is more complicated an we don't recommend it to beginners.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Shopmister
Posts: 92
Joined: 15 Jan 2021, 11:02

Re: How to overwrite templates

Post by Shopmister » 24 Feb 2021, 09:28

It does also work with Fluid files in the same directory named e.g. catalog/detail/body-standard.html. The problem with Fluid is that you need VHS too to call methods like getRefItems() on the objects. Fluid is more complicated an we don't recommend it to beginners.
Okay, thanks i dont will use fluid ^^. But that means too, its not possible to delete php from the overwriting files and use only html without fluid?

Copy the template you want to overwrite into the
./typo3conf/ext/<yourext>/Resources/Private/Extensions/<yourext>/client/html/templates/
e.g.:
./typo3conf/ext/<yourext>/Resources/Private/Extensions/<yourext>/client/html/templates/catalog/detail/body-standard.php

This file will be used instead of the original one.
Sorry, but i did this way exactly, but it dont worked. Normally by other Extensions i have to tell typo3 that there is the extension overwriting. I really only need to copy these files to the path you told? I dont need to tell typo3 with something like that:
plugin.aimneos.templateFile = .....myextension/....
??

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

Re: How to overwrite templates

Post by aimeos » 26 Feb 2021, 07:33

No for both questions
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Shopmister
Posts: 92
Joined: 15 Jan 2021, 11:02

Re: How to overwrite templates

Post by Shopmister » 05 Mar 2021, 11:31

I cant find any solution for that problem. i tryed in Distrubitioninstallation and Manual.

If i not said. My installation is a symlinkinstallation if its importand...


Ps. i deleted reviewpart in template and pasted many ptags with text to test. Maybe you can attach me maybe a templatefile with changing, that i know the change have to work and can paste it to test?

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

Re: How to overwrite templates

Post by aimeos » 07 Mar 2021, 09:54

Please post your modified file and the full path where you've stored it.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Shopmister
Posts: 92
Joined: 15 Jan 2021, 11:02

Re: How to overwrite templates

Post by Shopmister » 07 Mar 2021, 13:14

Please post your modified file and the full path where you've stored it.
typo3conf/ext/ground/Resources/Private/Extensions/aimeos/client/html/templates/catalog/detail/body-standard.php
body-standard.rar
(4.26 KiB) Downloaded 143 times
i only did an ptag inside with text in the file. That:
<p>Das ist ein Beispielloser Beispieltext </p>

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

Re: How to overwrite templates

Post by aimeos » 08 Mar 2021, 09:35

Did you rename the TYPO3 extension for some reason? Please use the Aimeos extension generator to create an extension with an unique name and don't rename any files or folders within afterwards.
https://aimeos.org/extensions
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply