Multi-Shops - templates

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!
heural
Posts: 71
Joined: 09 Jun 2022, 07:55

Multi-Shops - templates

Post by heural » 17 Jan 2025, 08:44

Hi Aimeos-Team,
is there a way to use different templates for multi-shop scenario?

Thank you!

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

Re: Multi-Shops - templates

Post by aimeos » 17 Jan 2025, 09:23

Yes, in Laravel based Aimeos shops, you can assign different themes to the sites:
https://aimeos.org/docs/latest/laravel/themes/

In TYPO3, you add use TypoScript to the page tree to use a different settings for the fs-theme virtual filesystem:
https://github.com/aimeos/aimeos-typo3/ ... hp#L58-L63
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ЕвгенияСемихова(ИПСемиховаЕ.А.)
Posts: 41
Joined: 11 Jan 2025, 09:45

Re: Multi-Shops - templates

Post by ЕвгенияСемихова(ИПСемиховаЕ.А.) » 17 Jan 2025, 09:28

Code: Select all

is there a way to use different templates for multi-shop scenario?
Hello! I am not from the development team, we are also studying this system on our own.
You can add your own theme to each individual store (supplier) + separate settings (color and dimension of images)
Image
life is full of many new and interesting things

heural
Posts: 71
Joined: 09 Jun 2022, 07:55

Re: Multi-Shops - templates

Post by heural » 17 Jan 2025, 12:18

Thank you both, but I expressed too imprecisely. I mean the php templates in templates/client/html.

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

Re: Multi-Shops - templates

Post by aimeos » 18 Jan 2025, 12:10

This works when using several Aimeos theme packages for Laravel. Then, you can have different PHP templates too.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

heural
Posts: 71
Joined: 09 Jun 2022, 07:55

Re: Multi-Shops - templates

Post by heural » 20 Jan 2025, 14:15

But there is no way to do this for TYPO3?

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

Re: Multi-Shops - templates

Post by aimeos » 21 Jan 2025, 10:59

Not at the moment but it would be possible if we add a configuration option for that and add the theme name as second argument to all getTemplatePaths() calls here:
https://github.com/aimeos/aimeos-typo3/ ... er/Classes
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

heural
Posts: 71
Joined: 09 Jun 2022, 07:55

Re: Multi-Shops - templates

Post by heural » 21 Jan 2025, 13:49

That would be very nice!

I have found a way (hack ;-)) for frontend in Aimeos\Aimeos\Base\View.php before https://github.com/aimeos/aimeos-typo3/ ... ew.php#L51

I have a created my own View.php (like here: https://aimeos.org/docs/latest/typo3/ex ... se-classes)
and changed the template path for the specific extension and theme (shop1,shop2...):

Code: Select all

        foreach($templatePaths as $path => $templatePath) {
            /* multi shop template 
            * $config['settings']['theme'] e.g. "shop1" or "shop2"
            * (typoscript: plugin.tx_aimeos.settings.theme)
            */
            if (stripos($path, 'aimeos_custom') !== false && isset($config['settings']['theme'])) {
                $templatePaths[$path] = str_replace('templates/client/html', 'templates/'.$config['settings']['theme'].'/client/html', $templatePath);
            }
        }

Post Reply