Various questions - TYPO3 integration (images, links, ...)
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!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 42
- Joined: 15 Dec 2015, 20:32
Various questions - TYPO3 integration (images, links, ...)
Hi,
I am interested in the shop system to use in combination with TYPO3.
However, I have some questions - as I am a developer myself I might also integrated parts of it myself if I get enough information on how to start
1.) Can I link to internal TYPO3 pages using the link button in the RTE without having to manually input the URL?
e.g. when inserting the text it could search for internal links via regex (ViewHelper) and use it to call ContentObjectRenderer typolink.
2.) What about linkin to other articles using the RTE - also manual URL required?
3.) Can I link to existing files using TYPO3 (via file browser) and in the best case make use of TYPO3 FAL?
At least linking would be good, although TYPO3 FAL would be even better but probably way more complicated.
If the RTE linkbrowser would work that could be used here too actually and just parsing the file via another ViewHelper on rendering.
4.) Is there a central way to upload images and rename them or only via the upload part in media?
5.) Can I add youtube Videos as media (I guess I would just need to add an URL and parse it accordingly in Template rendering)?
6.) If I use the upload in admin interface can I rename those files aferwards?
7.) On rendering can I make use of TYPO3 functions to e.g. create preview images automatically?
That at least should be possible by creating a small ViewHelper that uses the default TYPO3 libraries like the Fluid ImageViewHelper.
8.) Is it possible to listen to change / delete events on products, e.g. I might - not yet sure - want to index the products into solr and use EXT:solr to implement a website search.
9.) Permissions: How do I limit which TYPO3 backend user can see / edit which aimeos settings.
I am interested in the shop system to use in combination with TYPO3.
However, I have some questions - as I am a developer myself I might also integrated parts of it myself if I get enough information on how to start

