How to customize Aimeos Shop App
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
How to customize Aimeos Shop App
Hi,
I am new to the aimeos package and laravel-php.
I have set up the full shop application and have been trying to change things to reflect the changes on the frontend.
If I change the code in this file,
vendor/aimeos/ai-client-html/client/html/templates/catalog/home/body-standard.php
It doesn't reflect on the catalog-home section of the website.
I tried to look at the routes in web.php file. As the '/' endpoint uses the CatalogController, I tried to view that. Didn't understand the stuff that the HomeAction function does (I didn't understand these terms like container, view and html client etc.).
The home.blade.php is also confusing me as the params array is layed out there.
What I got from laravel tutorials is, you can put html code in a blade file where other blade files can be imported using section, yield etc. But the code structure in aimeos is totally different.
I'd highly appreaciate it if someone guides me in the right direction (i.e. what to learn to understand the package etc.).
Basically, my plan is to customize the package and build an ecommerce out of it.
I am new to the aimeos package and laravel-php.
I have set up the full shop application and have been trying to change things to reflect the changes on the frontend.
If I change the code in this file,
vendor/aimeos/ai-client-html/client/html/templates/catalog/home/body-standard.php
It doesn't reflect on the catalog-home section of the website.
I tried to look at the routes in web.php file. As the '/' endpoint uses the CatalogController, I tried to view that. Didn't understand the stuff that the HomeAction function does (I didn't understand these terms like container, view and html client etc.).
The home.blade.php is also confusing me as the params array is layed out there.
What I got from laravel tutorials is, you can put html code in a blade file where other blade files can be imported using section, yield etc. But the code structure in aimeos is totally different.
I'd highly appreaciate it if someone guides me in the right direction (i.e. what to learn to understand the package etc.).
Basically, my plan is to customize the package and build an ecommerce out of it.
Re: How to customize Aimeos Shop App
Please read these articles from the documentation first:
- https://aimeos.org/docs/latest/laravel/
- https://aimeos.org/docs/latest/developer/
- https://aimeos.org/docs/latest/frontend ... templates/
- https://aimeos.org/docs/latest/laravel/
- https://aimeos.org/docs/latest/developer/
- https://aimeos.org/docs/latest/frontend ... templates/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: How to customize Aimeos Shop App
Hi, thanks for getting back. I tried to read through some of the material that was pointed in your reply but I still don't understand well enough as I am new to development.
Can you like give me an idea of how to change the logo or something of the homepage?
Can you like give me an idea of how to change the logo or something of the homepage?
Re: How to customize Aimeos Shop App
You can change the logo by uploading your own one in the Configuration > Settings panel of the Aimeos admin backend.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: How to customize Aimeos Shop App
Thanks for replying. What I meant was, how to change something in the code so that it is reflected on the shop pages.
I disabled caching and created an extension. Copied over the ai-client template files and try to change the code inside it, but it doesn't change the site.
When '/' endpoint is accessed, the homeAction() method is called from the CatalogController.php.
This method returns home.blade.php.
I don't understand what these lines in the homeAction() method are doing,
I don't think they are fetching template files as from the stuff I read it seems like they are fetching views. But I only understand blade files and template files as views, I don't understand what type of view is accessed here.
Also, how does calling app( 'config' )->get( 'shop.page.catalog-home' ) directly reach the shop.php file and give us the array corresponding to catalog-home key in the pages array?
I disabled caching and created an extension. Copied over the ai-client template files and try to change the code inside it, but it doesn't change the site.
When '/' endpoint is accessed, the homeAction() method is called from the CatalogController.php.
This method returns home.blade.php.
I don't understand what these lines in the homeAction() method are doing,
Code: Select all
foreach( app( 'config' )->get( 'shop.page.catalog-home' ) as $name )
{
$params['aiheader'][$name] = Shop::get( $name )->getHeader();
$params['aibody'][$name] = Shop::get( $name )->getBody();
}
Also, how does calling app( 'config' )->get( 'shop.page.catalog-home' ) directly reach the shop.php file and give us the array corresponding to catalog-home key in the pages array?
Re: How to customize Aimeos Shop App
Did you use the same directory structure for the templates as in the ai-client-html package? This is important so your new templates are found. Also, only copy those templates, you really need to adapt because otherwise, you don't get bugfixes related to templates.haha wrote: ↑01 Apr 2022, 12:18 Thanks for replying. What I meant was, how to change something in the code so that it is reflected on the shop pages.
I disabled caching and created an extension. Copied over the ai-client template files and try to change the code inside it, but it doesn't change the site.
They use the Shop facade of the Aimeos Laravel package to retrieve the rendered HTML of the components for the HTML header and body. The HTML is rendered according to the templates mentioned before.haha wrote: ↑01 Apr 2022, 12:18 When '/' endpoint is accessed, the homeAction() method is called from the CatalogController.php.
This method returns home.blade.php.
I don't understand what these lines in the homeAction() method are doing,
I don't think they are fetching template files as from the stuff I read it seems like they are fetching views. But I only understand blade files and template files as views, I don't understand what type of view is accessed here.Code: Select all
foreach( app( 'config' )->get( 'shop.page.catalog-home' ) as $name ) { $params['aiheader'][$name] = Shop::get( $name )->getHeader(); $params['aibody'][$name] = Shop::get( $name )->getBody(); }
That's due to the implementation of Laravel Config, which uses the first part as file name from the ./config/ directory and the rest as keys for the array within.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star