create new component

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!
malik_kat
Posts: 8
Joined: 09 Jan 2024, 09:20

create new component

Post by malik_kat » 31 Jan 2024, 07:49

I worked to build a new component .
The component functionality
Is showing some of category in all page in website with own design.
I created a class in myshop\packages\myextension\src\Client\Html\Catalog\Mycomponent\Standard.
I created a template in myshop\packages\myextension\templates\client\html\catalog\mycomponent\mycomponent-body.php.
In mycomponent-body.php file build a html structure .
My problem is can't get any change on frontend.

Can you please provide some hint to do this?

Gagik
Posts: 38
Joined: 05 Dec 2023, 06:58

Re: create new component

Post by Gagik » 31 Jan 2024, 12:15

Hi
If you want to show this component in all pages of your project, you can solve this by writing logic in your project framework files (Laravel, Symfony) using 'Aimeos' ORM structure inside file.

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

Re: create new component

Post by aimeos » 05 Feb 2024, 11:06

Guess, you are using Laravel, don't you?

To add a new component in Laravel, add it to the entries in the "pages" section of your ./config/shop.php file where you want them to appear (name is "catalog/mycomponent" in your case). Then, adapt the Blade templates of that pages and add the output of "aibody" and "aiheader" like in this template:
https://github.com/aimeos/aimeos-larave ... .blade.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

malik_kat
Posts: 8
Joined: 09 Jan 2024, 09:20

Re: create new component

Post by malik_kat » 06 Feb 2024, 14:42

Thanks for this replies @aimeos @Gagik

I have try as per your instructions and it worked.

Post Reply