1.) Can I link to internal TYPO3 pages using the link button in the RTE without having to manually input the URL?
e.g. when inserting the text it could search for internal links via regex (ViewHelper) and use it to call ContentObjectRenderer typolink.
2.) What about linkin to other articles using the RTE - also manual URL required?
3.) Can I link to existing files using TYPO3 (via file browser) and in the best case make use of TYPO3 FAL?
At least linking would be good, although TYPO3 FAL would be even better but probably way more complicated.
If the RTE linkbrowser would work that could be used here too actually and just parsing the file via another ViewHelper on rendering.
4.) Is there a central way to upload images and rename them or only via the upload part in media?
5.) Can I add youtube Videos as media (I guess I would just need to add an URL and parse it accordingly in Template rendering)?
6.) If I use the upload in admin interface can I rename those files aferwards?
7.) On rendering can I make use of TYPO3 functions to e.g. create preview images automatically?
That at least should be possible by creating a small ViewHelper that uses the default TYPO3 libraries like the Fluid ImageViewHelper.
8.) Is it possible to listen to change / delete events on products, e.g. I might - not yet sure - want to index the products into solr and use EXT:solr to implement a website search.
9.) Permissions: How do I limit which TYPO3 backend user can see / edit which aimeos settings.
-
- Posts: 42
- Joined: 15 Dec 2015, 20:32
Re: Various questions - TYPO3 integration (images, links, ..
One solution to most issues might be to insert the products normally with TYPO3 and upon save migrate them into the aimeos product storage and then create ViewHelper for TYPO3 RTE HTML and images (that use TYPO3 core libraries)
Re: Various questions - TYPO3 integration (images, links, ..
Hi Andreas

The Aimeos TYPO3 extension is different from all other shop extensions as it's build upon the Aimeos core components, an independent PHP library which encapsulates the e-commerce functionality. The components are self-contained (e.g. they also return the generated output) but integrate into every system nicely by adapters, e.g. for generating URLs, using the user session, etc.
This has a lot of advantages like it can be integrated into every PHP application and framework to offer a full featured shop system. On the downside, the integration is not as deeply possible as a native TYPO3 can offer.

Norbert
First of all a bit background about Aimeosandreas.allacher wrote: I am interested in the shop system to use in combination with TYPO3.
However, I have some questions - as I am a developer myself I might also integrated parts of it myself if I get enough information on how to start![]()

The Aimeos TYPO3 extension is different from all other shop extensions as it's build upon the Aimeos core components, an independent PHP library which encapsulates the e-commerce functionality. The components are self-contained (e.g. they also return the generated output) but integrate into every system nicely by adapters, e.g. for generating URLs, using the user session, etc.
This has a lot of advantages like it can be integrated into every PHP application and framework to offer a full featured shop system. On the downside, the integration is not as deeply possible as a native TYPO3 can offer.
The Aimeos e-commerce components don't use the RTE and the editor don't know about Aimeos. This makes it difficult to generate links to Aimeos from the RTE (maybe this could be done by a RTE hook) and to generate links to other pages from the Aimeos admin interface. The Aimeos components utilize the "typolink" functionality for generating links but the admin interface knows nothing about the surrounding TYPO3. To achieve this, you would need a TYPO3 specific admin interface for Aimeos.andreas.allacher wrote: 1.) Can I link to internal TYPO3 pages using the link button in the RTE without having to manually input the URL?
e.g. when inserting the text it could search for internal links via regex (ViewHelper) and use it to call ContentObjectRenderer typolink.
2.) What about linkin to other articles using the RTE - also manual URL required?
For the same reason the TYPO3 file browser isn't available in the Aimeos admin interface. There's a file system layer in the current development version of Aimeos (https://github.com/aimeos/aimeos-core/t ... Filesystem) but the adapter for FAL is still missing - mainly due to the fact that FAL is almost completely undocumented I think. If you know more, feel free to write a FAL adapterandreas.allacher wrote: 3.) Can I link to existing files using TYPO3 (via file browser) and in the best case make use of TYPO3 FAL?
At least linking would be good, although TYPO3 FAL would be even better but probably way more complicated.

You can upload images via FTP or other means for sure. Then you only need to add the file references as media items to your products, which can be done e.g. via the CSV import.andreas.allacher wrote: 4.) Is there a central way to upload images and rename them or only via the upload part in media?
Yes, videos are supported in media items and can be shown in the product detail view.andreas.allacher wrote: 5.) Can I add youtube Videos as media (I guess I would just need to add an URL and parse it accordingly in Template rendering)?
You can but then you need to adapt the file references in the media items.andreas.allacher wrote: 6.) If I use the upload in admin interface can I rename those files aferwards?
The Aimeos components are not using Fluid internally because the need to be independent from a specific framework. The Aimeos template engine is based on PHP for simplicity and speed. You could add a view helper there that could do the resizing but this will slow down the first request a lot (same as for the TYPO3 counterpart).andreas.allacher wrote: 7.) On rendering can I make use of TYPO3 functions to e.g. create preview images automatically?
That at least should be possible by creating a small ViewHelper that uses the default TYPO3 libraries like the Fluid ImageViewHelper.
Yes, you can wrap a decorator around the ExtJS product manager (https://github.com/aimeos/aimeos-core/b ... andard.php) that's intercepting calls to the finish() method and push the product into Solr.andreas.allacher wrote: 8.) Is it possible to listen to change / delete events on products, e.g. I might - not yet sure - want to index the products into solr and use EXT:solr to implement a website search.
The Aimeos admin interface in the TYPO3 backend is currently all or nothing. Either backend users are allowed to modify the shop content or not. All configuration settings are done via TypoScript where you can prevent access for backend users if I remember correctly.andreas.allacher wrote: 9.) Permissions: How do I limit which TYPO3 backend user can see / edit which aimeos settings.
Norbert
-
- Posts: 42
- Joined: 15 Dec 2015, 20:32
Re: Various questions - TYPO3 integration (images, links, ..
I meant ViewHelper just generally. I know it uses PHP directly but I could still write an own class for it that behaves like a Fluid-ViewHelper, just that it is called directly 
ad 4.) So in the current aimeos Version I would be able to select existing files and can upload existing files to certain locations on the filesystem like fileadmin/products ?
Instead of uploads/... ?
Regarding FAL it acutally only stores entries in sys_file to the file and links records to it using sys_file_reference. However, in aimeos it would be enough to link to the sys_file directly (storing the UID of the sys_file) because everything else is stored in aimeos.
Media of aimeos is basically actually similiar to FAL in that regard.
ad 6.) I meant when I upload a file using the upload feature in the media items, can I rename it afterwards?
ad 9.) So I can only deny access to the admin interface completely?
This is rather important for me the rest I could do without as long as I can select files from the server for media elements.
If I create hooks or anything like it regarding RTE links and FAL I will create a PR but I am not sure I will or if when.
However, I guess the easiest solution would be to all those issues would be to let users input data using own TYPO3 tables and on save or periodically I migrate that data into aimeos?
Is there any documentation on how that data has to look like?
I guess I could base it on this extension: https://github.com/aimeos/ai-migrate-txcommerce ?

