[Solved] Challenges with Overriding Aimeos Product Controller

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
unknow76616
Posts: 48
Joined: 30 Apr 2023, 12:46

[Solved] Challenges with Overriding Aimeos Product Controller

Post by unknow76616 » 17 Nov 2023, 12:25

How can I override vendor :

Code: Select all

vendor/aimeos/ai-admin-jqadm/src/Admin/JQAdm/Product/Standard.php
?

I tried to override it by creating :

Code: Select all

./packages/myext/src/Admin/JQAdm/Product/Standard.php
, but it didn't work out

I follow up https://aimeos.org/docs/2023.x/admin/jq ... hop%20site.
Also clean up cache

Php8.1 , Ubuntu
Last edited by unknow76616 on 20 Nov 2023, 21:07, edited 1 time in total.

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

Re: Challenges with Overriding Aimeos Product Controller

Post by aimeos » 20 Nov 2023, 17:02

You can't create a new class with the same name because composer will choose the first one (whichever that is). Instead, you have to give your class a new name (e.g. "Myproject") and configure your new class name to be used by the factory, i.e.:

Code: Select all

admin/jqadm/product/name = Myproject
See here how to use the configuration:
https://aimeos.org/docs/latest/laravel/customize/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

unknow76616
Posts: 48
Joined: 30 Apr 2023, 12:46

Re: Challenges with Overriding Aimeos Product Controller

Post by unknow76616 » 20 Nov 2023, 21:06

Thanks

Post Reply