ad 4.) So in the current aimeos Version I would be able to select existing files and can upload existing files to certain locations on the filesystem like fileadmin/products ?
Instead of uploads/... ?
Regarding FAL it acutally only stores entries in sys_file to the file and links records to it using sys_file_reference. However, in aimeos it would be enough to link to the sys_file directly (storing the UID of the sys_file) because everything else is stored in aimeos.
Media of aimeos is basically actually similiar to FAL in that regard.
ad 6.) I meant when I upload a file using the upload feature in the media items, can I rename it afterwards?
ad 9.) So I can only deny access to the admin interface completely?
This is rather important for me the rest I could do without as long as I can select files from the server for media elements.
If I create hooks or anything like it regarding RTE links and FAL I will create a PR but I am not sure I will or if when.
However, I guess the easiest solution would be to all those issues would be to let users input data using own TYPO3 tables and on save or periodically I migrate that data into aimeos?
Is there any documentation on how that data has to look like?
I guess I could base it on this extension: https://github.com/aimeos/ai-migrate-txcommerce ?
Re: Various questions - TYPO3 integration (images, links, ..
Yes, that's possible. Here are the view helpers available that are already available:andreas.allacher wrote:I meant ViewHelper just generally. I know it uses PHP directly but I could still write an own class for it that behaves like a Fluid-ViewHelper, just that it is called directly
- https://github.com/aimeos/aimeos-core/t ... iew/Helper
- https://github.com/aimeos/aimeos-core/t ... iew/Helper
Yes, you can change the configuration settings for the file system path.andreas.allacher wrote:ad 4.) So in the current aimeos Version I would be able to select existing files and can upload existing files to certain locations on the filesystem like fileadmin/products ? Instead of uploads/... ?
This sounds not that complicated but for the API FAL is offering we've found no documentation.andreas.allacher wrote:Regarding FAL it acutally only stores entries in sys_file to the file and links records to it using sys_file_reference. However, in aimeos it would be enough to link to the sys_file directly (storing the UID of the sys_file) because everything else is stored in aimeos.
Like Norbert said: You have to change the URI reference in the media item afterwards (which is relative to the configured content base URL).andreas.allacher wrote:ad 6.) I meant when I upload a file using the upload feature in the media items, can I rename it afterwards?
Yep, that's correct. This will be addressed in the future for sure but not short-term.andreas.allacher wrote:ad 9.) So I can only deny access to the admin interface completely?
If that would be the solution I would rather recommend one of the TYPO3 cart extensions, which doesn't provide a full shop system but a basket and a checkout.andreas.allacher wrote:However, I guess the easiest solution would be to all those issues would be to let users input data using own TYPO3 tables and on save or periodically I migrate that data into aimeos?
There's an entity relationship model available: https://aimeos.org/docs/Developers#Libraryandreas.allacher wrote:Is there any documentation on how that data has to look like?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

-
- Posts: 42
- Joined: 15 Dec 2015, 20:32
Re: Various questions - TYPO3 integration (images, links, ..
I actually need the shop system because cart and checkout is not enough but for the backend users it would be enough to input the products with prices and images.
Therefore, I could let them input data using natve TYPO3 and then upon save in the backend it would be migrated to aimeos.
The other data it should be enough if it can be managed via Aimeos (like orders etc.) and then only users that should have access to those would get full aimeos access (or later on maybe more limited access).
EDIT: However, maybe I can just create hooks etc. for file links and page links. If so, I might create a PR later but it surely won't be this year
Therefore, I could let them input data using natve TYPO3 and then upon save in the backend it would be migrated to aimeos.
The other data it should be enough if it can be managed via Aimeos (like orders etc.) and then only users that should have access to those would get full aimeos access (or later on maybe more limited access).
EDIT: However, maybe I can just create hooks etc. for file links and page links. If so, I might create a PR later but it surely won't be this year

Last edited by andreas.allacher on 17 Dec 2015, 19:00, edited 2 times in total.
-
- Posts: 42
- Joined: 15 Dec 2015, 20:32
Re: Various questions - TYPO3 integration (images, links, ..
Regarding FAL
\TYPO3\CMS\Core\Resource\ResourceFactory
is actually the main class here and \TYPO3\CMS\Core\Resource\FileRepository (would be used to find an existing file refernce by relation)
although ResourceFactory should be enough.
e.g. using retrieveFileOrFolderObject you could retrieve a folder from website root by using 0:/<folder> and then the folder object has the addFile method.
FileReferences itself are usually added by using the DataHandler in the Backend, although it could just be done directly or as said ignored.
Details can also be found here:
https://wiki.typo3.org/File_Abstraction_Layer (see add File / add file reference)
\TYPO3\CMS\Core\Resource\ResourceFactory
is actually the main class here and \TYPO3\CMS\Core\Resource\FileRepository (would be used to find an existing file refernce by relation)
although ResourceFactory should be enough.
e.g. using retrieveFileOrFolderObject you could retrieve a folder from website root by using 0:/<folder> and then the folder object has the addFile method.
FileReferences itself are usually added by using the DataHandler in the Backend, although it could just be done directly or as said ignored.
Details can also be found here:
https://wiki.typo3.org/File_Abstraction_Layer (see add File / add file reference)
Re: Various questions - TYPO3 integration (images, links, ..
Aimeos is very flexible and no monolithic block. Instead, you can replace parts or add your own code. Other Aimeos developers already created their own admin interfaces suited for their specific needs. This should be also the best choice for your situation.andreas.allacher wrote:I actually need the shop system because cart and checkout is not enough but for the backend users it would be enough to input the products with prices and images.
Therefore, I could let them input data using natve TYPO3 and then upon save in the backend it would be migrated to aimeos.
Instead of accessing the database directly, please use the managers from the ./lib/mshoplib/ layer. They offer an abstraction from the concrete storage so it's possible to split the database or push the products into Solr/ElasticSearch without any changes required in your code. For creating and working with the objects, you need the Aimeos context object that can be created with
Code: Select all
\Aimeos\Aimeos\Base::getContext()
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

-
- Posts: 42
- Joined: 15 Dec 2015, 20:32
Re: Various questions - TYPO3 integration (images, links, ..
Yes, I think that might be indeed the best solution.
That way I have all the features backend users know from TYPO3 (and easily input products that way) and the power of aimeos for Frontend and for detailled configuration.
And if I need further options in TYPO3 directly I can always add further managers like e.g. orders (that might also be required but not at the beginning).
Thanks for letting me know regarding the objects, I prefer to use native API isntead of adding directly via database (should also be easier to update).
Thanks for all the feedback.
That way I have all the features backend users know from TYPO3 (and easily input products that way) and the power of aimeos for Frontend and for detailled configuration.
And if I need further options in TYPO3 directly I can always add further managers like e.g. orders (that might also be required but not at the beginning).
Thanks for letting me know regarding the objects, I prefer to use native API isntead of adding directly via database (should also be easier to update).
Thanks for all the feedback.
Re: Various questions - TYPO3 integration (images, links, ..
You should use the current dev-master that will be the base for the new release next month. After years of stability, it contains some breaking changes like full PSR-4 compliance. The documentation hasn't been updated yet, so you may ask here in the forum for details.andreas.allacher wrote: Thanks for letting me know regarding the objects, I prefer to use native API isntead of adding directly via database (should also be easier to update).
Norbert